Home » LPI » 117-201 » On an ext2 filesystem, a running daemon has created a large logfile that is beginning to fill the disk.
On an ext2 filesystem, a running daemon has created a large logfile that is beginning to fill the disk. After deleting the file with an “rm-f” command as root, “df” shows that the space is still in use even though the file is not shown using “ls”. To reclaim this space you must:
A. Restart the daemon.
B. Unmount and remount the filesystem.
C. Use sync.
D. Recreate the file.
E. Run fsck.
Correct Answer: A
Explanation/Reference:
Explanation: If you have a daemon which writes a log file and keeps that file open for writing then removing the file will not free up the disk space. The filesystem still sees the program as having a reference to it. Therefore the filesystem will not free up that disk space. The only way to free the space is to restart the daemon
Reference: http://mail.gnu.org/pipermail/bug-fileutils/2001-February/001495.html
Incorrect Answers:
B:Unmounting and remounting the filesystem is unnecessary and may not free the space.
C:Sync is used to write the buffers to disk. It will not free the space.
D:Recreating the file will not free the space because the daemon has a reference to the old file.
E:Fsck is a file system checking tool. It won’t free the space because it won’t recognize it as corrupted.
Download Printable PDF. VALID exam to help you PASS.
|
|