lkml.org 
[lkml]   [2007]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Moving MD/LVM from PPC to x86
On Sunday July 8, turbo@bayour.com wrote:
> Quoting Neil Brown <neilb@suse.de>:
>
> > 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)

You --examine component devices of an array, not the whole array.

> ppc:~# mdadm --examine --metadata=0.swap /dev/sda1
> mdadm: No super block found on /dev/sda1 (Expected magic a92b4efc, got fc4e2ba9)

This suggests that the superblock is currently the correct byteorder
for the current host. You use
mdadm --examine --metadata=0.swap /dev/sda1

when you have moved a devices from one host to different host with the
opposite endian-ness (e.g. bigendian to littlendian).

>
> > 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?

I cannot remember where you were moving 'from' or 'to', but what you
have to do is:

1/ move the devices to the new computer.
2/ use "mdadm --examine" to make sure they are where you expect them
to be. Use "--metdata=0.swap" if the byteorder is different on
the new machine.
3/ Once you are satisfied that things look right, use
mdadm --assemble /dev/md0 --update=byteorder ....
to assemble the array. This will change the byteorder in the
superblocks. After you have done this, the array will assemble
normally on the new machine, but will not if you move it back to the
old machine. If you want to use the old machine again, you need to
use --update=byteorder again.
Does that make it clear?

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-09 07:39    [from the cache]
©2003-2011 Jasper Spaans