[linux-lvm] Got only half the space of RAID10 LV with 4 PVs (similar to RAID1 cause LV shows it has 4 'Mirrored volumes')

Douglas Paul doug at bogon.ca
Wed Jul 18 14:15:06 UTC 2018


On Wed, Jul 18, 2018 at 09:25:37PM +0800, runappz wrote:
>      lvcreate --type raid10 -m 1 -i 2 -l 24576 pve # created lvol1
>      lvcreate --type raid10 -m 1 -i 2 -l 8 pve # created lvol2
>      lvcreate --type raid10 -m 1 -i 2 -l 8 pve # created lvol3
> 
>      lvcreate --type raid10 -m 1 -i 2 -l 8 pve # created lvol4
>      lvcreate --type raid10 -m 1 -l 8 pve # created lvol5
> 
> The default LE size was 4MiB, so that I expect lvol1 to be 2*4*24576
> MiB, while other 4 are all 2*4*8 MiB. However, I only got 4*24576 MiB
> and 4*8 MiB partitions. I tried to run `mkfs.ext4` on lvol3 and mount
> it. `df` shows clearly that lvol3 is a 32MiB volume.

The -l option is the final size of the LV, not the space used on each device
for each stripe or mirror. So when you say -l 8, it means the LV has 8
usable extents, so it is supposed to be 32MiB. It doesn't matter how many
stripes or mirrors you have.

-- 
Douglas Paul





More information about the linux-lvm mailing list