The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by calvinphanctt, Feb 19, 2012.

  1. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    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
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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!
     
  3. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Hi Tristan,

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

    Sincerely,
    Calvin P.
     
  4. andresbarriga

    andresbarriga Member

    Joined:
    Jul 13, 2011
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    santiago
    cPanel Access Level:
    DataCenter Provider
    Same problem here:

    root@srv2 [/]# 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
    root@srv2 [/]#


    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
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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!
     
  6. hifi_ninja

    hifi_ninja Member

    Joined:
    Jul 8, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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!
     
  8. hifi_ninja

    hifi_ninja Member

    Joined:
    Jul 8, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    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?

     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  10. hifi_ninja

    hifi_ninja Member

    Joined:
    Jul 8, 2006
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Thanks! I'll ask them.

     
Loading...

Share This Page