07.26.05

upset raid1

Posted in linux at 2:15 pm by Clinton

Setup:
2 x 80GB ATA HDD
Debian linux, 2.6.8… customised kernel (testing/stable)
Software raid1
ext3

We had 4 power drops last night. My second-hand UPS ($0) ain’t what it used to be.. something must have happened. investigation time.

Going over the logs (/var/log/messages) i saw that the server rebooted fine after the first power failure (5:35 am), and both disks were okay in the array on reboot.

At 6:07am the power fails again, the battery hasn’t charged fully - hard fail. :(

6:09am power returns. Server reboots automatically, and…

md: Autodetecting RAID arrays.
md: autorun ...
md: considering hdc1 ...
md:  adding hdc1 ...
md:  adding hda1 ...
md: created md0
md: bind
md: bind
md: running:
md: kicking non-fresh hda1 from array!
md: unbind
md: export_rdev(hda1)
raid1: raid set md0 active with 1 out of 2 mirrors
md: ... autorun DONE.

“non-fresh” eh? Whatever the hell that means… google time.

long story short.
After checking that the disk was okay with smartctl and hdparm I ended up typing
mdadm --assemble --force /dev/md0 /dev/hda1
and was told to go away because /dev/ md0 was already assembled. (Oh yeah. right).
So then i used
mdadm -a /dev/hd0 /dev/hda1
which worked! and the array started to rebuild the hda1partition. Then
watch -n 60 cat /proc/mdstat
just to keep track of progress. ~40mins later, all sync’ed. nice.

Comments are closed.