Subject: Bad Drive Gone Good - Was RE: RAIDframe Bad Crash
To: None <>
From: Caffeinate The World <>
List: current-users
Date: 04/16/2003 00:06:38
If you followed my adventure in configuring RAIDframe and ended up
finding out that one sd1 had read errors. Here is how I saved that
drive. I hope my experience is of some use to some one.

I'd recommend you test the entire drive with:

  dd if=/dev/rsd1c of=/dev/null bs=1m

to see if there are any bad blocks before making the raid. 

I copied using pax from sd0{a,d,e} to a temporary raid using sd1{a,d,e}
called raid{0,2,3} (1 was for swap) respectively. During that whole
copying from sd0x to raidx, I didn't get a single error. It was only
during the reconstruct from raid0 to sd0a (spare) that raid frame
crashed. See previous thread for more details.

Luckily I didn't lose any data. Copied my data to sd0 and restarted. I
wanted to see if I could save sd1. So I unconfigure all the raids:

# raidctl -u raid0
# raidctl -u raid1
# raidctl -u raid2
# raidctl -u raid3

Check just to make sure:

# raidctl -s raid0
raidctl: ioctl (RAIDFRAME_GET_INFO) failed: Device not configured

See if low level format can remap the bad blocks:

# scsictl /dev/rsd1c format

Get some coffee. Low level format a long process.

Check the entire drive again:

# dd if=/dev/rsd1c of=/dev/null bs=1m
8683+1 records in
8683+1 records out
9104953344 bytes transferred in 958.522 secs (9498950 bytes/sec)

Looks like the bad blocks were remapped successfully otherwise you'd
get an error and maybe hear one or two hard ZZZzzz ZZzzz from the HD.

Now you can repeat the raid configuration process. Back up all data!
Many thanks to Greg!


Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo