Pages

Thursday, April 24, 2014

mount a device twice in linux

mount a device twice in linux

I have a requirement to mount two folders in the same device.
Mounting a device twice seems to be simple, But I avoided that and looked for alternate solutions.

At that time, I came to know about  --bind option.

Say I have a device /dev/sda3 mounted to the directory  /root
Inside /root I wish to mount two different folders ,Say Folder1 and Folder2 to get mounted at /tmp/Dest1 and /tmp/Dest2.

Trying this command worked.

mount  --bind /root/Folder1 /tmp/Dest1
mount  --bind /root/Folder2 /tmp/Dest2

Refer :
https://bbs.archlinux.org/viewtopic.php?id=166505

No comments:

Post a Comment