Drive Warning: /dev/sdc2 (/var) is 88% full - Please help !

calvinphanctt

Active Member
Mar 27, 2007
44
0
156
Hi everyone,

I received a warning from my WHM with the warning message "Drive Warning: /dev/sdc2 (/var) is 88% full"

Would you please show me step by step how to free up some space on my sdc2 ?

Thank you so much.

Sincerely,
Calvin P.

Device Size Used Available Percent Used Mount Point
/dev/sda8 202G 95G 97G 50% /home3
/dev/sdb1 459G 344G 92G 79% /home2
/dev/sdc1 99M 32M 63M 34% /boot
/dev/sdc2 9.7G 8.1G 1.2G 88% /var
/dev/sdc3 9.7G 6.1G 3.1G 67% /usr
/dev/sdc5 2.0G 866M 1016M 47% /
/dev/sdc6 996M 36M 909M 4% /tmp
/dev/sdc8 425G 300G 104G 75% /home
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,606
33
238
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello,

The /var partition appears to be smaller than we recommend for cPanel installation in our official documentation:

Advanced Options: Pre-Installation

The preferred method to correct the issue would be to setup a new machine and migrate your accounts to it. That new machine should be setup with the proper partitioning scheme.

If this is not viable, you might try moving the MySQL data to another partition with more space and symlinking it. This is discussed in the following thread:

http://forums.cpanel.net/f354/how-move-mysql-data-folder-110481.html#post709306

Thanks!
 

calvinphanctt

Active Member
Mar 27, 2007
44
0
156
Hi Tristan,

Thank you so much! I follow that instruction and successfully move my MySQL!

Sincerely,
Calvin P.
 

andresbarriga

Member
Jul 13, 2011
11
1
51
santiago
cPanel Access Level
DataCenter Provider
Same problem here:

[email protected] [/]# df -h
S.ficheros Tamaño Usado Disp Uso% Montado en
/dev/sda7 2,0G 1,1G 792M 58% /
/dev/sda8 197G 107G 80G 58% /home
/dev/sda5 4,8G 1,3G 3,2G 29% /tmp
/dev/sda3 9,5G 8,0G 1,1G 89% /usr
/dev/sda2 9,5G 7,4G 1,7G 82% /var

/dev/sda1 99M 39M 56M 41% /boot
tmpfs 1,5G 0 1,5G 0% /dev/shm
/dev/sdb1 230G 165G 54G 76% /backup
[email protected] [/]#


How can i assign more space to partitions /dev/sda3 9,5G 8,0G 1,1G 89% /usr
/dev/sda2 9,5G 7,4G 1,7G 82% /var ?


Thanks a lot
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,606
33
238
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello,

We cannot recommend resizing partitions on a production machine. The best option is to either move data as I already suggested to another location such as /var/lib/mysql or to move the accounts to a properly formatted machine with 16GB in /var and /usr

Thanks!
 

hifi_ninja

Member
Jul 8, 2006
11
0
151
I'm with the same problem... It started 1 week ago.

Filesystem Size Used Avail Use% Mounted on
/dev/sda5 20G 15G 3.5G 82% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 485M 94M 366M 21% /boot
/dev/sda8 354G 6.0G 330G 2% /home
/dev/sda2 39G 3.7G 33G 10% /usr
/dev/sda3 39G 4.0G 33G 11% /var
/dev/sda6 4.1G 136M 3.7G 4% /tmp

Should I move mysql?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,606
33
238
somewhere over the rainbow
cPanel Access Level
Root Administrator
The /var partition is only at 11% used, so moving MySQL would not help with the partition showing the alert. That partitions appears to be / or root partition.

You'll need to run a command to find the folders and/or files with the most usage in / that are not one of the existing partitions.

If you are using /backup for cPanel backups and don't have it separately mounted, it is the most likely reason for the high usage. Here's a command to run a space check on files and folders in /

Code:
cd /
du -sk .[!.]* *|sort -n
Thanks!
 

hifi_ninja

Member
Jul 8, 2006
11
0
151
Well, I did just that (using /backup for cPanel backups and don't have it separately mounted).
How can I do it the right way?

The /var partition is only at 11% used, so moving MySQL would not help with the partition showing the alert. That partitions appears to be / or root partition.

You'll need to run a command to find the folders and/or files with the most usage in / that are not one of the existing partitions.

If you are using /backup for cPanel backups and don't have it separately mounted, it is the most likely reason for the high usage. Here's a command to run a space check on files and folders in /

Code:
cd /
du -sk .[!.]* *|sort -n
Thanks!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,606
33
238
somewhere over the rainbow
cPanel Access Level
Root Administrator
You'd need to ask your provider or datacenter about how to mount the partition if you aren't able to determine this from reading online guides. I won't provide recommendations on partition mounting, since that's a system administrative issue and I haven't personally done it enough to be willing to forego the responsibility of possible disk corruption.
 

hifi_ninja

Member
Jul 8, 2006
11
0
151
Thanks! I'll ask them.

You'd need to ask your provider or datacenter about how to mount the partition if you aren't able to determine this from reading online guides. I won't provide recommendations on partition mounting, since that's a system administrative issue and I haven't personally done it enough to be willing to forego the responsibility of possible disk corruption.