Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I came across an error when I create RAID10 with LVM2.

I have four PVs and when I create LV using this command:

sudo lvcreate --mirrors 1 --stripes 2 -l7630 -n lv0 vg0 --corelog

display the VG, it should be empty,but it has half..

  VG Name               vg0
  System ID             
  Format                lvm2
  Metadata Areas        4
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                4
  Act PV                4
  VG Size               475.94 GiB
  PE Size               16.00 MiB
  Total PE              30460
  Alloc PE / Size       15260 / 238.44 GiB
  Free  PE / Size       15200 / 237.50 GiB
  VG UUID               YNI5YN-o41z-4vb4-FAkf-gUKI-Da77-O0uD3a
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Your VG has 30460 total physical extents.

You've told lvcreate to create a LV with 7630 extents.

7630 × 2 = 15260

The output is correct.

(If you're trying to create a RAID10, you probably want to use mdadm to create an actual software RAID10 then use the resulting mdX as a LVM PV)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.