D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Permanently sharing a USB disk ...

 

tom wrote:
> I've got a 400G USB drive I want to share for network storage.
> When I plug it into the machine it automounts as /media/disk
> Will it always automount as this or is there some way I can somehow
> hardwire it to some mount point for sharing?

Add an entry to /etc/fstab to force it to mount somewhere, this will
also ensure it mounts when no one is logged in, or the logged in user
lacks privileges.

Probably best to use the UUID or LABEL syntax for USB drives in case
they are inserted in a different order and get different device names.

You can do individual devices this way, although for some set-ups it
makes sense to convert all devices to UUID I wouldn't change more than
you need to in fstab because if you get it wrong it can be tricky.

http://linux.byexamples.com/archives/321/fstab-with-uuid/

For my sinces my USB drive is always plugged in at boot, so I have:
/dev/sdb1       /verbatim       ext3    rw,users,exec,dev,suid  0       2

In /etc/fstab, but I'm suggesting you do something like:

$ /sbin/blkid /dev/sdb1
/dev/sdb1: LABEL="VERBATIM" UUID="5481517c-1d8d-417c-96e3-bdd53826284b"
TYPE="ext3"


UUID=5481517c-1d8d-417c-96e3-bdd53826284b       /verbatim       ext3
rw,users,exec,dev,suid  0       2

Obviously you have to pick suitable options.

NB: I've since modified my drive to use UUID, so thanks for asking the
question.

 Simon


-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html