Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would resize the extended partition to include the newly added space. It might be easier to then add a logical partition and add it to your sugar-root like the following then mess with resizing the existing space.
Agreed, looks like a useful article.
Might make sense in future to add a second disk to the guest, then pvcreate on that disk (unpartitioned). Then if that disk is later enlarged, a simple pvresize will make things a lot easier.
We followed that document and everything was looking good until we got to the point that extends the LV. Here is the error we get at the bottom. We were thinking maybe it had something to do w/ this command:
"lvextend -l 100%FREE /dev/sugar/root"
Code:
root@sugar:~# lvextend -l 11712 /dev/sugar/root
New size given (11712 extents) not larger than existing size (12808 extents)
Run `lvextend --help' for more information.
root@sugar:~# root@sugar:~# lvdisplay
LV Name /dev/sugar/root
VG Name sugar
LV UUID adBm9C-bTLu-stVk-oVGo-UtIO-9VPo-jpanrT
LV Write Access read/write
LV Status available
# open 1
LV Size 50.03 GiB
Current LE 12808
Segments 3
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Name /dev/sugar/swap_1
VG Name sugar
LV UUID S8yNjq-zol0-FX77-L338-iPyo-JUTT-N3LfYu
LV Write Access read/write
LV Status available
# open 2
LV Size 3.98 GiB
Current LE 1018
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
root@sugar:~# vgdisplay
--- Volume group ---
VG Name sugar
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 99.76 GiB
PE Size 4.00 MiB
Total PE 25538
Alloc PE / Size 13826 / 54.01 GiB
Free PE / Size 11712 / 45.75 GiB
VG UUID B5IY2a-CzoR-TT2j-0Gwt-bXy6-G6Z7-WdDL2a
root@sugar:~# vgextend sugar /dev/sda6
Physical volume '/dev/sda6' is already in volume group 'sugar'
Unable to add physical volume '/dev/sda6' to volume group 'sugar'.
root@sugar:~# lvdisplay
--- Logical volume ---
LV Name /dev/sugar/root
VG Name sugar
LV UUID adBm9C-bTLu-stVk-oVGo-UtIO-9VPo-jpanrT
LV Write Access read/write
LV Status available
# open 1
LV Size 50.03 GiB
Current LE 12808
Segments 3
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Name /dev/sugar/swap_1
VG Name sugar
LV UUID S8yNjq-zol0-FX77-L338-iPyo-JUTT-N3LfYu
LV Write Access read/write
LV Status available
# open 2
LV Size 3.98 GiB
Current LE 1018
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
root@sugar:~# lvextend -l 100%FREE /dev/sugar/root
New size given (11712 extents) not larger than existing size (12808 extents)
Run `lvextend --help' for more information.
root@sugar:~# lvextend --help
lvextend: Add space to a logical volume
Okay... we got it figured out. Looks like it was something to do w/ that 100%FREE. We used:
lvextend -L +45G /dev/sugar/root
and everything seems to be correct.
I appreciate the help and I'll mark this thread resolved.
The problem with the 100%FREE was that you didn't specify it correctly. You needed it to be '-l +100%FREE' - that will add 100% of the free space. Without the '+', you are saying to extend to a size equal to the free space, which was less than the current size.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.