LFCS · Question #874
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?
The correct answer is B. A user has a file open in the /mnt directory. The "device is busy" error during an unmount operation signifies that a process or user is currently accessing a file or directory within the mounted filesystem.
Question
Options
- AThe kernel has not finished flushing disk writes to the mounted device.
- BA user has a file open in the /mnt directory.
- CAnother file system still contains a symlink to a file inside /mnt.
- DThe files in /mnt have been scanned and added to the locate database.
- EThe kernel thinks that a process is about to open a file in /mnt for reading.
How the community answered
(45 responses)- A2% (1)
- B91% (41)
- C4% (2)
- E2% (1)
Why each option
The "device is busy" error during an unmount operation signifies that a process or user is currently accessing a file or directory within the mounted filesystem.
While kernel flushing can cause delays, it typically does not result in a "device is busy" error during unmount; rather, it would prolong the unmount process or report a different I/O error.
If a user or process has an open file, is executing a program, or has their current working directory within /mnt or any of its subdirectories, the kernel considers the device busy and prevents unmounting to avoid data corruption or system instability.
A symlink pointing into /mnt does not prevent /mnt from being unmounted, as the symlink itself resides on another filesystem and does not imply active use of the target device.
Indexing files by a tool like `locate` is usually a read-only background operation and does not typically keep a filesystem actively "busy" to prevent unmounting.
The kernel prevents unmounting based on active, ongoing access, not on a prediction of future file access.
Concept tested: Linux umount "device is busy" error reasons
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/removing-a-filesystem_managing-storage-devices
Topics
Community Discussion
No community discussion yet for this question.