Partition nearing full use, how to expand?

kjtocool

Registered
Oct 28, 2011
2
0
51
cPanel Access Level
Root Administrator
Hey everyone,

I have an issue with a dedicated server I manage. I have 6 different devices:

/dev/sda1 -> /boot (97M 45% used)
/dev/sda2 -> /usr (9.9G 59% used)
/dev/sda3 -> /var (9.9G 89% used)
/dev/sda5 -> / (2G 19% used)
/dev/sda8 -> /home (890G 3% used)

As you can see, /var is getting full due to some growing MySQL databases. I'm going to need to expand the size allocated to /var, but I have no experience doing so, and am concerned.

Is this an easy fix, or something I should look to hire out?

Thanks!
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
Virginia Beach, VA
cPanel Access Level
DataCenter Provider
You probably won't be able to expand the partition size for /var - this really depends on how the partitions are laid out on the disk, but regardless, it's not a good idea. Since you have plenty of space on /home, I would just relocate your MySQL databases there and call it a day:

How to Change the Location of MySQL on cPanel :: The cPanel Admin
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,225
463
Hello :)

Increasing the size of that partition will likely involve reinstalling the operating system. In the future, if you decide to do this, ensure you follow the recommended partition setup documented here:

Step 5: Configure Your Operating System - Partitions

You can find instructions for moving your MySQL directory to another partition on the following thread:

Moving MySQL Data Directory

Thank you.