2

After realizing I had under-allocated space on a hyper-v vm for this Ubuntu install, I expanded the partition in hyper-v and then used gparted to expand the lmv and boot partitions. However, after that, while the boot partition saw the expansion from 1GB to 5GB, the lvm partition still reports the old size of just under 5GB (though it should be 20GB). I've attached some screen shots for review. The item I was curious about was wondering whether or not the remainder of the lvm partition required some sort of additional formatting or something in grub to help the os realize it has a larger disk partition now. Any help you guys can offer would be greatly appreciated.

8
  • I can't see any attachments - maybe just show the configuration of your volume group, logical volumes, partitioning and free space instead of a screenshot. You could indicate what you currently have and what was your expected result. May 15, 2015 at 23:13
  • a df -h command reveals this: May 18, 2015 at 15:30
  • Filesystem: /dev/mapper/NIO--LAB--UBUN--SBX1--vg-root -- Size = 3.7G, Used = 2.9G, Avail = 574M, Use% = 84%, Mounting on = / May 18, 2015 at 15:34
  • Gparted reports Mount Point NIO-LAB-UBUN-SBX1-vg as size = 19.88 Gib, Used = 4.75 GiB, Unsed 15.13 GiB May 18, 2015 at 15:35
  • 1
    OK - after much searching I finally found the series of commands necessary to do this. geoffstratton.com/2013/08/resize-disk-ubuntu-lvm Jun 10, 2015 at 17:00

1 Answer 1

1

The answer is in the last comment by Peter Lacis. See this: http://www.geoffstratton.com/2013/08/resize-disk-ubuntu-lvm/

Basically, the partition has been resized, but you need to update the lvm and resize the file system. So, if you've already resized the partition in GParted, then run lvmdisplay and note the "LV Name". Then run:

lvextend -l+100%FREE <lv-name>

Now resize the filesystem. For ext that would be:

resize2fs <drive>

where <drive> is something like "/dev/mapper/ubuntu--my--root".

Really, just go read the article and you'll understand better what is going on.

1
  • A link to a potential solution is always welcome, but please add context around the link so your fellow users will have some idea what it is and why it's there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. Take into account that being barely more than a link to an external site is a possible reason as to Why and how are some answers deleted?.
    – Videonauth
    Dec 2, 2017 at 6:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .