No space left on device

  1. Log into system: ssh <system>
  2. Check for full filesystem: df -h
  3. Detemine the largest files on the filesystem:
    du -ah / --exclude="/proc" | sort -h -r | head -n 5 2>/dev/null
  4. Check the output for something that can be deleted.
  5. If the du command doesn’t show anything, consider whether something that was running might have created a temporary file that exceeded the remaining space on the filesystem.
  6. If you find temporary files created at run-time that exceed the remaining drive space, you have 3 choices:
    A. add more drive space
    B. spread out the run times of jobs so that concurrent jobs don’t exceed the remaining drive space
    C. consider adding compression to the temporary files before writing them to the filesystem
  7. Check the inode usage with this: df -i
  8. If you find the issue is inode usage, you have 2 choices:
    A. delete file s of directories that use a large number of inodes:
    1. identify which files and directories are using the most inodes by running this:
    for i in /*; do echo $i; find $i | wc -l; done

    2. examine the output for toplevel directories that are using a lot of inodes
    3. re-run the command in step 1. replacing /* with the toplevel directory to check
    4. Once you determine where the issue is: delete expendable files or directories
    B. increase the number of available inodes:
    1. unmount the full filesystem: umount <filesystem mountpoint>
    2. update the number of inodes: mkfs.ext3 /dev/<device> -N <desired num of inodes>
    3. re-mount the filesystem: mount -a







About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!
This entry was posted in Linux. Bookmark the permalink.