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.

DISKWARN (but my tmp folder is only 113mb)

Discussion in 'General Discussion' started by Luis Mota, Jul 22, 2015.

  1. Luis Mota

    Luis Mota Member

    Joined:
    Jun 1, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,834
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. Luis Mota

    Luis Mota Member

    Joined:
    Jun 1, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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 .
    
     
  4. Luis Mota

    Luis Mota Member

    Joined:
    Jun 1, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,834
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  6. Luis Mota

    Luis Mota Member

    Joined:
    Jun 1, 2015
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Porto
    cPanel Access Level:
    Reseller Owner
    I've run the command on root because:


    /dev/mapper/vg_servidor-lv_root ext4 50G 41G 5.9G 88% /

    /tmp none 50G 41G 5.9G 88% /var/tmp
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,834
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     

Share This Page