1

Please, tell me if it is possibile to create RAID10 (near layout) with odd drives and then adding even(th) disk to that existing RAID10.

  • TOTAL: 4* 2TB drives (sdc,sdd,sde,sdf)
  • FREE: 3 of them (sdd,sde,sdf) are empty / unpartitioned; ready to RAID
  • IN-USE: 1 HDD (sdc) has data in it


  1. mdadm or lvm creation of RAID10 (near layout) using initially 3* 2TB HDDs (sdd1,sde1,sdf1)
  2. format RAID10 with ext4
  3. move all data from sdc1 into the newly created RAID10 (sdd1+sde1+sdf1)
  4. prepare sdc into sdc1
  5. mdadm or lvm adding sdc1 to the existing RAID10 (sdd1+sde1+sdf1)
  6. mount RAID10 into /somewhere/mystuff via /etc/fstab

Thanks!

1 Answer 1

2

Yes, you can do it this way. I'm not convinced that a layout of sdd sde sdf missing RAID10 gives you any more security than creating a RAID0 first (sdd sde) and converting (sdd + sdf, sdc + sde), but that's an academic discussion. You could do it either way.

mdadm uses the special keyword "missing" in place of a device name to create/manage degraded arrays. So when you create the array, you would run mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/sdd1 /dev/sde1 /dev/sdf1 missing. Once the data has copied over, you can simply add the remaining disk by running mdadm --add /dev/md0 /dev/sdc1.

I highly recommend you create your array on top of partitions of type "Linux RAID" (0xfd00 or A19D880F-05FC-4D3B-A006-743F0F84911E) rather than on the raw devices.

5
  • just for sake of "philosophy" dialog I'm curious ---> Why are you teling me about sdd sde sdf missing RAID1, even if asked infos bout RAID10? Also, are you telling me that with mdadm I could create a manual nested-RAID by first creating two RAID0 and then adding them manually to one RAID1? -- last "philosophic" question: will you go with RAID on devices sdc sdd sde sdf? Or with their partitions sdc1 sdc2 sdd1 sdd2 sde1 sde2 sdf1 sdf2? Commented Jul 3, 2020 at 17:59
  • 1
    @T.Caio 1) Sorry, that was a typo: RAID1 should read RAID10 (I've made the edit). 2) You could in theory create a nested RAID like you suggest., but I don't recommend it. 3) I always put RAID on partitions, never on raw devices. It makes it easier to move to smaller/larger devices in the future, and it really helps with auto-detection/auto-assembly/auto-mounting. Commented Jul 3, 2020 at 18:08
  • OK, as you pointed out in the original answer. Good! ;) Then'll be up to my decision if I want to create a single partition (eg: totalsize-128MiB) for each disk or to split them with multiple partitions... But that's another story. Commented Jul 3, 2020 at 18:17
  • 1
    @T.Caio You shouldn't add multiple partitions on the same device to a single array (or even multiple arrays). If you want to divide the space up further, I'd suggest using LVM. Commented Jul 3, 2020 at 18:19
  • Gothca. Well: I'll go with mdadm, good. ;) Commented Jul 3, 2020 at 18:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.