[ovirt-users] OVirt new cluster host only logins on one iSCSI

Marcin Kruk askifyouneed at gmail.com
Thu Mar 16 13:08:05 UTC 2017


How to find the relation between "list storagedomains" and "list
storageconnections"?

2017-03-07 17:55 GMT+01:00 Duarte Fernandes Rocha <dfr at eurotux.com>:

> Hello,
>
>
>
> For anyone interested this is how I solved the problem.
>
>
>
> First, please note that as I mentioned earlier the OVirt documentation
> states that ALL the iscsi sessions/paths must be configured when adding the
> storage domain:
>
>
>
> http://www.ovirt.org/documentation/admin-guide/chap-Storage/
>
> Adding iSCSI Storage
>
> ...
>
> Important: If more than one path access is required, ensure to discover
> and log in to the target through all the required paths. Modifying a
> storage domain to add additional paths is currently not supported.
>
>
>
> So one way to fix this issue is:
>
>
>
> 1. Put the Storage domain under maintenance
>
> 2. Remove the storage domain from the datacenter (do not wipe/format)
>
> 3. Import storage domain using all the iscsi paths
>
>
>
> Another way that I think is better because it does not involve deleting
> the storage domain is to use the REST API and/or OVirt Shell.
>
>
>
> The storage domain must be in maintenance and the iscsi storage connection
> must exist. The upside is that the storage domain does not have to be
> deleted and imported which may not be easy if there are VMs using that
> storage domain.
>
>
>
> First we need to have the storage domain ID and the storage connection ID
> (this one I got using the first method on an empty LUN)
>
>
>
>
>
> [oVirt shell (connected)]# list storagedomains
>
>
>
> id : d591d9f0-.....
>
> name : ISO_DOMAIN
>
> description: ISO_DOMAIN
>
>
>
> id : 7d30dff2-.....
>
> name : LUN
>
> description: ISCSI LUN
>
>
>
>
>
> [oVirt shell (connected)]# list storageconnections
>
>
>
> id : b793b463-.....
>
>
>
> id : 65300f39-....
>
>
>
> [oVirt shell (connected)]# show storageconnection 65300f39-ac93-423a-9692-
> 15984f842ae2
>
>
>
> id : 65300f39-.....
>
> address : ip.addr.x.x
>
> port : 3260
>
> target : iqn.1992-04....
>
> type : iscsi
>
> username: username
>
>
>
> With this info make a POST request to the API using curl
>
>
>
> #!/bin/sh -ex
>
>
>
> # https://ovirt.addr/ovirt-engine/api/storagedomains/STORAGE-DOMAIN-ID/
> storageconnections
>
>
>
> url="https://ovirt.addr/ovirt-engine/api/storagedomains/521fcfdc-...../
> storageconnections"
>
> User="admin at internal"
>
> password="*********"
>
>
>
> curl \
>
> --insecure \
>
> --user "${user}:${password}" \
>
> --request POST \
>
> --header "Accept: application/xml" --header "Content-Type:
> application/xml" \
>
> --data '
>
> <storage_connection id="430ee71d-......">
>
> </storage_connection>
>
> ' \
>
> "${url}"
>
>
>
> If there are easier/simpler ways please let me know =)
>
>
>
> --
>
> Duarte Fernandes Rocha <dfr at eurotux.com>
>
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170316/aca32c34/attachment.html>


More information about the Users mailing list