1

I have a server with 4 spare 6 Tb disks. I want to set up RAID6 on these four disks. It is well understood that 4 is the minimum one needs to set up RAID6.

No matter what I pass to LVM2, I get locked out:

[root@mybox /]# vgdisplay
  --- Volume group ---
  VG Name               vg1
  System ID
  Format                lvm2
  Metadata Areas        4
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                4
  Act PV                4
  VG Size               21.83 TiB
  PE Size               1.00 MiB
  Total PE              22892660
  Alloc PE / Size       0 / 0
  Free  PE / Size       22892660 / 21.83 TiB

I set the PE size at 1MiB as I was playing and it's made no difference:

[root@mybox /]# lvcreate --type raid6 -l 100%FREE -i 2 -n lv1 vg1
  Using default stripesize 64.00 KiB.
  Number of stripes must be at least 3 for raid6
[root@mybox /]# lvcreate --type raid6 -l 100%FREE -i 3 -n lv1 vg1
  Using default stripesize 64.00 KiB.
  Rounding size (22892660 extents) down to stripe boundary size (22892658 extents)
  Insufficient suitable allocatable extents found for logical volume lv1.
[root@mybox /]# lvcreate --type raid6 -L 8M -i 3 -n lv1 vg1
  Using default stripesize 64.00 KiB.
  Rounding size (8 extents) up to stripe boundary size (9 extents).
  Insufficient suitable allocatable extents for logical volume lv1: 12 more required

Eh? With this much space available, a vg with plenty of free extents, asking for a small lv should be fine. How can I set up a RAID6 lv using the maximum space available? I will be extending this set with many more disks in future and am hoping to just pvcreate them, add them into the vg and lvextend my RAID6 (and probably wait a horrible amount of time for the reorg of the parity to be done).

Also, can someone point me to an in depth rundown of Redhat's LVM2 treatment of RAID 6 please? I'm thinking about how dynamic parity reorganisation is done with large disk set increases.

1 Answer 1

0

I found that I had an additional spare disk so the command worked with 5 disks.

Assuming the command line forces -i3 as a min, I guessed I'd need an additional disk to provide the additional PEs.

1
  • I'm also trying to setup a RAID6 this way with 4 disks and also getting your same error. Shouldn't I be able to create a RAID6 with 4 disks? Is this an lvcreate bug? What am I missing?
    – rjcarr
    Sep 21, 2019 at 0:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .