>>>>> On Tue, 4 Apr 2000, "Gregory" == Gregory Leblanc wrote:

  +> I've found some cash, and want to add a spare disk to our
  +> raid5 array for
  +> added redundancy.

  +> Can this be done? It is a matter of

  +> 1. raidstop
  +> 2. add spare to raidtab
  +> 3. raidhotadd spare

  Gregory> This gives you a hot spare, is that what you want?


Yes, I want to add a spare disk. I added the following to my /etc/raidtab:


    device                  /dev/hdd1
    spare-disk              0

and changed nr-spare-disks from 0 to 1. Then I did a raidhotadd. The disk was 
larger than the rest by a bit, but I figured that extra space would just be 
wasted. The disk seemed to add in just fine, but mdstat looked like:

[root@osmin /root]# cat /proc/mdstat 
Personalities : [raid5] 
read_ahead 1024 sectors
md1 : active raid5 hdd1[4] hdk1[3] hdi1[2] hdg1[1] hde1[0] 100251264 blocks level 5, 
32k chunk, algorithm 2 [4/4] [UUUU]
unused devices: <none>

The 4/4 and unused devices <none> left me wondering if my spare was 
recognised. I mean I see it in the md1 line above, but did it add as a spare? 
Anyway, because of the as yet unexplained and very scary:

raid5: bug: stripe->bh_new[2], sector 9846456 exists

I had done this all in single-user mode, so I had no logs to examine. After my 
first multi-user boot, I see the following:

raid5 personality registered
md1: max total readahead window set to 384k
md1: 3 data-disks, max readahead per data-disk: 128k
raid5: spare disk hdd1
raid5: device hdk1 operational as raid disk 3
raid5: device hdi1 operational as raid disk 2
raid5: device hdg1 operational as raid disk 1
raid5: device hde1 operational as raid disk 0
raid5: allocated 4248kB for md1
raid5: raid level 5 set md1 active with 4 out of 4 devices, algorithm 2

which seems to indicate that everything is kosher. Still not sure about the 
partition size mismatch, guess I'll find out when one trips and the 
reconstruction begins. 

  +> or is it more a matter of

  +> 1. raidstop
  +> 2. cry
  +> 3. mkraid with the "I really mean it"
  +> 4. restore data from backup

  Gregory> This lets you expand the capacity of the RAID, is that what you want?
  Gregory> Greg

No, I definitely wanted a spare. Thanks for the reply!

-Darren


Reply via email to