During installation of Ubuntu 12.10 x64 I checked the "Use LVM" option. My partitions:

  • /dev/sda1, ext2, mount: /boot, 243.00 MiB, flag: boot
  • /dev/sda2, extended, 698.4 GiB
    • /dev/sda5, lvm2 pv, mount: ubuntu, 698.4 GiB, flag: lvm

Or better see a GParted screenshot (am not allowed to post images)

I've tried both with current system and a live USB Ubuntu, but I can't do anything with the LVM partition: nor add a new subpartition, neither resize it. Is there a way to shrink it so I can add more physical partitions? Or how do I add a new virtual subpartition to LVM? (No such menu option in GParted)

EDIT sudo pvs:

PV         VG     Fmt  Attr PSize   PFree
/dev/sda5  ubuntu lvm2 a--  698.39g    0 

sudo vgs:

VG     #PV #LV #SN Attr   VSize   VFree
ubuntu   1   2   0 wz--n- 698.39g    0 

sudo lvs:

LV     VG     Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert
root   ubuntu -wi-ao-- 692.49g                                           
swap_1 ubuntu -wi-ao--   5.91g  
  • GParted does not support managing LVM volumes. Please be more specific on what you are trying to accomplish. Do you really need conventional partitions or would you like to have logical volumes part of your current volume group? For the latter case I would suggest using palimpsest aka Gnome Disk Utility. – gertvdijk Dec 31 '12 at 0:39
  • I want both to add a physical partition for NTFS, and a separate logical partition in LVM for home folder. – Bogdan Kulynych Dec 31 '12 at 0:43
  • That won't be an easy task, and will be very time consuming. It will consist of 1) shrinking the filesystem on the LV(s), 2) shrinking the LV(s), 3) shrinking the VG, 4) shrinking the PV, 5) shrinking the LVM partition, 6) adding home-LV, 7) adding NTFS partition. Next time, think before you partition and install. Please also post the output of sudo pvs, sudo vgs, sudo lvs. – gertvdijk Dec 31 '12 at 0:45
  • Ok, if it is so, I will just reinstall the system, I installed it just several hours ago. I also couldn't have thought that mere adding subpartitions to LVM and resizing it would be such a tedious task. – Bogdan Kulynych Dec 31 '12 at 0:55
  • Just update your question with the details. Anyway, LVM has major advantages, but this is mainly for advanced tasks. One thing it's not good at, is shrinking the physical disk. This is because one should think before adding physical volumes to LVM. – gertvdijk Dec 31 '12 at 0:57

Here is a few bits of information I gathered regarding resizing LVM2 partitions based on my personal experience.

  1. First things first: G-Parted (currently version 16 / July 2013) is unable to extend or shrink LVM2 partitions... Just forget G-Parted at the time being.

  2. To date, the only GUI application able to resize LVM2 partition is "system-config-lvm" (sudo apt-get install system-config-lvm) but for some reason, I haven't been able to get much from it.

  3. Alternatively, it is possible to resize LVM2 partitions by using the appropriate command lines. More here > http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/ and there > http://www.tcpdump.com/kb/os/linux/lvm-resizing-guide/all-pages.html

  4. I am personally a fan of G-Parted, the usual fast & easy trick. I hope the next version will be able to resize LVM2 partitions all graphically. But in the meantime, the best thing I always do, and I really mean it, is NOT to install new Linux boxes with LVM2; but rather with Ext3 or Ext4 instead. This choice is given in the middle of the install process: just avoid doing the "OK / Next / Next" thing mindlessly as LVM2 will be picked up as the default partition system ^^ it is far better customizing the formatting method. So let's keep say 1024 Mb for the Swap Partition, and assign 10GB or more to the /dev/sda1 partition (the Ext3/4 one), on which "/" is the Mount Point.

This way, you may be able to use G-parted later on it if needed, with no limitation of any kind.

Edit 1 : if you desperately need to free some disk space on your FileSystem partition ASAP, logon your linux and type the following command : "du -sh *", which will display a list of all the directories and their size. This will help you identify the biggest folders at a glance and maybe move or remove static data.

Edit 2 : Latest news from the G-Parted Team (dated 2nd sept. 2013) : "

To resize LVM2 PV partitions, the volume must be deactivated. To do this, select the menu option "Partition --> Deactivate". When the LVM2 PV partition is deactivated, then the resize/move menu option will be enabled.

Since Logical Volume Management is not simply a file system, there are serious repercussions to changing the volume group name or UUID. Also problems will occur if the LVM2 PV is copied. That is why these operations are not supported for LVM2 PV."

| improve this answer | |

I've run into the problem where you simply want to extend the LVM volume like so:

resize underlying disk, usually /dev/sda in vmware /dev/sda1 is /boot /dev/sda2 is LVM partition re-read the disk fdisk to delete and recreate /dev/sda2 (lvm partition only) effectively extending the partition. pvresize /dev/sda2 vgdisplay never sees it!!!

That's the problem. You have to do a flipping reboot. CentOS 6 is where I see this issue. I'll have to try it on 7 and see if it works.

| improve this answer | |

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.