connector
– Connector¶Brick Connector objects for each supported transport protocol.
The connectors here are responsible for discovering and removing volumes for each of the supported transport protocols.
Build a Connector object based upon protocol and architecture.
Connector class to attach/detach iSCSI volumes.
Attach the volume to instance_name.
connection_properties (dict) – The valid dictionary that describes all of the target volume attributes.
dict
connection_properties for iSCSI must include: target_portal(s) - ip and optional port target_iqn(s) - iSCSI Qualified Name target_lun(s) - LUN id of the volume Note that plural keys may be used when use_multipath=True
Detach the volume from instance_name.
connection_properties (dict that must include: target_portal(s) - IP and optional port target_iqn(s) - iSCSI Qualified Name target_lun(s) - LUN id of the volume) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
force (bool) – Whether to forcefully disconnect even if flush fails.
ignore_errors (bool) – When force is True, this will decide whether to ignore errors or raise an exception once finished the operation. Default is False.
Connector class to attach/detach Fibre Channel volumes.
Attach the volume to instance_name.
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
dict
connection_properties for Fibre Channel must include: target_wwn - World Wide Name target_lun - LUN id of the volume
Detach the volume from instance_name.
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
connection_properties for Fibre Channel must include: target_wwn - World Wide Name target_lun - LUN id of the volume
“Connector class to attach/detach File System backed volumes.
Connect to a volume.
connection_properties (dict) –
The dictionary that describes all of the
target volume attributes. connection_properties
must include:
device_path
- path to the volume to be connected
dict
Disconnect a volume from the local host.
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
“Connector class to attach/detach SDSHypervisor volumes.
Connect to a volume.
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
dict
Disconnect a volume from the local host.
connection_properties (dict) – The dictionary that describes all of the target volume attributes.
device_info (dict) – historical difference, but same as connection_props
Connector class to attach/detach NVMe-oF volumes.
Attach and discover the volume.
Flush the volume.
Disconnect of volumes happens on storage system side. Here we could remove connections to subsystems if no volumes are left. But new volumes can pop up asynchronously in the meantime. So the only thing left is flushing or disassembly of a correspondng RAID device.
connection_properties (dict) – The dictionary that describes all of the target volume attributes as described in connect_volume but also with the “device_path” key containing the path to the volume that was connected (this is added by Nova).
device_info (dict) – historical difference, but same as connection_props
Update an attached volume to reflect the current size after extend
The only way to reflect the new size of an NVMe-oF volume on the host is a rescan, which rescans the whole subsystem. This is a problem on attach_volume and detach_volume, but not here, since we will have at least the namespace we are operating on in the subsystem.
The tricky part is knowing when a rescan has already been completed and the volume size on sysfs is final. The rescan may already have happened before this method is called due to an AER message or we may need to trigger it here.
Scans can be triggered manually with ‘nvme ns-rescan’ or writing 1 in configf’s rescan file, or they can be triggered indirectly when calling the ‘nvme list’, ‘nvme id-ns’, or even using the ‘nvme admin-passthru’ command.
Even after getting the new size with any of the NVMe commands above, we still need to wait until this is reflected on the host device, because we cannot return to the caller until the new size is in effect.
If we don’t see the new size taking effect on the system after 5 seconds, or if we cannot get the new size with nvme, then we rescan in the latter and in both cases we blindly wait 5 seconds and return whatever size is present.
For replicated volumes, the RAID needs to be extended.
Return paths where the volume is present.
The NVMe-oF connector properties (initiator uuid and nqn.)
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.