[Ma-linux] SCSI drive assignments; how to set order?
lug-user at drmikehenry.com
Sat Sep 5 07:21:23 EDT 2009
On 09/04/2009 03:07 PM, Nick Danger wrote:
> David wrote:
> > SPARC Linux
> > So I'm trying to add more SCSI drives to Tux's SPARC Linux box.
> > Here is the hassle. When I add more drives, on an added
> > controller; they are detected at boot. But Linux assigns the
> > drive names (/dev/sda, /dev/sdb, etc) in some manner of its
> > own choosing.
> Is this a newer distro that supports UIDs in the /etc/fstab?
I'm using UUIDs (note: UID was a typo) on my Fedora 11 systems,
and it works nicely. UUIDs are Universally Unique IDs
(Identifiers), and they are basically large random numbers
constructed in such a way that they are almost certain to be
unique in the world. An example UUID from the manpage (man
Instead of mounting by device node something like this:
/dev/sda1 / ext3 defaults 1 1
You mount by UUID like this:
UUID=3e6be9de-8139-11d1-9106-a43f08d823a6 / ext3 defaults 1 1
You can enumerate the UUIDs on your system via the blk_id
/dev/sda1: UUID="3e6be9de-8139-11d1-9106-a43f08d823a6" TYPE="ext3"
I'm not sure how recently support for identifying partitions by
UUID came about. A similar but inferior method involves
labeling a partition with an identifier, and locating the
partition based on this identifier. I think this was around
before the UUID support, so if your system is too old for UUIDs,
perhaps labels would still work. One downside of the
label-based system is how labels were often chosen. The
installer chose names such as "HOME" or "ROOT". This is fine
until you bring over a disk from another system and now have two
partitions labeled "HOME". In any event, you can try using
labels by assigning a label to a partition:
$ e2label /dev/sda1 MY_ROOT_LABEL
Then you can mount by label in /etc/fstab:
LABEL=MY_ROOT_LABEL / ext3 defaults 1 1
You can of course make your labels be arbitrarily unique within
the 16-character limit imposed by the e2label command.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ma-linux