Welcome Guest. Please Login or Register  


You are here: Index > Virtualizor - Virtual Server Control Panel > General Support > Topic : Orphaned disks after deleting a VPS created by an ISO



Threaded Mode | Print  

 Orphaned disks after deleting a VPS created by an ISO (1 Replies, Read 4035 times)
thirdgen
Group: Member
Post Group: Newbie
Posts: 8
Status:
I'm encountering odd behavior with an LVM-based KVM hypervisor configuration on a host system after creating a new Linux VPS using an ISO which I've been unable to contribute to the intended behavior of KVM, unintended behavior of Virtualizor or just my particular storage configuration itself.  Hoping someone in the community may have experienced this before or have a workaround solution.

Description:  Upon deletion of a VPS that has been installed using a Linux ISO with an LVM partition during initial setup results in an orphaned disk being present on the host system's LVM table once the VPS has been successfully deleted from the Virtual Server list.  Attempts to delete the orphaned disk result in the immediate error, "Error deleting disk(s)", which no associated errors listed in Tasks.  To remove the orphaned disk, reboot of the hardware host is necessary which subsequently allows the orphaned disk to be removed after.

LVM configuration is currently a Thin LVM (RAW) storage pool.
Using latest Virtualizor version 3.0.3p7.  Kernel 3.10.0-1127.13.1.el7.x86_64

I suspect the behavior of LVM and KVM, not necessarily Thin LVM or pool in this particular case.  Creating an LVM partitioned VPS appears to modify the host LVM tables and creates an associated LVM physical volume, volume group and logical volume.  Upon deletion of the VPS, all three storage paths remain until reboot of the host which results in the PV and VG objects being removed automatically which subsequently allows the LV orphaned disk to be deleted.

While I'm under the impression that modification of the hosts LVM table by KVM for an LVM-based VPS is expected, rebooting a production hardware node each time a client re-installs which ultimately would exhaust the storage pool as disks continue to persist could be problematic.  Ideally I would prefer a way to avoid this, or at least determine a workaround that could be used to clean up the storage over a period of time.

Thanks
IP: --   

Orphaned disks after deleting a VPS created by an ISO
thirdgen
Group: Member
Post Group: Newbie
Posts: 8
Status:
I was able to resolve the issue, information below for others who may encounter in the future.

When using an LVM backed storage system with the KVM hypervisor this appears to be a known issue.  Upon further determination that two unrelated VMs could coincidentally use the same LVM Volume Group during installation which leads to conflicts on the host's LVM table led me to the answer for the description of the first.  Solution is to apply an LVM global filter under /etc/lvm/lvm.conf to prevent the host system from scanning guest devices that may inadvertently use LVM-based storage themselves which could lead to conflict in the host table between VMs using matching VG names or even conflicting VG names with the host-based system itself.  This ultimately leads to the inability to remove the user's disks upon VM termination and in some cases, errors on the host's LVM table.

There are different ways the filtering can be implemented, but as I am able to accurately predict which devices are utilized for LVM backed storage on the host system, I've chosen to accept only specific devices and exclude all others.

Additional information can be found here - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lvm_filters

/etc/lvm/lvm.conf

Code
global_filter = [ "a|^/dev/md[123-127]+|", "a|/dev/nvme.*|", "r|.*/|" ]

IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 27, 2024, 2:44 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.027