Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't reassemble sw raid after moving from x86 to sparc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
guido-pe
n00b
n00b


Joined: 10 May 2004
Posts: 74

PostPosted: Sat Apr 19, 2008 3:35 am    Post subject: Can't reassemble sw raid after moving from x86 to sparc Reply with quote

Hi,

I've recently moved 2 500GB sata hard disks from an x86 based machine into a sparc machine, hoping I could keep using them like I did in the old machine.

Both disks have four partitions, the first three of which are part of different raid-1 arrays, mirrored across the discs. (i.e. sda1 + sdb1 -> md1, sda2 + sdb2 -> md2 and sda3 + sdb3 -> md3)

The old machine used to boot from the first raid array, but the new one boots from a seperate disc.

After booting up, I find the following lines in dmesg:

Code:
[   46.114736] md: Autodetecting RAID arrays.
[   46.273708] md: invalid raid superblock magic on sda1
[   46.445781] md: sda1 does not have a valid v0.90 superblock, not importing!
[   46.714465] md: invalid raid superblock magic on sda2
[   46.886528] md: sda2 does not have a valid v0.90 superblock, not importing!
[   47.141600] md: invalid raid superblock magic on sda3
[   47.313646] md: sda3 does not have a valid v0.90 superblock, not importing!
[   47.583331] md: invalid raid superblock magic on sdb1
[   47.755334] md: sdb1 does not have a valid v0.90 superblock, not importing!
[   48.007638] md: invalid raid superblock magic on sdb2
[   48.179738] md: sdb2 does not have a valid v0.90 superblock, not importing!
[   48.458983] md: invalid raid superblock magic on sdb3
[   48.631014] md: sdb3 does not have a valid v0.90 superblock, not importing!
[   48.850772] md: Scanned 6 and added 0 devices.
[   49.010107] md: autorun ...
[   49.129875] md: ... autorun DONE.


Trying to reassemble the array manually after the boot results in the following:

Code:
# mdadm --assemble /dev/md1 /dev/sda1 /dev/sdb1
mdadm: no recogniseable superblock on /dev/sda1
mdadm: /dev/sda1 has no superblock - assembly aborted


Could it be the format of the md superblock is architecture dependant?
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Sat Apr 19, 2008 3:44 am    Post subject: Reply with quote

I think the problem is that x86 systems are little endian, whereas sparc seems to be big endian.

From the mdadm man page;
Quote:
-U, --update=
Update the superblock on each device while assembling the array. The argument given to this flag can be one of
sparc2.2, summaries, uuid, name, homehost, resync, byteorder, devicesize, or super-minor.

The byteorder option allows arrays to be moved between machines with different byte-order. When assembling such an
array for the first time after a move, giving --update=byteorder will cause mdadm to expect superblocks to have their
byteorder reversed, and will correct that order before assembling the array. This is only valid with original (Version
0.90) superblocks.


HTH.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
guido-pe
n00b
n00b


Joined: 10 May 2004
Posts: 74

PostPosted: Sat Apr 19, 2008 3:55 am    Post subject: Reply with quote

Thank you, that did the trick.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum