Topics: AIX, System Admin
Cleaning file systems
It sometimes occurs that a file system runs full, while a process is active, e.g. when a process logs its output to a file. If you delete the log file of a process when it is still active, the file will be gone, but the disk space will usually not be freed. This is because the process keeps the inode of the file open as long as the process is active and still writes to the inode.
After deleting the file, it's not available as file anymore, so you can't view the log file of the process anymore. The disk space will ONLY be freed once the process actually ends.
To overcome it, don't delete the log file, but copy /dev/null to it:
# cp /dev/null [logfile]This will clear the file, free up the disk space and the process logging to the file will just continue logging as nothing ever happened.
If you found this useful, here's more on the same topic(s) in our blog:
- Parent process ID
- Remote file system copy
- Log file rotation script
- Reset an unknown root password
- Creating an image_data resource without preserving mirrors for use with NIM
Interested in learning more?



