101-500 practice question 15 of 30

After running the command umount /mnt, the following error message is displayed: umount: /mnt: device is busy. What is a common reason for this message?

Full set: 246 questions
Answer options
A: The kernel has not finished flushing disk writes to themounted device.
B: A user has a file open in the /mnt directory. Correct answer
C: Another file system still contains a symlink to a file inside /mnt.
D: The files in /mnt have been scanned and added to the locate database.
E: The kernel thinks that a process is about toopen a file in /mnt for reading.
Correct Answer:
B. A user has a file open in the /mnt directory.
Explanation

The "device is busy" error (EBUSY) from the umount command indicates that the kernel cannot detach the filesystem because it is actively in use. The most common reason is that a process has a file open on the filesystem or is using a directory on the filesystem as its current working directory. Until all such processes close their files or change their directory, the filesystem cannot be safely unmounted. Tools like lsof or fuser can be used to identify the process(es) holding the filesystem open.

Why Incorrect

A. The kernel flushes writes during unmount, but this process doesn't typically cause a "device is busy" error; it just takes time.
C. A symbolic link is merely a pointer to a path; its existence does not keep the target filesystem busy or prevent it from being unmounted.
D. The locate database is a separate file; its contents do not keep a filesystem busy after the scanning process (updatedb) has finished.
E. The kernel acts on the current state (e.g., open files), not on predictions about what a process might do in the future.

References

1. Red Hat Enterprise Linux 8 Documentation, "Managing file systems", Section 2.8. Unmounting a file system. It states: "You cannot unmount a file system if it is busy, for example, if a file is open or a user has their current directory within the file system."

2. umount(8) Linux manual page. It describes the EBUSY error: "filesystem is busy. A process is using the filesystem..."

3. Sobell, M. G. (2018). A Practical Guide to Linux Commands, Editors, and Shell Programming. Pearson Education. Chapter 5, "The Linux Filesystem," discusses the conditions under which a filesystem is considered busy.

Scroll to Top