You are not logged in.

#1 2008-11-09 03:26:32

Stalafin
Member
From: Berlin, Germany
Registered: 2007-10-26
Posts: 617

Proper way of mounting external hard drive - fstab rules?

I have an external hard drive with all my music on it, and I want MPD to play this music. Now I was wondering how best to mount my external, such that MPD can actually access the music.

I was told to create an fstab entry with the UUID of my external to have it being mounted to a fixed spot. But this only works during boot up, correct?

What should I do, if I plug in the external after boot up? Is there a way to have it automounted to the same fixed spot as defined in fstab (maybe even using fstab)?

Offline

#2 2008-11-09 03:35:58

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Proper way of mounting external hard drive - fstab rules?

If you use GNOME or KDE you could use their automounting tools. Otherwise, adding the entry to fstab with the auto option will mount it automatically at boot.

Offline

#3 2008-11-09 07:33:43

qdiesel
Member
Registered: 2008-05-19
Posts: 61

Re: Proper way of mounting external hard drive - fstab rules?

create a file /etc/udev/rules.d/061-usb-storage and restart udev

 KERNEL=="sd*[0-9]", SUBSYSTEMS=="usb", RUN+="mount /dev/disk/by-uuid/$env{ID_FS_UUID_ENC}"

everyone feel free to correct me smile

Last edited by qdiesel (2008-11-09 07:54:59)

Offline

#4 2008-11-09 11:19:51

von_Wanderlust
Member
Registered: 2008-11-03
Posts: 67

Re: Proper way of mounting external hard drive - fstab rules?

As iBertus mentioned, you can use the automount features of different desktops. XFCE includes the Thunar file manager which can also be used in other lightweight desktops.

If on the command line, pmount will let you mount the drive as a normal user, and without any fstab entries. This command will mount USB device sdb1  to /media/Stalafin.

pmount /dev/sdb1 Stalafin]

The cool thing about pmount is that if the drive/partition is encrypted with LUKS, you can throw other options at it and it will decrypt and mount at the same time. cool

Offline

Board footer

Powered by FluxBB