HowToForums.net Forum Index HowToForums.net
An Open Source of Knowledge
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Howto Mount you external USB/IEEE disks using volume labels

 
Post new topic   Reply to topic    HowToForums.net Forum Index -> Linux Tips & Tricks
View previous topic :: View next topic  
Author Message
jacob
Site Admin
Site Admin


Joined: 16 Mar 2006
Posts: 73
Location: USA

PostPosted: Thu Mar 23, 2006 1:48 pm    Post subject: Howto Mount you external USB/IEEE disks using volume labels Reply with quote

Originally Posted At: http://www.ubuntuforums.org/showthread.php?t=139535

Having more than one external drive makes it difficult to mount them at the same point if you plug and unplug this drives in different orders.

For example the first external usb drive attached will always get the device /dev/sda the second /dev/sdb, etc

a fstab line like
Code:

/dev/sda1       /media/usb120gb   ext3 defaults                 0       0
/dev/sdb1       /media/usb300gb   ext3 defaults                 0       0


won't mount your 120gb drive at /media/usb120gb if you attach the 300gb drive first.

At least with following filesystems you can easily get this fixed:
ext2, ext3, XFS, JFS,Reiserfs.

Just do
Code:

tune2fs -L usb120gb /dev/sda1
tune2fs -L usb300gb /dev/sdb1


This gives you partition/disk a label.
Check with: dumpe2fs

Then you can (auto)mount them the right way using following fstab:
Code:

LABEL=usb120gb /media/usb120gb ext3 defaults 0 0
LABEL=usb300gb /media/usb300gb ext3 defaults 0 0


"thanks magisterludi at ubuntu for this wonderful tip"
_________________
JB
--
"You only see what your eyes want you to see"
Back to top
Display posts from previous:   
Post new topic   Reply to topic    HowToForums.net Forum Index -> Linux Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group