One of the common reasons for the error message “device is busy” when trying to unmount a file system is that a user or a process has a file open in the mounted directory. This prevents the kernel from releasing the file system resources and detaching the device. To find out which user or process is holding the file system, one can use the lsof or fuser commands12. For example, lsof /mnt or fuser -m /mnt will list the processes that have open files in /mnt. To force the unmounting of a busy file system, one can use the -l option of the umount command, which will perform a lazy unmount. This means that the file system will be detached as soon as it is not busy anymore3. References: 1: How to solve “device is busy” problem in Linux 2: How to Find Out Which Process Is Using a File in Linux 3: umount(8) - Linux man page
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit