Software raid 1 w/raidhotadd
Last night I finally got around to reinstalling one of my systems, this
one has a nice SCA hot swap backplane. So I configured it with 2 18GB disks
in software raid 1(4 partitions). There is nothing important on this system
yet but I was curious about how to recover from a disk failure, so I yanked
one of the disks.
within a few seconds the system correctly detected the disk was gone(no
crash! woo, with 3ware it always crashed :) ), about 10 minutes later I
re-inserted the disk, but am unable to trigger the system to rebuild the
array. From reading of the docs I think I'm supposed to use the command
raidhotadd. The docs specify rebooting, but I am curious if it is possible
to do so without rebooting. The disk is detected correctly:
tux:/var/log# fdisk -l /dev/sdb
Disk /dev/sdb: 255 heads, 63 sectors, 2213 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 2 16033+ 83 Linux
/dev/sdb2 3 2213 17759857+ 5 Extended
/dev/sdb5 3 63 489951 fd Linux raid autodetect
/dev/sdb6 64 428 2931831 fd Linux raid autodetect
/dev/sdb7 429 914 3903763+ fd Linux raid autodetect
/dev/sdb8 915 2189 10241406 fd Linux raid autodetect
/dev/sdb9 2190 2213 192748+ 82 Linux swap
running mdadm(another fun tool I found last night while doing this) shows:
mdadm -D /dev/md0
/dev/md0:
Version : 00.90.00
Creation Time : Tue Jan 21 23:20:45 2003
Raid Level : raid1
Array Size : 489856 (478.37 MiB 501.61 MB)
Device Size : 489856 (478.37 MiB 501.61 MB)
Raid Disks : 2
Total Disks : 2
Preferred Minor : 0
Persistance : Superblock is persistant
Update Time : Wed Jan 22 12:19:39 2003
State : dirty, no-errors
Active Drives : 1
Working Drives : 1
Failed Drives : 1
Spare Drives : 0
Number Major Minor RaidDisk State
0 8 5 0 active sync /dev/sda5
1 8 21 1 faulty /dev/sdb5
UUID : 4385b9f4:77f31c15:a9d8048c:483e71c8
but when I try raidhotadd, it says the disk is busy:
tux:/var/log# raidhotadd /dev/md0 /dev/sdb5
/dev/md0: can not hot-add disk: disk busy!
/proc/mdstat shows:
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 sdb5[1](F) sda5[0]
489856 blocks [2/1] [U_]
md1 : active raid1 sdb6[1](F) sda6[0]
2931712 blocks [2/1] [U_]
md2 : active raid1 sdb7[1](F) sda7[0]
3903680 blocks [2/1] [U_]
md3 : active raid1 sdb8[1](F) sda8[0]
10241280 blocks [2/1] [U_]
unused devices: <none>
I am just playin with it to see what happens. would be nice if I could
get it to rebuild w/o rebooting, I haven't noticed any documentation that
specifically says I have to reboot, I just think it reccomends it since
most systems don't support hot swap.
anyone tried this before? any hints?
running debian 3.0r1 with kernel 2.4.20
thanks
nate
Reply to: