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.

/dev/mapper/centos-root is 100% full

Discussion in 'Workarounds and Optimization' started by tylrs, Dec 9, 2015.

  1. tylrs

    tylrs Member

    Joined:
    Sep 23, 2013
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    My /dev/mapper/centos-root is mapped to / and is 100% full. This is causing issues with services crashing and the server becoming unstable. However, I am not sure why this keeps happening. /home is far from full, where all user data is stored. I clear out /tmp with tmpwatch, I removed old logs in /var/log and any unnecessary files.

    Code:
    root@web508 [/]# df
    Filesystem              1K-blocks      Used Available Use% Mounted on
    /dev/mapper/centos-root  52403200  52192296    210904 100% /
    devtmpfs                  3480112         0   3480112   0% /dev
    tmpfs                     3489464         0   3489464   0% /dev/shm
    tmpfs                     3489464     17004   3472460   1% /run
    tmpfs                     3489464         0   3489464   0% /sys/fs/cgroup
    /dev/mapper/centos-home 830664412 127473172 703191240  16% /home
    /dev/sda1                  508588    164776    343812  33% /boot
    
    and
    Code:
    root@web508 [/]# du -sh /*
    0       /backup
    0       /bin
    136M    /boot
    0       /dev
    28M     /etc
    170G    /home
    4.0K    /ips.tar.gz
    0       /lib
    0       /lib64
    0       /media
    0       /mnt
    4.0K    /razor-agent.log
    591M    /root
    17M     /run
    0       /sbin
    0       /scripts
    0       /srv
    0       /sys
    0       /tsm
    Any way to resolve this?
     
    #1 tylrs, Dec 9, 2015
    Last edited by a moderator: Dec 9, 2015
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Your home and boot is mounted on other partition. I think your /var and /usr directory are using all the disk space.

    Can you please let me know following command out so that I can assist you on this.

    Code:
    df -h
    
    cd /
    
    du -sch * --exclude=home
     
  3. tylrs

    tylrs Member

    Joined:
    Sep 23, 2013
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you for your help.

    Code:
    root@web508 [~]# df -h
    Filesystem               Size  Used Avail Use% Mounted on
    /dev/mapper/centos-root   50G   50G   20K 100% /
    devtmpfs                 3.4G     0  3.4G   0% /dev
    tmpfs                    3.4G     0  3.4G   0% /dev/shm
    tmpfs                    3.4G   58M  3.3G   2% /run
    tmpfs                    3.4G     0  3.4G   0% /sys/fs/cgroup
    /dev/mapper/centos-home  793G  122G  671G  16% /home
    /dev/sda1                497M  161M  336M  33% /boot
    
    and

    Code:
    root@web508 [/]# du -sch * --exclude=home
    0       backup
    0       bin
    136M    boot
    0       dev
    28M     etc
    4.0K    ips.tar.gz
    0       lib
    0       lib64
    0       media
    0       mnt
    46M     opt
    0       proc
    4.0K    razor-agent.log
    588M    root
    58M     run
    0       sbin
    0       scripts
    0       srv
    0       sys
    2.4M    tmp
    0       tsm
    11G     usr
    39G     var
    50G     total
    
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    If you are unable to make free space on your server and your mysql directory is using high disk space then you can move your mysql directory to /home partition with the following post

    How to move MySQL data directory
     
  6. tylrs

    tylrs Member

    Joined:
    Sep 23, 2013
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you! This definitely helped. Got rid of some data that was no longer needed.

    I will do this. Since MySQL is used so much by hosting customers, it makes sense that its on the largest partition. Thanks for this!
     
  7. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, MySQL is using huge disk space on the shared hosting server. Also you can use separate SSD drive for your mysql databases. Attached new SSD drive to your server and mount that on /database directory.
     
Loading...

Share This Page