On Sat, Dec 31, 2005 at 11:44:32AM +1100, Daniel Pittman wrote: } Mitchell Laks <mlaks@xxxxxxxxxxx> writes: } } G'day Mitchell. } } > I notice on my system that the hard drives "device names" can change. } > } > The hard drives are connected to the motherboard SATA connectors or to } > PCI SATA cards. They get different "names" /dev/sda or /dev/sdc } > depending how many of the cards are "active". } > } > For instance the hard drives on the motherboard itself are called } > /dev/sde and /dev/sdf if there are hard drives on the 2 PCI cards and } > are called /dev/sda and /dev/sdb if there are none. } } Well, one solution is udev, but since you prefer to avoid that... [...] I have an 8-tray SCSI hotswap rack, and I had a similar problem. I use scsidev, from the scsitools package (under Debian, at least), to create appropriately named block devices at boot before mdadm starts any md devices. My /etc/scsi.alias: id=0, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack0 id=1, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack1 id=2, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack2 id=3, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack3 id=8, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack4 id=9, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack5 id=10, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack6 id=11, hostname="Adaptec AIC7XXX", devtype=disk, alias=rack7 Now, this is just matching by SCSI id (and SCSI host) since I don't want to have to reconfigure on hotswap and the tray position controls the SCSI id, but it can match by any combination of manufacturer, serial_number, model, rev, wwid, lun, chan, hostname, hostid, and hostnum. Running scsidev -f will create block devices in /dev/scsi; I have /dev/scsi/rack[0-7]. Then my /etc/mdadm/mdadm.conf looks like this: DEVICE /dev/scsi/rack[01234567] ARRAY /dev/md0 devices=/dev/scsi/rack0,/dev/scsi/rack1,/dev/scsi/rack2,/dev/scsi/rack3,/dev/scsi/rack4,/dev/scsi/rack5,/dev/scsi/rack6,/dev/scsi/rack7 Very simple, very easy. The scsitools package includes scsiinfo, which should work on SATA (or ieee1394, or USB) drives to retrieve serial numbers. } Regards, } Daniel --Greg - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html