2

I need to extend my LV in /home partition to another 10GB, but there is no enough space in my VG.

/dev/mapper/VG1-lv_home  23G   20G  2.3G  90% /home

The Volume Group and Physical Volume details are mentioned below,

  --- Volume group ---
  VG Name               VG1
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                6
  Open LV               6
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               49.81 GiB
  PE Size               4.00 MiB
  Total PE              12751
  Alloc PE / Size       11919 / 46.56 GiB
  Free  PE / Size       832 / 3.25 GiB
  VG UUID               pdUuM2-ig0l-glNg-9G0M-inKZ-8z7X-N07q8W

pvdisplay

  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               VG1
  PV Size               49.81 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              12751
  Free PE               832
  Allocated PE          11919
  PV UUID               WnPKaI-x6h6-cdCJ-Ew9q-ha6e-6nUM-9TnWYx

Kindly provide me the steps of adding the free space from the LUN to the existing Volume Group, so that I can able to extend my LV in /home partition.

  • If tehre is not enough space in your VG then you need to shrink a LV. Provide the LV you want to shrink and which Filesystem it has please. – Pabi Jul 15 '14 at 10:04
  • Where are you aiming to get the excess 10GB from? Do you have a extra HDD or SSD or maybe a USB? – Registered User Jul 15 '14 at 11:14
  • Have you tried adding another hard drive that you can put into the computer because if you do that, you will have more space – Adam Jul 16 '14 at 8:27
2

To be able to enlarge your LV you have first to add another physical volume to the VG.

You are talking about "free space from the LUN" so I assume you have unpartitioned space on the underlying "Hard Disk" (or whatever it is), or you can create free space by shrinking another partition.

When you have done that you must create a new partition (in fdisk: make it type 8E (Linux LVM), or in parted set <partnum> LVM ON), lets assume it is /dev/sdX1.

Then you create a new Physical Volume from that

pvcreate /dev/sdX1

Now you add that Physical Volume to your volume group

vgextend VG1 /dev/sdX1

Now you are ready to extend the Logical volume.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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