Log in

No account? Create an account

Josh-D. S. Davis

Xaminmo / Omnimax / Max Omni / Mad Scientist / Midnight Shadow / Radiation Master

Previous Entry Share Next Entry
I broke a disk in my array. But mdadm is my friend!
Josh 201604 KWP
sdj was offline (some media errors) and I couldn't export the VG to stop the array to force asemble it.
So i thought I'd remove the disk and readd it. Only, I didn't readd it. I added it. As a spare.

AHHHG! So I couldn't really "fix" this it seemed. Re-add after just added it as a spare again.

So I found info about mddump. I was hesitant, because it's from 2002 and I had to fix some source code issues (things that would be OK, but which gcc complains about now, not REAL problems, just an indication of the age of the code).

So, I dumped the superblocks, changed the state from spare to active, updated drive counts appropriately, and...

Blammo. Weird errors. Yah, I guess MD superblock format has changed since then.

So I try to restore the superblock backups I made, and, uh, yah, that didn't work either. In fact, now only one drive would assemble instead of 2.


So I thought I rememberes something, and I poked and prodded... and VOILA!

This command saved my bacon:

mdadm -C --verbose --assume-clean -l5 -n4 -c256 --metadata=0.90 \
--uuid=blah /dev/md4 /dev/sdj2 /dev/sdk2 /dev/sdl2 missing

Now, it all looks like it should (mostly)
root@recovery:~# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md4 : active raid5 sdl2[2] sdk2[1] sdj2[0]
1464356352 blocks level 5, 256k chunk, algorithm 2 [4/3] [UUU_]

  • 1
General geekery, but this is my personal storage array.

  • 1