So grub requires metadata version 0.90 I'm wondering if I can change my existing arrays to use that instead of the default which is 1.2. That way I don't have to go about a reinstall. If yes, how can I do it?


The GRUB wiki confirms:

Also, (as of 1.96+20080724) GRUB can only boot from RAID which uses a Version 0.90 metadata superblock (i.e. one created with the --metadata=0.90 option to mdadm).

Curiously, the man page for mdadm says

-e , --metadata=

Declare the style of superblock (raid metadata) to be used. The default is 0.90 for --create, and to guess for other operations.

I'd double check with mdadm -Q -D <device> to be certain.

After that, What RAID level are you running? The best scenario I can think of for a mirror (RAID 1) would be

  1. Take backups
  2. Unmount array 0
  3. Remove device A from array 0 of n devices
  4. Zero superblock on device A
  5. Create array 1 using device A and n-1 spares, explicitly using old superblock format
  6. Repeat for remaining B through n-1 devices
  7. (Optional) re-number the array

... but very definitely check that you absolutely need to go through with this!

  • so I confirmed that a long time ago. I'm running raid10,f2. obviously recreateing the array was what I was trying to avoid. Jun 15 '10 at 10:16
  • Have you tried the linux-raid at vger.kernel.org mailing list?
    – Andrew
    Jun 15 '10 at 22:48
  • odd that I didn't get a notification about this. no I didn't try. I just wiped it and recreated the array. I'm going to accept this answer with the short solution of it being NO or perhaps (ridiculously difficult) Jul 18 '10 at 1:35

This information is probably too late to help the OP, but maybe it will help someone else.

The first command wipes the super blocks and the second command creates a new array but assumes the devices are clean. I have just performed this and everything appears to be OK. I would definitely recommend a backup before doing this. I had no data to lose and therefore no integrity to check. I just wanted to avoid another 4 hour resync.

$ mdadm --zero-superblock /dev/sd[a-z]1
$ mdadm --create /dev/md0 --assume-clean \
    --level=10 --raid-devices=10 /dev/sd[a-z]1 --metadata=0.90
  • 1
    probably too late for the OP but you saved me, thanks for your answer
    – neofutur
    Jun 9 '12 at 1:18

Creating an array with assume-clean and inconsistent metadata as suggested above certainly has potential to damage existing data, as 0.90 and 1.2 metadata blocks not only differ in size but also location.

it may work for 0.90 <-> 1.0, which is an exception.



I needed to make a metadata=1.2 type RAID-array /dev/md3, consisting of devices /dev/sdb1 and /dev/sdc1, being an array with metadata=0.90 and this is what I did and recommend:

First I created mount points appropriate for my setting (maybe it is a good idea to read the whole story before starting to adapt it to your situation):

mkdir -p /mnt/md/3
mkdir -p /mnt/md/100

Remove sdc1 from md3 and mount it as a new, temporary array:

umount /dev/md3
mdadm /dev/md3 --fail /dev/sdc1 --remove /dev/sdc1
mdadm --create --level=1 --raid-devices=2 --run /dev/md100 /dev/sdc1 missing
mount /dev/md100 /mnt/md/100

Stop old md3-array and create it new with metadata==0.90 and with new filesystem:

mdadm --stop /dev/md3
mdadm --create /dev/md3 --metadata=0.90 --level=1 --raid-devices=2 /dev/sdb1 missing
mkfs.ext4 /dev/md3

Mount it and copy all data from temp-array md100 to md3 (rsync is a good tool as it copies e.g. symlinks as they are, so you get a real copy; if you like to see what happens, you can add the option --progress to rsync):

mount /dev/md3 /mnt/md/3
rsync -az /mnt/md/100/ /mount/md/3/

After rsync finished remove temp-array md100 and add sdc1 to the newly created md3:

umount /dev/md100
mdadm --stop /dev/md100
mdadm /dev/md3 --add /dev/sdc1

That's it. With

cat /proc/mdstats

you can watch syncing, if you like.

Finally: Backups are always a good thing, with md5sum you could check, if files remain the same after all the actions - and take care to translate my example to your situation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.