Not able to extend the size of an LVM logical volume
-l 100%VG
will try to extend the logical volume so that its total size is equal to the volume group's total size. This is not what you want - you already have another logical volume in that VG, which is taking space.
If you want the logical volume to use all the available free space in the volume group, the switch should be -l +100%FREE
(i.e. make the new volume size be its current size plus 100% of the free space in the volume group).
(Whether that's a good idea or not completely depends on how well you know how the storage demands on the two LVs will evolve over time, I guess.)
Related videos on Youtube
Comments
-
OmiPenguin over 1 year
During RedHat installation, I created one volume group with two logical volumes in it.
Volume Group Name = VolGroup00 LVMs = LogVol00 and LogVol01
LogVol00 size = 48G LogVol01 size = 81G
I have added extra 146GB hard drive. I added that drive as a physical volume and ran the command
pvs
:PV VG Fmt Attr PSize PFree /dev/sda3 VolGroup00 lvm2 a- 132.00G 0 /dev/sdb5 VolGroup00 lvm2 a- 136.09G 136.09G
Now I'm trying to extend the size of
LogVol01
from 81GB to +200Gb using the commandlvextend /dev/VolGroup00/LogVol01 -l 100%VG
But it is giving me this error:
[root@APP ~]# lvextend /dev/VolGroup00/LogVol01 -l 100%VG Extending logical volume LogVol01 to 268.09 GB Insufficient free space: 5917 extents needed, but only 4355 available
How can I fix this and extend my volume?
-
OmiPenguin about 11 yearsDamn I really forgot the FREE Switch. Im really out of my head. You saved my Day. Thanks