DISKWARN (but my tmp folder is only 113mb)

Luis Mota

Member
Jun 1, 2015
18
1
53
Porto
cPanel Access Level
Reseller Owner
I have been receiving e-mails from cpanel:

Code:
The filesystem “/tmp”, which is mounted at “/var/tmp”, has reached “warn” status because it is 82.23% full.

Used:

40.47 GB

Available:

8.74 GB

Total:

49.22 GB
I've searched for a solution, and for what I can see I need to clean my tmp folder or resize the tmp. But since /tmp is 49.22 GB wide, I think that something is wrong here.

So I entered the command "df -aTh" and it returned me:

Code:
Filesystem           Type         Size  Used Avail Use% Mounted on
/dev/mapper/vg_server-lv_root
                     ext4          50G   42G  5.7G  88% /
proc                 proc            0     0     0    - /proc
sysfs                sysfs           0     0     0    - /sys
devpts               devpts          0     0     0    - /dev/pts
tmpfs                tmpfs        3.9G     0  3.9G   0% /dev/shm
/dev/sda1            ext4         485M   67M  393M  15% /boot
/dev/mapper/vg_server-lv_home
                     ext4         863G   23G  797G   3% /home
none                 binfmt_misc     0     0     0    - /proc/sys/fs/binfmt_misc
/tmp                 none          50G   42G  5.7G  88% /var/tmp
And then I've checked the tmp folder size with "du /tmp -h"
Code:
4.0K    /tmp/.ICE-unix
8.0K    /tmp/pear/temp
12K     /tmp/pear
4.0K    /tmp/yum-scppt-W0sllP/x86_64/6/base/packages
53M     /tmp/yum-scppt-W0sllP/x86_64/6/base
4.0K    /tmp/yum-scppt-W0sllP/x86_64/6/extras/packages
296K    /tmp/yum-scppt-W0sllP/x86_64/6/extras
4.0K    /tmp/yum-scppt-W0sllP/x86_64/6/updates/packages
23M     /tmp/yum-scppt-W0sllP/x86_64/6/updates
76M     /tmp/yum-scppt-W0sllP/x86_64/6
76M     /tmp/yum-scppt-W0sllP/x86_64
76M     /tmp/yum-scppt-W0sllP
113M    /tmp
How could this be possible? What can I do to fix this?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello :)

You may want to check the disk space with commands such as:

Code:
cd /tmp
du --max-depth=1 | sort -n | awk 'BEGIN {OFMT = "%.0f"} {print $1/1024,"MB", $2}'
This should help determine what's taking up the space in your /tmp directory.

Thank you.
 

Luis Mota

Member
Jun 1, 2015
18
1
53
Porto
cPanel Access Level
Reseller Owner
Thanks for your reply but when I execute the commands
Code:
cd /tmp
du --max-depth=1 | sort -n | awk 'BEGIN {OFMT = "%.0f"} {print $1/1024,"MB", $2}'
I get this return o_O:
Code:
0 MB ./.ICE-unix
0 MB ./pear
76 MB ./yum-scppt-W0sllP
112 MB .
 

Luis Mota

Member
Jun 1, 2015
18
1
53
Porto
cPanel Access Level
Reseller Owner
I think I found my issue, i've run the command:
Code:
du -sh /*
And I got the following:
Code:
26G     /backup
7.9M    /bin
57M     /boot
180K    /dev
4.0K    /error_log
29M     /etc
48G     /home
251M    /lib
30M     /lib64
16K     /lost+found
4.0K    /media
0       /misc
4.0K    /mnt
0       /net
32M     /opt
du: cannot access `/proc/6005/task/6005/fd/4': No such file or directory
du: cannot access `/proc/6005/task/6005/fdinfo/4': No such file or directory
du: cannot access `/proc/6005/fd/4': No such file or directory
du: cannot access `/proc/6005/fdinfo/4': No such file or directory
du: cannot access `/proc/17567/task/17583/fdinfo/906': No such file or directory
du: cannot access `/proc/17567/task/17583/fdinfo/907': No such file or directory
0       /proc
12K     /quota.user
4.0K    /razor-agent.log
43M     /root
14M     /sbin
0       /scripts
4.0K    /selinux
4.0K    /srv
0       /sys
112M    /tmp
8.6G    /usr
6.2G    /var
So, I assume the fault is from the /backup folder.

There is any problem if I change the settings on WHM to make the backup to /home/backup
And if I do so, what will happen to /backup ? I will need to remove it manually?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
You simply ran the disk usage utility on the root directory instead of the tmp directory. It's possible some processes that are using files from /tmp have not yet closed. A reboot is quick way to ensure those files are closed and to determine if the disk space usage is accurate.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
There is any problem if I change the settings on WHM to make the backup to /home/backup
And if I do so, what will happen to /backup ? I will need to remove it manually?
I don't advise using the /home partition for backups due to potential quota conflicts. You may want to consider a remote server for backups if you don't have sufficient space for them. As far as removing the existing backups, yes, you would have to remove them manually through the command line.

Thank you.