Re: Moving MD/LVM from PPC to x86
From: Turbo Fredriksson
Date: Sun Jul 08 2007 - 16:15:40 EST
Quoting Neil Brown <neilb@xxxxxxx>:
> Version 0.90 MD superblocks (still the default) uses host-endian
> values so you cannot move between architectures directly. However
> isn't too hard to make it work.
> Firstly, use
> mdadm --examine --metadata=0.swap /dev/DEVICE
----- s n i p -----
ppc:~# mdadm --examine --metadata=0.swap /dev/md0
mdadm: No super block found on /dev/md0 (Expected magic a92b4efc, got 00000000)
ppc:~# mdadm --examine --metadata=0.swap /dev/md1
mdadm: No super block found on /dev/md1 (Expected magic a92b4efc, got 00000000)
ppc:~# mdadm --examine --metadata=0.swap /dev/md2
mdadm: No super block found on /dev/md2 (Expected magic a92b4efc, got 00000000)
ppc:~# mdadm --examine --metadata=0.swap /dev/sda1
mdadm: No super block found on /dev/sda1 (Expected magic a92b4efc, got fc4e2ba9)
ppc:~# mdadm --examine --metadata=0.swap /dev/sda
mdadm: No super block found on /dev/sda (Expected magic a92b4efc, got 00000000)
ppc:~# mdadm --examine --metadata=0.swap /dev/sdb
mdadm: No super block found on /dev/sdb (Expected magic a92b4efc, got 00000000)
ppc:~# mdadm --examine --metadata=0.swap /dev/sdb1
mdadm: No super block found on /dev/sdb1 (Expected magic a92b4efc, got fc4e2ba9)
ppc:~# mdadm --examine --metadata=0.swap /dev/sdc
mdadm: No super block found on /dev/sdc (Expected magic a92b4efc, got 00000000)
ppc:~# mdadm --examine --metadata=0.swap /dev/sdc1
mdadm: No super block found on /dev/sdc1 (Expected magic a92b4efc, got fc4e2ba9)
ppc:~# cat /proc/mdstat | grep ^md
md2 : active raid1 sdb1[0]
md1 : active raid1 sdc1[0]
md0 : active raid1 sda1[0]
----- s n i p -----
Now what?
> to check that you have the right devices.
> Then
>
> mdadm --assemble /dev/md0 --update=byteorder /dev/DEV0 /dev/DEV1 ....
>
> That should assemble the array and update the superblocks so that they
> are in the right byteorder and will assemble easily in future.
Is this safe, changing the byteorder on all the physical devices (that are
part of my MD's)?
Will it still work on the PPC?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/