Originally Posted by
dcstar
Leave it in /etc/fstab and use the noauto option. You will then be able to mount it with a specific mount command and unmount it in the same way.
Hi dcstar,
First off all, thanks for your reply and sorry for getting back to you so late.
I tried your suggestion about adding noauto to the corresponding line in fstab; but I got error messages when trying to mount/unmount it from user space. I suppose that root privileges are required to mount and unmount a volume if it is listed in fstab.
For those interested, here is how I got it to work:
- I added the following line at the bottom of /etc/auto.master
Code:
/media/Local /etc/auto.pers --ghost
I had to tell autofs to use a subdirectory (I choose to call it 'Local' as I mount a local disk into it) of /media; I first tried to make autofs mount the content of auto.pers directly in /media, but that disturbed the mounting of other devices in /media.
- I created the /etc/auto.pers file with the following content, and with 644 (rw-r--r--) as permissions
Code:
#
# This is the /etc/auto.pers file.
#
backupVol -fstype=auto :/dev/disk/by-uuid/uuid_of_the_volume
Of course, you have to replace 'uuid_of_the_volume' with the real uuid of the volume. You can get the uuid by using the 'gnome-device-manager' application. It probably also works with the ':/dev/sdXY' notation for the volume to mount.
Finally, I had autofs already running for other mounts on my system and cannot tell now from the top of my head whether there are additional steps required to enable autofs.
Cheers,
Francesco.
Bookmarks