Tag: disk full

  • Unable to Write to Disk – Inodes Full

    Unable to Write to Disk – Inodes Full

    On a server, can’t write to disk. I checked disk usage with

    df -h
    

    Everything is good. Next i checked Inodes usage with

    df -hi
    

    Inodes usage was 100%

    [root@w8bd-blkx ~]# df -hi
    Filesystem Inodes IUsed IFree IUse% Mounted on
    /dev/ploop36812p1 6.1M 6.1M 5 100% /
    /dev/simfs 6.1M 6.1M 5 100% /tmp
    /dev/simfs 6.1M 6.1M 5 100% /var/tmp
    none 1.0M 160 1.0M 1% /dev
    [root@w8bd-blkx ~]#

    This normally happen when you have too many smaller files.

    First of all free up some Inodes by removing unwanted log files, most of the time you can delete some logs in /var/log folder.

    To find where the Inodes are used up, run command

    find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n
    

    The command will display Inodes usage for folder sorted by Inodes.

    linux inodes usage

    In this case, httpdocs/var/session had too many session files. I removed all session files, that fixed the problem. To avoid this happening again, i created a cronjob, that delete old session files every day.

    hdd