nerdexam
CompTIA

LX0-103 · Question #61

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 from umount occurs when a process holds an open file handle or has its working directory inside the mount point.

Devices, Linux Filesystems, Filesystem Hierarchy Standard

Question

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?

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

(22 responses)
  • A
    5% (1)
  • B
    82% (18)
  • D
    9% (2)
  • E
    5% (1)

Why each option

The 'device is busy' error from umount occurs when a process holds an open file handle or has its working directory inside the mount point.

AThe kernel has not finished flushing disk writes to the mounted device.

The kernel flushes disk writes independently of open file handles; pending writes alone do not cause a 'device is busy' error.

BA user has a file open in the /mnt directory.Correct

When a user or process has a file open within /mnt, the kernel maintains an active reference to the block device backing that filesystem. The umount syscall requires that no processes hold open file descriptors, memory-mapped files, or current working directories within the mount point before it can safely detach the filesystem.

CAnother file system still contains a symlink to a file inside /mnt.

Symlinks in other filesystems pointing into /mnt do not create active kernel references to the mounted device itself.

DThe files in /mnt have been scanned and added to the locate database.

The locate database scanner (updatedb) may briefly open files, but once it finishes, no reference remains; a completed scan does not keep the device busy.

EThe kernel thinks that a process is about to open a file in /mnt for reading.

The kernel does not preemptively block umount based on anticipated future opens; only current active references cause this error.

Concept tested: Linux umount failure due to active file references

Source: https://man7.org/linux/man-pages/man8/umount.8.html

Topics

#umount#device busy#file locking#filesystem

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice