XK0-005 · Question #1223
XK0-005 Question #1223: Real Exam Question with Answer & Explanation
The correct answer is A: Use the lsof command to find where the large log file is located and truncate it. "df" shows space, but the storage is in fact ran out of space. This is usually due to a file that was deleted but a process is still has the file opened an it will not release the space until the process is killed or restarted. The first step to fix this issue is to find the proc
Question
A system ran out of storage space on a particular mount and will not allow anything to be written to disk. The df command shows there are 6GB free on the mount, and there is no inode exhaustion. This issue has happened before due to a known large log file that was not being rotated. The administrator remembers the file name but cannot remember the location of the log file or which process is writing to it. Which of the following would be the BEST solution to correct this issue while maintaining availability?
Options
- AUse the lsof command to find where the large log file is located and truncate it
- BUse the locate command to find where the large log file is located and delete it
- CUse the du command to find where the large log file is located and delete it
- DUse the ps command to find which process is writing to the log file, and then kill and restart the
Explanation
"df" shows space, but the storage is in fact ran out of space. This is usually due to a file that was deleted but a process is still has the file opened an it will not release the space until the process is killed or restarted. The first step to fix this issue is to find the process that is opening deleted files and "lsof" is the best tool to find that.
Topics
Community Discussion
No community discussion yet for this question.