* Moving MD/LVM from PPC to x86
@ 2007-06-28 21:02 Turbo Fredriksson
2007-06-29 21:54 ` Alasdair G Kergon
0 siblings, 1 reply; 10+ messages in thread
From: Turbo Fredriksson @ 2007-06-28 21:02 UTC (permalink / raw)
To: linux-kernel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm trying to move some disks from my PPC desktop to a dedicated
server. Yesterday my system looked like this:
1. /dev/md0 372.61Gb (sda1+missing)
2. /dev/hdb 74.53Gb
3. /dev/sdb 298.09Gb
Now with the paycheck, I bought a third SATA disk (400Gb). I new from
the start that disk wouldn't fit in my desktopbox, so I also bought a
500W PSU (I had a huge server case without PSU from previously).
I was a little impatient, so I added the new disk (physically just
dangling outside the box :) to the LVM (as md1+missing).
The idea was to re-create sdb as mdX+missing, so I tried pvmove sdb.
But instantly received a lot of errors. Now I can't remove it
from the VG!
My new server is a i386, and I already had a disk with Linux installed
for Intel, so that disk was also moved (from another server I don't
need any more - it was a Pentium 1 - to slow! :).
In with the system disk, in with the LVM disk and started. The system
had to be upgraded (from Ubuntu 6.xx to 7.04 - Feisty). Took a couple
of hours, and when that was done, I started to get the MD's working.
No go... One of the disks didn't even have a partition table!? None
of the disks had a MD superblock!
I wasn't really scared, I knew I haven't tried to modify the disks.
Put everything back into the PPC, and yes, everything works as
expected (exept the read errors from sdc/md1).
So, long winded explanation of what i've done, any idea about:
1. How do I remove md1/sdc before I get data on it (i have the
LVM unmounted for the time being).
2. How do I move a VG/PV/LV from PPC to x86?
I.e., how do I fix/solve/get around the problem with endianness
so I can move the disks between the machines?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFGhCHomlWzPKccHgARApC7AJ9eFBMpNObARyIiFptbwChKCWzaXACfSr6z
m6k0jAvBS0PtC/1Is8OWTvk=
=qrJb
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Moving MD/LVM from PPC to x86
2007-06-28 21:02 Moving MD/LVM from PPC to x86 Turbo Fredriksson
@ 2007-06-29 21:54 ` Alasdair G Kergon
2007-06-30 9:09 ` Turbo Fredriksson
0 siblings, 1 reply; 10+ messages in thread
From: Alasdair G Kergon @ 2007-06-29 21:54 UTC (permalink / raw)
To: Turbo Fredriksson; +Cc: linux-kernel
On Thu, Jun 28, 2007 at 11:02:39PM +0200, Turbo Fredriksson wrote:
> 2. How do I move a VG/PV/LV from PPC to x86?
The on-disk LVM2 metadata should be accessible from both
architectures.
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Moving MD/LVM from PPC to x86
2007-06-29 21:54 ` Alasdair G Kergon
@ 2007-06-30 9:09 ` Turbo Fredriksson
2007-06-30 9:33 ` Neil Brown
0 siblings, 1 reply; 10+ messages in thread
From: Turbo Fredriksson @ 2007-06-30 9:09 UTC (permalink / raw)
To: Alasdair G Kergon; +Cc: linux-kernel
Quoting Alasdair G Kergon <agk@redhat.com>:
> On Thu, Jun 28, 2007 at 11:02:39PM +0200, Turbo Fredriksson wrote:
>> 2. How do I move a VG/PV/LV from PPC to x86?
>
> The on-disk LVM2 metadata should be accessible from both
> architectures.
Well, when I move the disks, the intel machine say that one of
the disks don't have a partition table and that the other don't
have any MD superblock...
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Moving MD/LVM from PPC to x86
2007-06-30 9:09 ` Turbo Fredriksson
@ 2007-06-30 9:33 ` Neil Brown
2007-07-02 14:52 ` John Stoffel
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Neil Brown @ 2007-06-30 9:33 UTC (permalink / raw)
To: Turbo Fredriksson; +Cc: Alasdair G Kergon, linux-kernel
On Saturday June 30, turbo@bayour.com wrote:
> Quoting Alasdair G Kergon <agk@redhat.com>:
>
> > On Thu, Jun 28, 2007 at 11:02:39PM +0200, Turbo Fredriksson wrote:
> >> 2. How do I move a VG/PV/LV from PPC to x86?
> >
> > The on-disk LVM2 metadata should be accessible from both
> > architectures.
>
> Well, when I move the disks, the intel machine say that one of
> the disks don't have a partition table and that the other don't
> have any MD superblock...
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
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.
NeilBrown
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Moving MD/LVM from PPC to x86
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
2 siblings, 0 replies; 10+ messages in thread
From: John Stoffel @ 2007-07-02 14:52 UTC (permalink / raw)
To: Neil Brown; +Cc: Turbo Fredriksson, Alasdair G Kergon, linux-kernel
>>>>> "Neil" == Neil Brown <neilb@suse.de> writes:
Neil> On Saturday June 30, turbo@bayour.com wrote:
>> Quoting Alasdair G Kergon <agk@redhat.com>:
>>
>> > On Thu, Jun 28, 2007 at 11:02:39PM +0200, Turbo Fredriksson wrote:
>> >> 2. How do I move a VG/PV/LV from PPC to x86?
>> >
>> > The on-disk LVM2 metadata should be accessible from both
>> > architectures.
>>
>> Well, when I move the disks, the intel machine say that one of
>> the disks don't have a partition table and that the other don't
>> have any MD superblock...
Neil> Version 0.90 MD superblocks (still the default) uses host-endian
Neil> values so you cannot move between architectures directly.
Neil> However isn't too hard to make it work.
So if we have version 1.0, 1.1 and 1.2 superblocks, why aren't they
the default yet? I assume they're useful, so let's use them!
John
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Moving MD/LVM from PPC to x86
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
2 siblings, 0 replies; 10+ messages in thread
From: Turbo Fredriksson @ 2007-07-04 19:05 UTC (permalink / raw)
To: linux-kernel
Quoting Neil Brown <neilb@suse.de>:
> Firstly, use
> mdadm --examine --metadata=0.swap /dev/DEVICE
This should be done on the PPC, or can it be done on the Intel?
Tried this command on some other machines, and there the '--metadata'
is an unknown option... This on mdadm v1.9.0.
> Then
> mdadm --assemble /dev/md0 --update=byteorder /dev/DEV0 /dev/DEV1 ....
And this on the Intel?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Moving MD/LVM from PPC to x86
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
2 siblings, 1 reply; 10+ messages in thread
From: Turbo Fredriksson @ 2007-07-08 20:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Neil Brown, Alasdair G Kergon
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)
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?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Moving MD/LVM from PPC to x86
2007-07-08 20:15 ` Turbo Fredriksson
@ 2007-07-09 5:34 ` Neil Brown
2007-07-09 9:48 ` Turbo Fredriksson
2007-07-11 9:24 ` Turbo Fredriksson
0 siblings, 2 replies; 10+ messages in thread
From: Neil Brown @ 2007-07-09 5:34 UTC (permalink / raw)
To: Turbo Fredriksson; +Cc: linux-kernel, Alasdair G Kergon
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
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Moving MD/LVM from PPC to x86
2007-07-09 5:34 ` Neil Brown
@ 2007-07-09 9:48 ` Turbo Fredriksson
2007-07-11 9:24 ` Turbo Fredriksson
1 sibling, 0 replies; 10+ messages in thread
From: Turbo Fredriksson @ 2007-07-09 9:48 UTC (permalink / raw)
To: linux-kernel
Quoting Neil Brown <neilb@suse.de>:
> 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).
I see, thanx for clarifying this.
> Does that make it clear?
Absolutely. I just want to be very clear. I don't have a full backup
(have no means to backup 1Tb), so I want to minimize the risk of loosing
data. I thank you for explaining so that even I can understand :)
PS. No sarcasm intended, even IF it should sound like it! I _am_ greatfull.
--
Noriega Honduras Marxist South Africa president AK-47 FSF radar FBI
congress class struggle SEAL Team 6 colonel Cocaine DES
[See http://www.aclu.org/echelonwatch/index.html for more about this]
[Or http://www.europarl.eu.int/tempcom/echelon/pdf/rapport_echelon_en.pdf]
If neither of these works, try http://www.aclu.org and search for echelon.
Note. This is a real, not fiction.
http://www.theregister.co.uk/2001/09/06/eu_releases_echelon_spying_report/
http://www.aclu.org/safefree/nsaspying/23989res20060131.html#echelon
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Moving MD/LVM from PPC to x86
2007-07-09 5:34 ` Neil Brown
2007-07-09 9:48 ` Turbo Fredriksson
@ 2007-07-11 9:24 ` Turbo Fredriksson
1 sibling, 0 replies; 10+ messages in thread
From: Turbo Fredriksson @ 2007-07-11 9:24 UTC (permalink / raw)
To: linux-kernel
Quoting Neil Brown <neilb@suse.de>:
> 3/ Once you are satisfied that things look right, use
> mdadm --assemble /dev/md0 --update=byteorder ....
> to assemble the array.
This worked. After a lot of tries. I kept getting 'resource busy'
(or 'device busy' or something other in that effect. But eventually
I got all my MD's moved.
Thanx for all the help.
--
Rule Psix Mossad class struggle tritium DES counter-intelligence
Treasury fissionable NORAD Kennedy smuggle genetic cracking subway
pits
[See http://www.aclu.org/echelonwatch/index.html for more about this]
[Or http://www.europarl.eu.int/tempcom/echelon/pdf/rapport_echelon_en.pdf]
If neither of these works, try http://www.aclu.org and search for echelon.
Note. This is a real, not fiction.
http://www.theregister.co.uk/2001/09/06/eu_releases_echelon_spying_report/
http://www.aclu.org/safefree/nsaspying/23989res20060131.html#echelon
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-07-11 9:24 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-28 21:02 Moving MD/LVM from PPC to x86 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
2007-07-09 9:48 ` Turbo Fredriksson
2007-07-11 9:24 ` Turbo Fredriksson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox