MostlyChris

Thoughts that are my own.

Making Emergency Space on Drive

If you find yourself in a situation where you have run out of drive space and your applications are failing as a result, you can run the following command to remove the reserve blocks on the drive and make some space.

tune2fs -m 0 /dev/devicename

Replace /dev/devicename with the partition you need to make space on, such as /dev/hda1 or /dev/sda5, etc.

This is not a permanent solution. You will want to find the reason why drive is full and make some space or add more space by adding another drive.

This handy little command can help in finding the largest files on the server.

find / -type f -printf "%s %h/%f\n" | sort -rn -k1 | head -n 50 | awk '{ print $1/1048576 "MB" " " $2}'

Comments