MD array's super-minor renamed on sysresccd boot

All other questions
Post Reply
Posts: 1
Joined: 08 Apr 2011, 18:57

MD array's super-minor renamed on sysresccd boot

Post by davethedave » 08 Apr 2011, 19:41

Background - Power cut, file system corruption. :(
Successful repair wıth sysresccd. :)

When the CD is booted it reads all the disks in the system in question and
assembles and *RENAMES* any MD arrays it finds, re-writing the super-minor
in the array meta data on the superblock.

File system repair complete, The machine then re-boots to a deader box than
before. Due to grub on the original system looking for array meta data to assemble
the boot partition which is now wrong. This may be a cause of panic. :/

All arrays have to be manually renamed to what the broken system is expecting
prior to reboot from the sysrescd.

Stop the array
mdadm -S /dev/md(sysresccd assigned number)

Reassemble the array as correct number for system and write super minor
mdadm -A /dev/md(desired number) -m(sysresccd assigned number) --update=super-minor

A dead handy mend it CD for anyones box of tricks. Would be handy if disk arrays were named
from their meta data instead of having a different / random? number written to them.
Saved my mp3s though.

Posts: 1
Joined: 12 May 2011, 21:55

You genius

Post by shinyblue » 12 May 2011, 22:07

Thanks for posting this.

Caused me great panic, too. I don't understand WHY it's necessary to alter the metadata. Seems odd that just by booting sysresccd you can leave your system unbootable.

I got mine booted again by

grub rescue> ls
(md125) (hd... etc etc.
grub rescue> root (md125)
grub rescue> prefix (md125)/boot/grub
grub rescue> insmod normal
grub rescue> normal

Then, with my OS booted as normal (nb. the OS still sees it as md0) I just did
$ grub-install /dev/md0
and voila.

But WHY this is necessary I have no idea. To be honest, I'm an amateur on RAID, though.

Post Reply