Mdadm – Change RAID 10 chunk size and switch to “far” layout

mdadmraid10software-raidubuntu-10.04

I'm running an Ubuntu Linux NAS server with 4 2TB drives in software RAID 10.

I created the array during installation (with Ubuntu Server disc), but the layout is near and the chunk size is 64.

I want to change the chunk size to 256 and the layout to far. How do I do this?

Here's the output of mdstat:

root@server:~# cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid10 sde1[3] sdd1[2] sdc1[1] sdb1[0]
      3907026816 blocks 64K chunks 2 near-copies [4/4] [UUUU]

I would prefer to make the change non-destructively to save time copying the data over again, but the data is backed up, so destructive changes would be ok too.

Thank you for any help.

Best Answer

The only method is to destroy and re-create the array with new parameters. Neil Brown have written in his recently published road map for md:

Support reshape of RAID10 arrays.

RAID10 arrays currently cannot be reshaped at all. It is possible to convert a 'near' mode RAID10 to RAID0, but that is about all. Some real reshape is possible and should be implemented.

Whole road map is here: http://lwn.net/Articles/428206/

Related Topic