You are not logged in.

#1 2009-04-14 23:12:16

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

SATA vs IDE Switcheroo

Here's my setup on my desktop PC:
2 x IDE Hard Drives -> Software RAID-1 (for / and /boot)
2 x SATA Hard Drives -> LVM for (/home)

Everything works... Sometimes. Normally during boot, my IDE controller appears first, and the 2 IDE drives become /dev/sda and /dev/sdb, then the SATA drives become /dev/sdc and /dev/sdd. This is fine and everything boots.

However sometimes, my SATA controller seems to get in first, and the SATA drives are sda and sdb, and the IDE drives become sdc and sdd. This of course screws everything while assembling the md arrays and the system won't boot. Reboot a dozen times and eventually it gets it right. It also seems that if I edit my GRUB at the boot prompt to switch `md=1,/dev/sda1,/dev/sdb1 md=0,/dev/sda3,/dev/sdb3` and swap the sd[a,b] for sd[c,d] then it boots up in the opposite order neutral

Any ideas for how I can either force the devices to have the same order everytime, or assemble the RAID arrays by UUID? I would prefer option a), but will settle for b) if a) can't be done.

EDIT: md0 is my / partition and md1 is my /boot

Last edited by fukawi2 (2009-04-14 23:13:13)

Offline

#2 2009-04-14 23:37:25

suicideducky
Member
From: New Zealand
Registered: 2007-09-13
Posts: 57
Website

Re: SATA vs IDE Switcheroo

Just my two cents, IMO it would be far simplier to use UUIDs, unless you get the wanted module to load before the other one?!?

But I am not sure howto do this with SATA/IDE sorry >.<

Offline

#3 2009-04-14 23:42:48

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: SATA vs IDE Switcheroo

[stijn@amalthea ~]$ grep md0 /proc/mdstat 
md0 : active raid1 sdb5[0] sda5[1]
[stijn@amalthea ~]$ ls /dev/disk/by-uuid/ -l
totaal 0
lrwxrwxrwx 1 root root 10 apr 14 23:36 6713474c-629e-xxxx-xxxx-7566d50d7e2a -> ../../sdc5
lrwxrwxrwx 1 root root  9 apr 14 23:36 685107da-2e29-xxxx-xxxx-a117929999d7 -> ../../md0
lrwxrwxrwx 1 root root 12 apr 14 23:46 f0e91604-f291-xxxx-xxxx-4b77ab3a5a67 -> ../../loop/0

I use the UUID for my root partition (/dev/md0) in fstab, so it should be possible. It seems only the RAID 1 gets a UUID assigned, though - the RAID 5 (/dev/md1) never appears.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2009-04-15 00:58:07

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: SATA vs IDE Switcheroo

The problem is before mounting my root and /boot partitions, the problem is during the assembly of the RAID array... I don't think mdadm (or whatever does the assembly) supports UUID. And if it does, the partitions used as the array members don't appear to have a UUID:

fukawi2 ~  $ ll /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 28 2009-04-15 07:14 22c81e78-5ba2-4f5c-8934-94062f26b0e1 -> ../../mapper/vgData-torrents
lrwxrwxrwx 1 root root 10 2009-04-15 07:14 4bc0d48c-944c-4596-bf4b-606c7b8bb31c -> ../../sdd2
lrwxrwxrwx 1 root root 25 2009-04-15 07:14 50e97a3a-fcd9-47f2-ae03-66d1d9202041 -> ../../mapper/vgData-music
lrwxrwxrwx 1 root root 23 2009-04-15 07:14 5101f93f-8e71-49dc-9d28-7eee2945476f -> ../../mapper/vgSys-root
lrwxrwxrwx 1 root root 24 2009-04-15 07:14 5bfe53b6-0729-42bd-aff8-41e3ac654b25 -> ../../mapper/vgData-home
lrwxrwxrwx 1 root root 22 2009-04-15 07:14 7c3131ae-407c-4e90-b3f7-88066c6da464 -> ../../mapper/vgSys-var
lrwxrwxrwx 1 root root 10 2009-04-15 07:14 943dfd29-cfdd-41a5-9f18-9476d718967f -> ../../sdc2
lrwxrwxrwx 1 root root 27 2009-04-15 07:14 a9003746-1309-4289-92fc-897db71f8a18 -> ../../mapper/vgData-archive
lrwxrwxrwx 1 root root  9 2009-04-15 07:14 cbff0577-0d9d-493d-9a03-5ed6cf88f8e4 -> ../../md1
lrwxrwxrwx 1 root root 24 2009-04-15 07:14 f01828e1-ed32-47d0-a8d6-40367dc72ec1 -> ../../mapper/vgData-vbox

The sdX2 partitions are both normal swap partitions (not RAID)

Offline

Board footer

Powered by FluxBB