[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RAID question



Hi all,
I am running woody on a machine with 2 identical SCSI drives. / got mounted on 
/dev/sda1, /usr, /var, /tmp and /home on mirrors  /dev/md1-4, respectively.
Unfortunately "some" boot-script insists on initializing the RAIDs starting at 
/dev/md0, although I never even created this RAID-device, neither in 
mdadm.conf nor in fstab.
This has the consequence that md0 (actually md1, if I were asked) does not get 
mounted - which is a major PITB, because /usr usually IS needed!
Of course, the intention behind all this was to put / on /dev/md0 later on, 
when I got the 're-attaching a degraded mirror and all' figured out.. this is 
not the question here!).
Either this behavior is intended (mdadm-0.72 from woody does it, as does 
mdadm-1.2 from unstable, which is what I'm running now), or it is really a 
bug.
Why does mdadm have to start counting at 0? That would mean, that the 
array-definitions in mdadm.conf are simply ignored?! So why bother at all?
What would happen if I were to decide putting /usr on an nfs mount is a great 
idea, would all the /dev/md(x>1) have their minor changed on next reboot, 
just because /dev/md1 got deleted? What a mess! 
I had hoped that the use of UUIDs for the RAIDs would effectively prevent such 
problems.

So, this is what my /etc/mdadm/mdadm.conf looks like:

DEVICE /dev/sda5 /dev/sdb5 /dev/sda6 /dev/sdb6 /dev/sda7 /dev/sdb7 /dev/sda8 
/dev/sdb8

ARRAY /dev/md1 level=raid1 num-devices=2 
UUID=ac3ebad4:22e38325:f056951a:575a466c
devices=/dev/sda5,/dev/sdb5
ARRAY /dev/md2 level=raid1 num-devices=2 
UUID=c7ceba6d:90b75c9a:2d374aa8:974ca746
devices=/dev/sda6,/dev/sdb6
ARRAY /dev/md3 level=raid1 num-devices=2 
UUID=0cdb65ec:23245a89:d2edb614:27c39e9c
devices=/dev/sda7,/dev/sdb7
ARRAY /dev/md4 level=raid1 num-devices=2 
UUID=9270f7be:137fc0bc:edf0c498:a53e09da
devices=/dev/sda8,/dev/sdb8

and my /etc/fstab:

/dev/sda1       /               ext3    errors=remount-ro       0       1
/dev/sda2       none            swap    sw                      0       0
/dev/sdb2       none            swap    sw                      0       0
proc            /proc           proc    defaults                0       0
/dev/md3        /tmp            ext3    defaults                1       1
/dev/md1        /usr            ext3    defaults                1       1
/dev/md2        /var            ext3    defaults                1       1
/dev/md4        /home           ext3    defaults                1       1
/dev/fd0        /floppy         auto    user,noauto             0       0
/dev/cdrom      /cdrom          iso9660 ro,user,noauto          0       0

Did I overlook anything?
Any suggestions are welcome. 
Thanks
--
regards,
Jochen Rosenbauer



Reply to: