Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a /dev/sdf mounted to /mnt/db and accidentally mounted it again to /mnt/db2 (I intended to mount /dev/sdh).

Is there any way to umount /dev/sdf but only for the 2nd mount? The /mnt/db contains live databases, so I'd rather not have have any down time.

share|improve this question

migrated from Oct 19 '11 at 18:31

This question came from our site for professional and enthusiast programmers.

You can specify the directory that has the mount:

umount /mnt/db2

The man page for umount mentions unmounting from the directory explicitly. It says it is the best way to do it, and that it works if you've mounted the device more than once.

Giving the special device on which the file system lives may also work, but is obsolete, mainly because it will fail in case this device was mounted on more than one directory.

share|improve this answer

You must log in to answer this question.