I have a root partition of 20G in size and it is running out of space because the /var/lib/mysql/ibdata1 is getting too large (13G now, the whole /var/lib is 15G in size).

lsblk command shows something like this:

-sda2 (mountpoint /)
--volgroup1-lvol0 (mountpoint /home)
-sda4 ([swap])
-volgroup1-lvol0 (mountpoint /home)

So basically the sda2 is the / partition with the 20G of space and sda3 + sdb is /home partition with space of 3.6T created with LVM. /dev/sda2 and /dev/mapper/volgroup1-lvol0 are both ext4.

1) What is the best way of resizing the root partition? I can shut off the system for an hour or two as I don't run any high traffic sites. This would not be an issue.

2) Is there any way of solving the issue of the ibdata1 growing too large?

  • Your root partition is not in LVM? Format and reinstall, and this time leave it as part of the LVM. Dec 17, 2016 at 15:56
  • ibdata grows because your database grows. Regularly prune data which you no longer need. You could create a new LV for mysql and move /var/lib/mysql there. Dec 17, 2016 at 16:54
  • Do you use the innodb_file_per_table option in mysql? That saves having a big ibdata file. You do have to drop/recreate your DBs, though. There's plenty to find on that.
    – Halfgaar
    Dec 17, 2016 at 20:27

1 Answer 1


As you root partition is not on LVM, you will have a very hard time extending it.

It should be way simpler to move /var/lib/mysql to your home partition (with appropriate permissions), reconfiguring MySQL to use the new path (or creating an appropriate symlink).

  • You may need to change app-armor/se-linux profiles when you move /var/lib/mysql.
    – Halfgaar
    Dec 17, 2016 at 20:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .