# Can't reassemble sw raid after moving from x86 to sparc

## guido-pe

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:

```
[   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:

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

----------

## Sadako

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

 

HTH.

----------

## guido-pe

Thank you, that did the trick.

----------

