Bug#534470: Using mdadm 2.6.7.2 to assemble a raid array created withmdadm 1.9.0 will corrupt it making mdadm 1.9.0 to fail when trying to reassemble

RUSSOTTO François-Xavier 200103 francois-xavier.russotto at cea.fr
Fri Jun 26 17:10:32 UTC 2009


Hi Neil,

As you suggested, I rebuilt the initrd.img file, after re-creating the array
with --assume-clean, mounting the array, then chrooting to the mount-point.
For people reading this who would get the same troubles as me, this gives:

$ mdadm --create /dev/md0 --level=raid5 --raid-devices=3 --auto=yes --assume-clean /dev/sda2 /dev/sdb2 /dev/sdc2
$ mount /dev/md0 /mnt/md0
$ chroot /mnt/md0
$ mkinitrd -o /boot/initrd.img-2.6.8-2-mckinley-smp 2.6.8-2-mckinley-smp   # 2.6.8-2-mckinley-smp is the kernel version I use
$ cp /boot/initrd.img-2.6.8-2-mckinley-smp /efi/efi/debian/initrd.img   # needed to copy initrd image to the efi partition; normally elilo does this

And this worked ! my server booted again ! I just got some few more troubles
with the 2nd raid that didn't want to reassemble and so got the maintenance
prompt at boot for manual operation; I just reassembled manually the 2nd
raid, mounted it, updated the mdadm.conf file (don't know if this was
needed) and remade the initrd.img file:

$ mdadm --assemble /dev/md1 --auto=yes /dev/sda3 /dev/sdb3 /dev/sdc3	# as for md0, this raid obviously needed to be previously re-created with --assume-clean
$ mount /mnt/md1		# mount-point of /dev/md1 in fstab
$ mdadm --examine --scan > /etc/mdadm/mdadm.conf
$ mkinitrd ... # same commands as above

Then, the server went back to a fully operational state ! gracefully on
Friday evening 6:00pm ... thanks god. That was not a peace of cake.

Anyway, I thank you very much for you help and cooperation that were very
helpful.

In order to prevent this to happen again to somebody else, may I suggest
that an update is made to mdadm so that assembling of an array that has been
created with an older version of mdadm cannot be performed without STRONG
WARNING and confirmation from the user. This is quite astounding that mdadm
can deadly damage an older raid array simply by performing an assembly which
you can expect should not make any change to the disk.

Best regards,
Francois-Xavier Russotto






More information about the pkg-mdadm-devel mailing list