:spare ignored in setup-storage
Grant Root
groot at dayton-phoenix.com
Fri Jul 10 18:46:02 CEST 2009
I'm using FAI to set up a server with RAID1 and LVM (although I don't
think the LVM is relevant to this problem). The FAI version is
3.2.17~lenny1.
Essentially, I've placed the :spare option on one of the partitions in
each RAID1 array, but that partition is simply being added into the
array instead of being used as a hot spare.
I've probably just made some config mistake, because I'm having
trouble finding complete examples. If anyone can spot it, please let
me know.
Here's my config file. Note that I've also tried the "disk1", "disk1.1" etc.
notation instead of the "/dev/i2o/hda", "/dev/i2o/hda1" notation. Both
have exactly the same results.
disk_config /dev/i2o/hda disklabel:msdos bootable:1
primary - 10G - -
primary - 8G - -
primary - -100% - -
disk_config /dev/i2o/hdb disklabel:msdos bootable:1
primary - 10G - -
primary - 8G - -
primary - -100% - -
disk_config /dev/i2o/hdc disklabel:msdos bootable:1
primary - 10G - -
primary - 8G - -
primary - -100% - -
disk_config raid
raid1 / /dev/i2o/hda1,/dev/i2o/hdb1,/dev/i2o/hdc1:spare ext3
rw,errors=remount-ro
raid1 swap /dev/i2o/hda2,/dev/i2o/hdb2,/dev/i2o/hdc2:spare swap
sw
raid1 - /dev/i2o/hda3,/dev/i2o/hdb3,/dev/i2o/hdc3:spare - -
disk_config lvm
vg vg0 md2
vg0-lv0 /var/spool/samba 2G ext3 rw
vg0-lv1 /srv/samba -100% ext3 rw,acl
Here are the mdadm commands executed during the installation:
Executing: udevsettle --timeout 10 && yes | mdadm --create /dev/md0
--level=raid1 --force --run --raid-devices=3 --spare-devices=0
/dev/i2o/hda1 /dev/i2o/hdb1 /dev/i2o/hdc1
...
Executing: udevsettle --timeout 10 && yes | mdadm --create /dev/md1
--level=raid1 --force --run --raid-devices=3 --spare-devices=0
/dev/i2o/hda2 /dev/i2o/hdb2 /dev/i2o/hdc2
...
Executing: udevsettle --timeout 10 && yes | mdadm --create /dev/md2
--level=raid1 --force --run --raid-devices=3 --spare-devices=0
/dev/i2o/hdb3 /dev/i2o/hda3 /dev/i2o/hdc3
After installation, /proc/mdstat looks like this:
Personalities : [raid1]
md2 : active raid1 i2o/hdb3[0] i2o/hdc3[2] i2o/hda3[1]
274092928 blocks [3/3] [UUU]
[====>................] resync = 24.6% (67616768/274092928)
finish=70.1min speed=49026K/sec
md1 : active (auto-read-only) raid1 i2o/hda2[0] i2o/hdc2[2] i2o/hdb2[1]
8385856 blocks [3/3] [UUU]
resync=PENDING
md0 : active raid1 i2o/hda1[0] i2o/hdc1[2] i2o/hdb1[1]
10482304 blocks [3/3] [UUU]
unused devices: <none>
--
Grant Root
IT Supervisor, Dayton-Phoenix Group, Inc.
~~~~~ Randomly-Selected Thought for the Day ~~~~~
"The direct use of force is such a poor solution to any problem,
it is generally employed only by small children and large
nations." -- David Friedman
More information about the linux-fai
mailing list