[lug] Musical Device IDs?
Zan Lynx
zlynx at acm.org
Mon Jan 29 15:39:58 MST 2007
On Mon, 2007-01-29 at 15:13 -0700, David Morris wrote:
> Ok, this is driving me crazy.
>
> I have a system running Debian Etch (testing) with the
> 2.6.18 kernel. AMD64 architecture. In this system I have
> an SATA controller with 1 (boot) hard disk, a SCSI
> controller with 2 hard disks and an external CompactFlash
> USB drive. All very standard stuff.
>
> The problem arises when I boot the system. The three
> controllers (SATA, SCSI, and USB) play musical chairs with
> their device IDs. Here is my "nominal" mapping:
>
> /dev/sda SATA hard disk (boot disk)
> /dev/sdb SCSI hard disk #1
> /dev/sdc SCSI hard disk #2
> /dev/sdd USB CompactFlash Drive
>
> When the system boots up, the SATA hard drive may end up
> being sda, sdb, sdc, *or* sdd. Sometimes it decides to mess
> with my mind and make me reboot the system a dozen times
> before the SATA hard drive lands on /dev/sda.
>
> Any ideas on how to put a stop to this insanity before I
> strangle the system?
Do not mount by drive letter. Here's a sample of my /etc/fstab from my
laptop. I'm using udev.
/dev/disk/by-uuid/eeca71d7-e22f-48e6-b500-48dca49d20a4 /boot reiserfs defaults,noatime,nodiratime,notail 1 1
/dev/disk/by-uuid/b35cd254-b64b-4432-b882-f4bdb0c36498 / reiser4 defaults,noatime,nodiratime 1 1
/dev/disk/by-uuid/fd35277a-8dc7-4afe-8257-fda61b757344 none swap sw 0 0
/dev/disk/by-label/Backup /media/Backup reiserfs defaults,noatime,nodiratime,noexec,nodev,user 0 0
/dev/disk/by-label/Backup2 /media/Backup2 reiserfs defaults,noatime,nodiratime,noexec,nodev,user 0 0
The newer kernels are using hotplug dynamic device discovery, and adding
multi-threaded bus probing in the future. Might as well bite the bullet
and accept that drive letters will never be the same again.
Instead of UUID and labels like I used, you could also use
udev's /dev/disk/by-path, where you can specify drives by the
controller's PCI bus ID, SCSI ID, and partition number. That's a bit
more Solarisey if you like that.
--
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20070129/d614bf9d/attachment.pgp>
More information about the LUG
mailing list