lvm mirroring space unavailable.

Posted by Bryan Ward on Server Fault See other posts from Server Fault or by Bryan Ward
Published on 2011-02-04T22:55:34Z Indexed on 2011/02/04 23:27 UTC
Read the original article Hit count: 303

Filed under:
|

I am trying to migrate my data on lvm to two new disks, and setup mirroring between the two. I have successfully migrated all of the data to the first of the two disks, leaving the second one completely available as a mirror. I verified this using pvdisplay -m /dev/sd{g,h}1

  --- Physical volume ---
  PV Name               /dev/sdg1
  VG Name               vg
  PV Size               931.51 GiB / not usable 3.19 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              238466
  Free PE               82866
  Allocated PE          155600
  PV UUID               v2nc3j-EFBR-QpuG-xgro-Rm59-fmu6-IB3QcR

  --- Physical Segments ---
  Physical extent 0 to 49999:
    Logical volume  /dev/vg/videos
    Logical extents 0 to 49999
  Physical extent 50000 to 99999:
    Logical volume  /dev/vg/home
    Logical extents 0 to 49999
  Physical extent 100000 to 129999:
    Logical volume  /dev/vg/music
    Logical extents 0 to 29999
  Physical extent 130000 to 155599:
    Logical volume  /dev/vg/videos
    Logical extents 50000 to 75599
  Physical extent 155600 to 238465:
    FREE

  --- Physical volume ---
  PV Name               /dev/sdh1
  VG Name               vg
  PV Size               931.51 GiB / not usable 3.19 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              238466
  Free PE               238466
  Allocated PE          0
  PV UUID               LuTrem-WcsZ-qw7l-2CDS-lLKI-wdq0-QEXhLf

  --- Physical Segments ---
  Physical extent 0 to 238465:
    FREE

Then when I try to mirror the home logical volume for example, it says that I do not have sufficient space. I used lvconvert -m1 vg/home and the output was:

  Insufficient suitable allocatable extents for logical volume : 50000 more required
  Unable to allocate extents for mirror(s).

This puzzling to me because it appears as if there is plenty of space on the second disk to mirror. Is there something I have done wrong here? Or is there a way to explicitly tell LVM where to put each leg of the mirror? I'm using lvm2.

© Server Fault or respective owner

Related posts about lvm

Related posts about lvm2