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

by Vivek Gite on January 27, 2006 · 1 comment

Under FreeBSD if you get error device busy while unmounting file system then you can forcefully unmount a disk partition or mount point. You can pass -f option to mount command. It forces the read/write mount of an unclean file system. Suppose you would like to unmount /cdrom forcefully then type command (login as a root user use su or sudo command):

# umount -f /cdrom

Where,

  • -f : Forces umount to unmount a disk partition or mounted system

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 1 comment… read it below or add one }

1 Rick November 14, 2009

Before you do this you should always check what process is keeping your device busy:

Install “lsof” from ports and run:

#> lsof /dev/

This will output a list of users and processes using this device. Then kill one by one and try to unmount again. If no process is using it but you still get the error use the command in this hint above.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 7 + 7 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.



Previous post:

Next post: