» Linux » Examen sur Linux » Examen 201 : Advanced Administration » Section 2 » Question 3/20
3.On an ext2 file system, 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:

Restart the daemon.
Unmount and remount the file system.
Use sync.
Recreate the file.
Run fsck.

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 file system still sees the program as having a reference to it. Therefore the file system 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 file system 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.
« Question 2 Question 4 »