[olug] controlling Linux's assignments of sda, sdb, etc.

Obi-Wan obiwan at jedi.com
Wed Jul 27 17:37:30 UTC 2011

> This is what I've used for 2 usb drives that are randomly inter-changed
> in one of my systems....
> <from fstab>
> UUID=8ec052d6-c43c-45c8-8d11-d3d876890297       /media/mediabay        
> ext3 defaults 1 0
> UUID="a5f30842-7421-4750-8f62-3298bb3acbc6"     /media/pocket          
> ext3 defaults 1 0
> </from fstab>

Mounting isn't an issue.  I always label my filesystems when I create
them, then mount them by label:

LABEL=ST120GB		/			ext3	defaults,errors=remount-ro	0	1
LABEL=SAM1.5TBswap	none			swap	sw,pri=4	0	0
LABEL=WD1.5TBswap	none			swap	sw,pri=3	0	0
LABEL=ST1.5TBswap	none			swap	sw,pri=2	0	0
LABEL=ST120swap		none			swap	sw,pri=1	0	0
LABEL=HomeFS		/home			ext4	defaults	0	2
LABEL=SAM1.5TBboot	/mnt/backup-boot	ext4	defaults,noauto	0	0
LABEL=SAM1.5TBroot	/mnt/backup-root	ext4	defaults,noauto	0	0
LABEL=BackupFS		/mnt/backup-home	ext4	defaults,noauto	0	0

The advantage that labels have over UUID's is that it's immediately
obvious at first glance which filesystem I'm referencing.

Of course, none of this helps my SNMP problem, so I'm still screwed there.

Ben "Obi-Wan" Hollingsworth    obiwan at jedi.com    PrairieRimImages.com
   The stuff of earth competes for the allegiance I owe only to the
     Giver of all good things, so if I stand, let me stand on the
       promise that You will pull me through.  -- Rich Mullins

More information about the OLUG mailing list