How to find the relation between "list storagedomains" and "list storageconnections"?
2017-03-07 17:55 GMT+01:00 Duarte Fernandes Rocha <[email protected]>: > 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 <[email protected]> > > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.ovirt.org/mailman/listinfo/users > >
_______________________________________________ Users mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/users

