mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Turbo Fredriksson <turbo@bayour.com>
Cc: linux-kernel@vger.kernel.org, Alasdair G Kergon <agk@redhat.com>
Subject: Re: Moving MD/LVM from PPC to x86
Date: Mon, 9 Jul 2007 15:34:28 +1000	[thread overview]
Message-ID: <18065.51428.849286.225118@notabene.brown> (raw)
In-Reply-To: message from Turbo Fredriksson on Sunday July 8

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

  reply	other threads:[~2007-07-09  5:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 21:02 Turbo Fredriksson
2007-06-29 21:54 ` Alasdair G Kergon
2007-06-30  9:09   ` Turbo Fredriksson
2007-06-30  9:33     ` Neil Brown
2007-07-02 14:52       ` John Stoffel
2007-07-04 19:05       ` Turbo Fredriksson
2007-07-08 20:15       ` Turbo Fredriksson
2007-07-09  5:34         ` Neil Brown [this message]
2007-07-09  9:48           ` Turbo Fredriksson
2007-07-11  9:24           ` Turbo Fredriksson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18065.51428.849286.225118@notabene.brown \
    --to=neilb@suse.de \
    --cc=agk@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=turbo@bayour.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®