[ovirt-users] Any way to correlate a VM disk (e.g. /dev/vda) to the vdsm ovirt disk?

Jiří Sléžka jiri.slezka at slu.cz
Wed Oct 7 16:58:41 UTC 2015


Hi,

Dne 6.10.2015 v 22:07 ccox at endlessnow.com napsal(a):
> I want to correlate virtual disks back to their originating storage under
> ovirt. Is there any way to do this?
>
> e.g. (made up example)
>
> /dev/vda
>
> maps to ovirt disk
>
> disk1_vm serial 978e00a3-b4c9-4962-bc4f-ffc9267acdd8

In oVirt there are two storage types - filesystem based (NFS, posix, 
glusterfs - uses files for storing images) and block device based (FC, 
iSCSI - uses lvm)

If I understand correctly, you would like know where exactly is stored a 
virtual disk. Right?

All you know is on which storage domain is your virtual disk stored and 
disk uuid (imgUUID)), right?

My approach is this (I am using block device based FC stroage so my 
virtual disks are stored as logical volumes). Probably there is much 
easier way ;-) please correct me

ssh to any host

list storage domains (sdUUID)

vdsClient -s 0 getImageDomainsList

find your domain uuid by name

vdsClient -s 0 getStorageDomainInfo sdUUID

you will get also pool (spUUID)

now you can search for volume(s) the image consists of

getVolumesList sdUUID spUUID imgUUID

you will get volUUID (one or more)

now you can check volume info

getVolumeInfo sdUUID spUUID imgUUID volUUID

and also you can get volume path

getVolumePath sdUUID spUUID imgUUID volUUID

you will get something like

/rhev/data-center/mnt/blockSD/088e7ed9-84c7-4fbd-a570-f37fa986a772/images/be5c56de-6a22-4d1a-8579-f0f5d501d90c/0681822f-3ac8-473b-95ce-380f8ab4de06

it is symlink which points to target block device

it looks to me that on block devices the path is

/dev/sdUUID/volUUID


btw. I am using oVirt3.5...


Cheers, Jiri


>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jiri_slezka.vcf
Type: text/x-vcard
Size: 586 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20151007/79fcecb6/attachment-0001.vcf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3267 bytes
Desc: Elektronicky podpis S/MIME
URL: <http://lists.ovirt.org/pipermail/users/attachments/20151007/79fcecb6/attachment-0001.p7s>


More information about the Users mailing list