Hello, after migrating our Fiber Channel to a new Ovirt 4.2 environment, we over the years and through experimenting and mistakes have ended up with some stale LVM's/disks on our fibre channel storage that Ovirt no longer is able to manage correctly or is unaware of.  I am looking for a reliable to way to do a few different things.

The first is figuring out precisely what LVM ids belong to a VM and is being used by that VM.

The second is figuring out if a LVM I have found on the Storage domain is being used at all by any VM or if ovirt is even aware of it.



I have fumbled around a bit. And using a combination of the following I have been able to figure out some of them. But now I am finding information that does not match or may not be correct or I am interpreting the data wrong. Anyway this is a big deal, because we want to remove the stale unused LVMs and it would obviously be disastrous if I deleted the wrong LVM from the FC.

So I know its not recommend but since I am not actually telling vdsm-client to do anything other than get information I figure its harmless. So here is what I have found so far.

vdsm-client Host getVMFullList vmname=<VM_NAME_HERE> | grep volumeID

lvs | grep <noted volumeID here>

With the above I have had some success verifying what LVMs a device is using. However now I am having trouble figuring out a particular windows server VMs LVM id's.

what I want to know is there a better way?


Also two more things.

You could call these feature requests, however it would be nice if there was a way to see all the unused LVMs on a storage domain that are not Tied to a VM. And it would also be nice to be able to remove un-imported VMs that reside on a storage domain without importing them.


Anyway trying to get rid of un-imported vms and getting rid of unused LVMs has been a chore. I wish there was an easier way.






-- 
Jacob Green

Systems Admin

American Alloy Steel

713-300-5690