long time ago I mounted 3 lvm with same size on a virtual machine. now I want to umount one of them but I can't remember which lvm is mounded on which directory. How can find mount point of lvm in virtual machine?
Asked
Active
Viewed 167 times
1
-
1Could you please add to your post the output of: `virsh dumpxml
` Replace any confidential details with something generic. – Mircea Vutcovici May 23 '20 at 06:54 -
I wonder if you can use blkid on the block devices is the VM and outside and compare the outputs? – davidgo May 23 '20 at 07:10
-
If that doesn't work, its not totally risk free, but maybe you could very slightly increas, by different amounts, the lvm blocks in the host and then reexamine these in the VM. I'm uncertain if this can be done without a restart of the VM though. – davidgo May 23 '20 at 07:13
-
Another option could be to snapshot each lvm block and then mount and examine the copy in the host. – davidgo May 23 '20 at 07:13
-
@allexiusw how would that help? – davidgo May 23 '20 at 07:33
1 Answers
0
As Mircea Vutcovici said with virsh dumpxml <VM_name>
you can see lvm name and its target in virtual machine. you sould look for disk section. Before knowing this solution I deleted wrong lvm. I hope others don't repeat my mistake.
In below you can see disk section in dumpxml for one of my vms:
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none' io='native'/>
<source dev='/dev/vg/db_foo'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<boot order='1'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</disk>

haj_baba
- 11
- 3