0

I'm new to this site. I am currently configuring a server, which has these ssd disks: 1X1TB SSD NVme 2X512GB SSD NVMe

Now I would like to create a raid 1 between these disks, in which I would always see the maximum size of 1 TB, but the data will be duplicated on the 1TB disk and on the remaining 2 512GB disks. I would like to have two blocks of 1TB each, the first block formed by the 1TB disk and the second block composed of the set of two 512 disks, all in RAID 1. How could I solve this problem? Do I put the two 512GB disks in an LVM volume and then create a RAID? Thank you

PS: the system is Debian Stretch

4 Answers4

1

I would not use LVM to build devices for your array, but instead build the array with mdadm and use it for LVM.

To get an array of 1Tb, you would need to put the 512Gb drives into a RAID 0 array which would give you 1Tb, then use the RAID 0 device and the 1Tb drive in a RAID 1 array. This would avoid "wasting" space, however you are essentially using RAID 10, and should understand how that affects your risk of data loss.

TheFiddlerWins
  • 2,999
  • 1
  • 15
  • 22
Sufferer
  • 21
  • 1
  • No, a mirror of stripes is 0+1. It generally is inferior to 1+0, because loss of any 2 loses the array, and because in a failure you have to re-mirror the failed set and not one disk. – John Mahowald Sep 22 '18 at 12:34
  • Sorry, I am always getting those two confused. – Sufferer Sep 26 '18 at 15:26
0

I suggest simple configurations where all the disks are the same size. It will have more predictable performance, and one size disk to replace.

Create software RAID with mdadm, then create LVM volume groups out of the md devices.

You can easily get 512 GB usable by mirroring the 2x 512s in a RAID 1.

For larger usable space, get 2 or 4 larger disks. Such as 4x 512 GB in a RAID 10, or 2x 1 TB in a RAID 1.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
0

The easiest solution is probably to split the 1 TB SSD into two partitions of 512 GB each, and then use those two partitions and the other two SSDs to form a RAID10. Be aware of the disk layout of raid10 in linux, which is described in detail here: https://www.finnie.org/2012/11/04/linux-md-raid-10-disk-layout/ Each pair of two partiions given during mdadm --create will be treated as a mirror group/RAID1, so both of theses disks will contain the same data. So, if the big disk is sda, and it is split into partitions sda1 and sda2, and the other disks are sdb and sdc with one partition, each, the following command should do the trick:

mdadm --create --verbose /dev/md0 --level=10 /dev/sda1 /dev/sdb1 /dev/sda2 /dev/sdc1

I strongly discourage to manually place a RAID0 on top of a RAID1, as suggested in other answers. You are quite likely to run into problems while assembling the array during boot.

Kai Petzke
  • 408
  • 1
  • 4
  • 10
  • Thank you very much for all the answers. In the end I decided to make a RAID 0 on the 2 512GB disks and then create a RAID 1 with the 1TB disk and the RAID 0, then a RAID10. I do not know how, but I had not really thought about it before :) Thanks again – Andrea Angelozzi Sep 23 '18 at 09:05
0

Thank you very much for all the answers. In the end I decided to make a RAID 0 on the 2 512GB disks and then create a RAID 1 with the 1TB disk and the RAID 0, then a RAID10.

I do not know how, but I had not really thought about it before :) Thanks again