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

2015-10-13 Thread Nir Soffer
On Wed, Oct 7, 2015 at 6:49 PM,   wrote:
>> Hi ccox,
>> you can see the disk id mapping to device if you execute 'ls -l
>> /dev/disk/by-id/' .
>> Second way, and easier, is to make sure you have guest-agent installed on
>> your guest virtual machine and using rest API you can run GET command:
>> GET on .../api/vms/{vm_id}/disks
>>
>> You will see an attribute called "" .
>> I hope that helps
>
> should have said I'm running 3.4.  I don't think there's a logical_name in
> that version.  And by-id or by-uuid doesn't seem to match anything.
>
> Maybe this can't be done in 3.4?

Can you share the ouput of:

tree /dev/disk

On the guest?

And the output of

pvscan --cache
lvs -o vg_name,name,tags

On the host?

On the guest, the the disk serial number should be the first 20
characters of the disk
uuid (I think it is the image uuid in vdsm terms, or disk uuid in engine terms).

The image uuid should appear in a lv tag on the host, and the prefix
of this uuid should
be found on the guest.

Can you describe why do you need this information?

Nir
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


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

2015-10-13 Thread Nir Soffer
On Wed, Oct 7, 2015 at 7:58 PM, Jiří Sléžka  wrote:
> Hi,
>
> Dne 6.10.2015 v 22:07 c...@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

Note that getVolumePath was removed in 3.6. The only way to get this
info now is via prepareImage.

>
> 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@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
>
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


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

2015-10-07 Thread Darrell Budic
You can also find the disk under the “Disks” tab in the web gui, selecting it 
will yield the uuid of the virtual disk as ID in the disk description panel. 

> On Oct 7, 2015, at 12:43 AM, Raz Tamir  wrote:
> 
> Hi ccox,
> you can see the disk id mapping to device if you execute 'ls -l 
> /dev/disk/by-id/' .
> Second way, and easier, is to make sure you have guest-agent installed on 
> your guest virtual machine and using rest API you can run GET command:
> GET on .../api/vms/{vm_id}/disks
> 
> You will see an attribute called "" .
> I hope that helps
> 
> 
> 
> Thanks,
> Raz Tamir
> Red Hat Israel
> 
> On Tue, Oct 6, 2015 at 11:07 PM,  > wrote:
> 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
> 
> ___
> Users mailing list
> Users@ovirt.org 
> http://lists.ovirt.org/mailman/listinfo/users 
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


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

2015-10-07 Thread ccox
> Hi ccox,
> you can see the disk id mapping to device if you execute 'ls -l
> /dev/disk/by-id/' .
> Second way, and easier, is to make sure you have guest-agent installed on
> your guest virtual machine and using rest API you can run GET command:
> GET on .../api/vms/{vm_id}/disks
>
> You will see an attribute called "" .
> I hope that helps

should have said I'm running 3.4.  I don't think there's a logical_name in
that version.  And by-id or by-uuid doesn't seem to match anything.

Maybe this can't be done in 3.4?


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


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

2015-10-07 Thread Raz Tamir
You are right, there is no logical_name attr in disk object before 3.5 [1]

[1] http://www.ovirt.org/Features/ReportGuestDisksLogicalDeviceName




Thanks,
Raz Tamir
Red Hat Israel

On Wed, Oct 7, 2015 at 6:49 PM,  wrote:

> > Hi ccox,
> > you can see the disk id mapping to device if you execute 'ls -l
> > /dev/disk/by-id/' .
> > Second way, and easier, is to make sure you have guest-agent installed on
> > your guest virtual machine and using rest API you can run GET command:
> > GET on .../api/vms/{vm_id}/disks
> >
> > You will see an attribute called "" .
> > I hope that helps
>
> should have said I'm running 3.4.  I don't think there's a logical_name in
> that version.  And by-id or by-uuid doesn't seem to match anything.
>
> Maybe this can't be done in 3.4?
>
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


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

2015-10-07 Thread Jiří Sléžka

Hi,

Dne 6.10.2015 v 22:07 c...@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@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users



<>

smime.p7s
Description: Elektronicky podpis S/MIME
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


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

2015-10-06 Thread Raz Tamir
Hi ccox,
you can see the disk id mapping to device if you execute 'ls -l
/dev/disk/by-id/' .
Second way, and easier, is to make sure you have guest-agent installed on
your guest virtual machine and using rest API you can run GET command:
GET on .../api/vms/{vm_id}/disks

You will see an attribute called "" .
I hope that helps



Thanks,
Raz Tamir
Red Hat Israel

On Tue, Oct 6, 2015 at 11:07 PM,  wrote:

> 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
>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


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

2015-10-06 Thread ccox
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

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users