View previous topic :: View next topic |
Author |
Message |
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Sat Feb 23, 2008 7:42 pm Post subject: fstab: mounting a drive in 2 places at the same time |
|
|
Code: |
/dev/sr0 /mnt/cdrom auto user,auto,ro 0 0
/dev/sr0 /home/gabriel/@CD auto user,auto,ro 0 0
/dev/sdf1 /mnt/usb vfat user,rw,noauto 0 0
/dev/sdf1 /home/gabriel/@USB vfat user,rw,noauto 0 0
|
This is a part of my fstab. As you can see I mount my pendrive and my dvd in both /mnt and my user home directory. I'd like to make both directories "connected". I mean... when I mount /dev/sdf1 in /mnt/usb it will also mount in /home/gabriel/@USB and vice versa. I've read the man pages and I think that can be done by adding "bind" to the options, but I don't know how to do it properly.
Help appreciated |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Sat Feb 23, 2008 7:45 pm Post subject: |
|
|
Why a simple symlink is not good? |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Sat Feb 23, 2008 9:17 pm Post subject: |
|
|
NO I'm using ROX as my gui file manager and It has some visual issues when the mounted directory is accessed through a symlink. So is there any way to do it not using a symlink ?? |
|
Back to top |
|
|
gundelgauk n00b
Joined: 01 Oct 2007 Posts: 40
|
Posted: Sat Feb 23, 2008 9:36 pm Post subject: |
|
|
You would mount manually like this:
# mount -t auto /dev/sr0 /mnt/cdrom
# mount -o bind /mnt/cdrom /home/gabriel/CD
The corresponding fstab entries should look like this:
Code: | /dev/sr0 /mnt/cdrom auto user,auto,ro 0 0
/mnt/cdrom /home/gabriel/CD auto bind 0 0 |
It works with partitions but I haven't tried it with removable media (CDROM, USB drives). You might get mixed results with these. |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Sun Feb 24, 2008 11:30 am Post subject: |
|
|
Nope... doesn't work :/ The problem is that I don't want to mount it manually... ROX mounts the drive when I enter the @CD or @USB directory. And I want it to work properly.
Maybe there's another way ?? If not than I guess my problem is unsolved :/ |
|
Back to top |
|
|
gundelgauk n00b
Joined: 01 Oct 2007 Posts: 40
|
Posted: Sun Feb 24, 2008 11:36 am Post subject: |
|
|
Then I guess you would have to change the way ROX mounts your drives. Maybe there's a way to configure the mount commands it uses. If not, you would have to change it in the program's source code. |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6069 Location: Removed by Neddy
|
Posted: Sun Feb 24, 2008 11:49 am Post subject: |
|
|
bind mount _________________ #define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0; |
|
Back to top |
|
|
|