Skip to contentSkip to conversation

order of sd? drives and mdadm

DISCUSSION Yan Seiner 2 participants 2 messages Nov 5, 2007

lore
Share & tools
lore

Yan Seiner

author
#0 lore raw

I think I have a problem with device naming.

My machine consists of 2 identical SCSI drives, 6 identical SATA drives, and 1 USB drive. All show up as sd? devices.

The problem is that on boot, occasionally the machine fails to boot, with mdadm complaining it can't
start /dev/md0 and / doesn't exist.

I suspect what is happening is that the scsi devices change from the time the system boots up and when the kernel assigns the device names, in effect pulling the rug out from under mdadm.

I suspect this because the device names change from boot to boot, and I have to retry booting numerous times before I get the right combination.

So... Two questions:

1. Does this sound reasonable?

2. If so, how can I write rules to make sd device names sticky? I'm leery of just hacking away as if I really bugger things up I could make the machine unbootable.

Just from looking at things, it looks like I should be able to use

    KERNELS="2:0:2:0",  SUBSYSTEMS="scsi", NAME="sda"
    KERNELS="2:0:8:0",  SUBSYSTEMS="scsi", NAME="sdb"

and so on. Does that sound right? Where in the rules should I put this?

Thanks,

--Yan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw

also sprach Yan Seiner <[email protected]> [2007.11.05.1458 +0100]:

Quoted 1 line

2. If so, how can I write rules to make sd device names sticky?

Look into /dev/disks/by-id

Signature · 7 lines
martin | http://madduck.net/ | http://two.sentenc.es/
 
"you don't sew with a fork, so I see no reason
 to eat with knitting needles."
                               -- miss piggy, on eating chinese food
 
spamtraps: [email protected]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel