mdadm Build legacy array with 512-byte chunk

I'm attempting to build an array using mdadm. The array has 512-byte (not kibibyte) sized stripes. Because mdadm accepts arguments to chunk in kibibytes, not in bytes, I have been unable to build this array correctly.

mdadm --build -n2 -c512 -lraid0 /dev/md0 /dev/sdb /dev/sdc

Builds the array with chunk size 512 KiB.

mdadm --build -n2 -c.5 -lraid0 /dev/md0 /dev/sdb /dev/sdc

Returns an error.

Any ideas? I would normally just manually rebuild the RAID. But this one is 4TB big. I could rebuild it to an LVM, but I was hoping to avoid this. Any ideas?


Solution 1:

I had the same problem and I solved it by means of a little Linux FUSE program I wrote. It's named xraid and I put it on Sourceforge.

For assembling your RAID:

  • Download and compile xraid
  • Run it:

    mkdir mnt ./xraid mnt 512 /dev/sdb /dev/sdc

  • You now should be able to access your RAID under mnt/xraid.