tylrs

Member
Sep 23, 2013
13
0
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:
[email protected] [/]# 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:
[email protected] [/]# 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?
 
Last edited by a moderator:

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
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
 

tylrs

Member
Sep 23, 2013
13
0
1
cPanel Access Level
Root Administrator
Thank you for your help.

Code:
[email protected] [~]# 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:
[email protected] [/]# 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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
Last edited by a moderator:

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
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
 

tylrs

Member
Sep 23, 2013
13
0
1
cPanel Access Level
Root Administrator
Hello :)

Most of the disk space usage stems from your /usr and /var directories. The following document explains how you can check the disk space to narrow down what's taking up most of the space within these directories:

How to Manage your Hard Drive Space - cPanel Knowledge Base - cPanel Documentation

Thank you.
Thank you! This definitely helped. Got rid of some data that was no longer needed.

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
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!
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
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.