Solaris: Forcefully unmount a disk partition to get rid of device busy error

‮ttual.www‬uri.com
Solaris: Forcefully unmount a disk partition to get rid of device busy error

If you are trying to unmount a disk partition on Solaris and you get a "device busy" error, it means that the partition is currently in use by some process and cannot be unmounted.

To forcefully unmount the partition and get rid of the "device busy" error, you can use the umount -f command. For example:

umount -f /path/to/partition

Replace /path/to/partition with the path to the partition you want to unmount. The -f flag forces the unmount operation, even if the partition is in use.

It's important to note that forcibly unmounting a partition can cause data loss or corruption if the partition is in use by an important process. It's generally a good idea to try and identify the process that is using the partition and stop it before attempting to unmount the partition.

To find out which processes are using the partition, you can use the fuser command. For example:

fuser -m /path/to/partition

This will show you the PIDs of the processes that are using the partition. You can then use the kill command to stop the processes. For example:

kill -9 PID

Replace PID with the PID of the process you want to stop.

Once you have stopped any processes that are using the partition, you should be able to unmount the partition normally using the umount command without the -f flag.

Created Time:2017-10-30 14:27:20  Author:lautturi