Volume Group Has insufficient free Space

Latest response

Hello

I set up the virtualization host with a drive of 200G and went through the default installation, did not change the partition table at all

I checked with the df -h command and I should have more than 100G free:

[root@rhv-h ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.7G 0 7.7G 0% /dev
tmpfs 7.8G 16K 7.8G 1% /dev/shm
tmpfs 7.8G 18M 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/mapper/rhvh-rhvh--4.4.6.1--0.20210527.0+1 122G 3.6G 119G 3% /
/dev/mapper/rhvh-tmp 1014M 40M 975M 4% /tmp
/dev/mapper/rhvh-home 1014M 40M 975M 4% /home
/dev/nvme0n1p1 1014M 278M 737M 28% /boot
/dev/mapper/rhvh-var 15G 208M 15G 2% /var
/dev/mapper/rhvh-var_log 8.0G 98M 7.9G 2% /var/log
/dev/mapper/rhvh-var_crash 10G 105M 9.9G 2% /var/crash
/dev/mapper/rhvh-var_log_audit 2.0G 51M 2.0G 3% /var/log/audit
tmpfs 1.6G 0 1.6G 0% /run/user/0

When I try to following this guide to prepare the local storage on the host:

https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.4/html/administration_guide/sect-preparing_and_adding_local_storage

When I try to enter the following command I get this error:

[root@rhv-h ~]# lvcreate -L 80G rhvh -n data
Volume group "rhvh" has insufficient free space (9757 extents): 20480 required.

I checked the vgs and:

[root@rhv-h ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rhvh 1 10 0 wz--n- <199.00g 38.11g

I have no idea why there is only 38G free for this volume group when on the df command there is more than a 100G free

Could someone help?

Im running virtualization host 4.4.6

Thanks!

Responses

The 'df' command shows free space inside the logical volumes that have already been created. You cannot create a new Logical Volume inside the root LV (/dev/mapper/rhvh-rhvh, which is a file system with 119 GB of free space), you can only create in the remaining free space in the Volume Group (the 'vgs' output shows 38.11 GB "VFree", which is about what we would expect from a 199 GB Physical Volume with 122 + 1 + 1 + 15 + 8 + 10 + 2 = 159 GB allocated to other Logical Volumes).

It might be possible to recreate this system using LVM "thin" volumes instead, which would make the system behave more like you expect (empty space not used within a given LV would still be available to be used by other LVs in the same Volume Group), but I would not recommend that on this system - using "thin" volumes and over-subscribing the disk would defeat the point of the fine-grained partition layout. (I have never used RHV, but just looking at the partitions above, my guess is that this is a pre-defined partition scheme that Red Hat chose for RHV, and it may not allow you to choose the "thin" option).

Please show the output from lvs -a

Can you wipe and re-install the host? It would be better to specify /data there during install From your output:

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhvh-rhvh--4.4.6.1--0.20210527.0+1 **122G** 3.6G 119G 3% /

This filesystem is probably 122G, and xfs cannot be reduced. Trying to copy this to a smaller thin provisioned would be difficult, and I don't think thin pools can be shrunk either.