Tag Archives: device is busy

How to Solve Disk Unmount Error: device is busy

# umount /dev/sda2

umount: /: target is busy.

perhaps

umount: /dev/sda2: device is busy

This is because some users are using files on the current disk. There are two solutions:

① Force uninstall (not recommended)

umount -l /dev/sda2

② After confirming with the user, close the processes related to these open files

see:

lsof /dev/sda2

Kill program:

lsof /dev/sda2 | awk ‘{print $2}’ | xargs kill -9

Uninstall:

umount /dev/sda2

umount Error: umount.nfs4: device is busy [How to Solve]

Errors are reported as follows:

umount /data/nginx/html/pc/static
    umount.nfs4: /data/nginx/html/pc/static: device is busy

1. Through fuser, See which process is occupying the file

fuser -m -v /data/nginx/html/pc/static/test

– M indicates the file system or block device (in mount state) where the specified file is located. All processes accessing the file system are listed

– V indicates verbose mode. The process is displayed in PS mode, including PID, user, command and access fields

If the prompt: – bash: fuser: command not found, it indicates that there is no corresponding package,

Solution:

yum install psmisc -y

2. Kill the corresponding process,

kill -9 Corresponding process code

3. Cancel the mount again

umount /data/nginx/html/pc/static