You are not logged in.

#1 2008-12-05 14:25:25

kaaposc
Member
From: Latvia
Registered: 2008-07-16
Posts: 30

RAID on changing device nodes - Custom solution

Hello!

I have computer with two SATA disks partitioned and mirrored. I also have some kind of many-in-one card reader plugged on one of internal USB pins. Linux kernel sees 2 disks from SATA and four from that card reader. They all go with /dev/sd* names but not always in the same sequence. Sometimes SATA disks get /dev/sd{a,b}, but sometimes /dev/sd{e,f} because card reader's devices came first (a-d). That is why using kernel parameters like md=0,/dev/sda1,/dev/sdb1 would not work. So I figured out one workaround..

First edit /lib/initcpio/hooks/raid, comment out the line saying about mdassemble, add these lines:

/sbin/mdadm.static -Esc partitions >> /etc/mdadm.conf
/sbin/mdadm.static -As

just above closing "}".
Then edit /etc/mkinitcpio.conf, in BINARIES add "/sbin/mdadm.static"

sidenote: I was not sure if dynamic "mdadm" would work so I used .static one

in FILES add "/etc/mdadm.conf" and in HOOKS add (of course) "raid". GRUB sits on first partition (or MBR? or both wink) of each disk, menu.lst says "root (hd0,0)" and kernel parameter "root=/dev/md2" (because /dev/md2 is made up from third partition of both disks and used as "/")

I hope I have not forgotten anything and hope it will be useful to anybody smile

Last edited by kaaposc (2008-12-05 14:26:18)

Offline

#2 2008-12-05 16:24:39

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: RAID on changing device nodes - Custom solution

You could simply use /dev/disk/by-id/... to properly identify your drives.


1000

Offline

#3 2008-12-05 19:04:16

RedShift
Member
From: Belgium
Registered: 2004-07-16
Posts: 230

Re: RAID on changing device nodes - Custom solution


:?

Offline

Board footer

Powered by FluxBB