[ovirt-devel] Interacting with VDSM storage without oVirt Engine
Yaniv Dary
ydary at redhat.com
Tue May 31 15:25:22 UTC 2016
Can you explain the use case? What are you trying to use VDSM for?
The API you want to use is internal and can break without notice.
Yaniv Dary
Technical Product Manager
Red Hat Israel Ltd.
34 Jerusalem Road
Building A, 4th floor
Ra'anana, Israel 4350109
Tel : +972 (9) 7692306
8272306
Email: ydary at redhat.com
IRC : ydary
On Wed, May 25, 2016 at 8:29 PM, Hayley Swimelar <hayley at linbit.com> wrote:
>
>
> On 05/25/2016 02:00 AM, Martin Sivak wrote:
>
>> Hi,
>>
>> I do not remember exacly, but you might check the source code of
>> hosted engine's VdsmBackend where we do that too.
>>
>>
>> https://gerrit.ovirt.org/gitweb?p=ovirt-hosted-engine-ha.git;a=blob;f=ovirt_hosted_engine_ha/lib/storage_backends.py;h=f2fbdc43d0e4afd7539a3a1de75de0cb07bdca9d;hb=a012f184584af20d3dba8038d73b8d9b447af7b3
>>
>> I think you are missing the prepareImage call.
>>
>
> I think that prepareImage is probably the missing piece to this; however,
> it seems that the hosted engine's create_volume method with calls
> _get_volume_path which calls prepareImage.
>
> vdsClient's prepareImage command takes a volume UUID as an agrument I've
> tried passing the new UUID I created for the createVolume command, the UUID
> returned from that command, and a fresh UUID. All of these return the same
> error: Volume does not exist
>
> I've also tried manually creating the image directory under the storage
> domain directory with the same results for all commands.
>
>
>
>> Regards
>>
>> --
>> Martin Sivak
>> SLA / oVirt
>>
>> On Wed, May 25, 2016 at 1:44 AM, Hayley Swimelar <hayley at linbit.com>
>> wrote:
>>
>>> Hello all,
>>>
>>> Like the title says, I need to work with VDSM's storage layer without
>>> involving the engine.
>>>
>>> Presently, I'm testing this with NFS domains and have been able to use
>>> vdsClient to create, attach, and activate a new storage domain, but I
>>> have
>>> not been able to create a new image or volume.
>>>
>>> Here are the commands I ran to get to this step, starting with a nfs
>>> volume
>>> already mounted on the machine I ran the commands on.
>>>
>>> ----
>>> vdsClient -s host_name createStorageDomain 1
>>> 97338d5c-9b6f-1859-b827-e977ed082e53 cli_domain storage_server:/data
>>>
>>> vdsClient -s host_name attachStorageDomain
>>> 97338d5c-9b6f-1859-b827-e977ed082e53 00000001-0001-0001-0001-00000000033c
>>>
>>> vdsClient -s host_name activateStorageDomain
>>> 97338d5c-9b6f-1859-b827-e977ed082e53 00000001-0001-0001-0001-00000000033c
>>>
>>> vdsClient -s frodo createVolume 97338d5c-9b6f-1859-b827-e977ed082e53
>>> 00000001-0001-0001-0001-00000000033c 0288f410-71f1-4b7d-bdb7-e815a93e34ef
>>> 53690000000 5 1 2 96d7726c-6969-40a5-84bd-0925496b6051 cli_volume
>>> ----
>>>
>>> The last command outputs a new UUID, but there is nothing under
>>>
>>> /rhev/data-center/00000001-0001-0001-0001-00000000033c/97338d5c-9b6f-1859-b827-e977ed082e53/images/
>>> directory.
>>>
>>> If I pass createVolume an existing image/storage domain UUID, the command
>>> still outputs a new UUID, but nothing changes under the images directory.
>>>
>>> Is there a step that I am missing somewhere in this process?
>>>
>>> --
>>> Hayley Swimelar
>>> LINBIT | Keeping the Digital World Running
>>> DRBD — Corosync — Pacemaker
>>> +1-503-573-1262 x212
>>> _______________________________________________
>>> Devel mailing list
>>> Devel at ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/devel
>>>
>>
> --
> Hayley Swimelar
> LINBIT | Keeping the Digital World Running
> DRBD — Corosync — Pacemaker
> +1-503-573-1262 x212
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/devel/attachments/20160531/a7e3a43b/attachment-0001.html>
More information about the Devel
mailing list