/dev/md0 RAID
problem and how to fix it
Due to the replacement by mdadm over raidtools, /dev/md0 failed to work well with mdadm. It seems /dev/md0 is called a legacy array without a superblock in mdadm. Anyway, /dev/md0 is raid1 with /dev/sdb1 and /dev/sdc1 mirroring.
Useful mdadm commands:
- Assemble
- mdadm -As /dev/md0 (with /etc/mdadm.conf to scan)or mdadm -A /dev/md0 /dev/sdb1 /dev/sdc1
- Query
- mdadm -Q -D /dev/md0 (-D gives more detailed)
- Examine
- mdadm -E /dev/md0
Solution I:
- stop the array and release sdb1 and sdc1
mdadm -S /dev/md0and mount either of them to /db.
Solution II:
- bind the 1st drive
mdadm -A /dev/md0 /dev/sdc1(it seems /dev/sdb1 is not the 1st drive. Same command with /dev/sdb1 failed) - optional. start md0
mdadm -R /dev/md0(this is necessary only ifmdadm -S /dev/md0has been executed) - add another drive,
mdadm /dev/md0 -a /dev/sdb1(this will resynch md0) - check resynching status,
cat /proc/mdstat
Solution III(2006-09-08):
- directly assemble the whole md0
mdadm -A /dev/md0 /dev/sdc1 /dev/sdb1. and it's done. - probably the new sbc(good) makes it possible.
2006-08-24
- sdb1 is the mounted one. sbc1 is old(bad one).
- log from log_05
2006-09-08
Luigi changed the bad one(sbc) and back to /dev/md0.
11/22/05 new problem
scsi1: ERROR on channel 0, id 1, lun 0, CDB: Read (10) 00 16 d5 79 bf 00 00 80 00
Current sdc: sense key Medium Error
Additional sense: Unrecovered read error - auto reallocate failed
end_request: I/O error, dev sdc, sector 383089087
raid1: sdc: unrecoverable I/O read error for block 383089024
It turned out this problem was incurred because i mounted /dev/md0 while it's synching.