/dev/mapper/centos-root is 100% full Help me!!

bigboy

Verified User
Joined
Nov 25, 2005
Messages
188
Location
USA
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.

[root@kweb1 /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/centos-root 52403200 50891812 1511388 98% /
devtmpfs 32832728 0 32832728 0% /dev
tmpfs 32844192 0 32844192 0% /dev/shm
tmpfs 32844192 3269392 29574800 10% /run
tmpfs 32844192 0 32844192 0% /sys/fs/cgroup
/dev/sda3 1023268604 222220228 749046024 23% /backup
/dev/sdb1 508588 252992 255596 50% /boot
/dev/mapper/centos-home 1084492412 237626032 846866380 22% /home
tmpfs 6568840 0 6568840 0% /run/user/0



[root@kweb1 /]# du -sh /*
212G /backup
0 /bin
222M /boot
0 /dev
37M /etc
227G /home
0 /lib
0 /lib64
0 /media
0 /mnt
0 /opt
du: cannot access ‘/proc/93865/task/93865/fd/4’: No such file or directory
du: cannot access ‘/proc/93865/task/93865/fdinfo/4’: No such file or directory
du: cannot access ‘/proc/93865/fd/4’: No such file or directory
du: cannot access ‘/proc/93865/fdinfo/4’: No such file or directory
0 /proc
120K /root
3.2G /run
0 /sbin
0 /srv
0 /sys
12M /tmp
2.3G /usr
45G /var
 
Every directory that's NOT shown in your fstab as a different mount point will use the storage available to the '/' mount.
So the /var/log, var/lib/mysql etc all use a part of your 45G partition '/'.
The reason why this 'du sh' output is not adding up to 98% of your 45G partition might be because you have deleted logfiles of services still running.

First restart mysql and httpd and check again the usage. If it's still at 98%, find 'exactly' which files are causing it (/tmp/ /var/log/*).
If you can't fix it by e.g. reducing data logged, enable gzip compression on logfiles or whatever, try moving one of these directories to /home/ and creating a symlink (e.g. /var/lib/mysql or /var/log/httpd/domains -> /home/logs/ of /home/dbs.

Or... if possible, just add another disk of split your /dev/sda3 (/backups had plenty of free space) and use lvm to extent the /dev/mapper/centos-root volume.

Anyway, many solutions, but first try to locate where the space is used.
 
Back
Top