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've been looking for a way to mount the same drive (e.g. /dev/sdd1) in two places on a hard drive. If I try using the command that I use to mount a drive in the first location again, I recieve the error:

"Mount is denied because the NTFS drive is already exclusively opened."

I've also tried binding the mount point, but obviously if the main location becomes unmounted, the binded folder becomes in accessible.

Are there any other commands I can try?

share|improve this question

migrated from Nov 17 '11 at 14:32

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

up vote 3 down vote accepted

The only way I can see of solving this problem (the "what happens if it got unmounted?" part in particular) is to use automount and symlinks, as suggested in Gustav's answer:

ln -s /mnt/original /home/max/newlink

The trick though would be to make /mnt and in particular /mnt/original be covered by an automount map, your distribution should provide a package for this, you'll need something like the following in /etc/auto.master:

/mnt    /etc/auto.mnt

and then in /etc/auto.mnt:

original        -fstype=ntfs    /dev/sdd1

In this way accessing /mnt/original will cause /dev/sdd1 to be mounted appropriately, but "looking through" the symlink will also cause it to be mounted if not already mounted for any reason.

(One more thing - if you happen to export this through samba too, you'll need to use preexec to make samba believe it existed. I was "the chatty friend" in this blog post)

share|improve this answer

With Linux bind mounts, there is no such thing as "main location". Both mounts are equal; if one is unmounted, the other will remain.

mount --bind /mnt/original /home/max/newlink

(For fstab, use /mnt/original /home/max/newlink none bind.)

share|improve this answer

You can make a symbolic link to the second place from the first mount:

ln -s /mnt/original /home/max/newlink
share|improve this answer
That doesn't solve the (unsolvable) "if the main location becomes unmounted..." problem – Flexo Nov 17 '11 at 14:33
So... my solution doesn't solve an unsolvable problem. A conundrum wrapped in a mystery indeed. – Gustav Bertram Nov 17 '11 at 14:36
I appreciate the answer, regardless. I wasn't aware if this was an unsolveable issue or not. Thanks! – Max Nov 17 '11 at 14:38
@GustavBertram - a comment acknowledging that would be appropriate. (The other possible solution would be to use automount on the original mount point to ensure it gets re-mounted if it has been unmounted) – Flexo Nov 17 '11 at 14:40
@awoodland Post an answer, post an answer! (I had no idea it was unsolvable. Taking your word for it. Explication required for teh vote uppedness!) – Gustav Bertram Nov 17 '11 at 14:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .