lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18065.51428.849286.225118@notabene.brown>
Date:	Mon, 9 Jul 2007 15:34:28 +1000
From:	Neil Brown <neilb@...e.de>
To:	Turbo Fredriksson <turbo@...our.com>
Cc:	linux-kernel@...r.kernel.org, Alasdair G Kergon <agk@...hat.com>
Subject: Re: Moving MD/LVM from PPC to x86

On Sunday July 8, turbo@...our.com wrote:
> Quoting Neil Brown <neilb@...e.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ