The cinder.volume.drivers.hitachi.hnas_backend
Module¶
Hitachi Unified Storage (HUS-HNAS) platform. Backend operations.
-
class
HNASSSHBackend
(backend_opts)¶ Bases:
object
-
check_snapshot_parent
(volume_path, snap_name, fs_label)¶ Check if a volume is the snapshot source
Parameters: - volume_path – path of the volume
- snap_name – name of the snapshot
- fs_label – filesystem label
Returns: True if the volume is the snapshot’s source or False otherwise
-
file_clone
(fs_label, src, name)¶ Clones NFS files to a new one named ‘name’.
Clone primitive used to support all NFS snapshot/cloning functions.
Parameters: - fs_label – file system label of the new file
- src – source file
- name – target path of the new created file
-
get_cloned_file_relatives
(file_path, fs_label, raise_except=False)¶ Gets the files related to a clone
Parameters: - file_path – path of the cloned file
- fs_label – filesystem of the cloned file
- raise_except – If True exception will be raised for files that
aren’t clones. If False, only an error message is logged. :returns: list with names of the related files
-
get_evs
(fs_label)¶ Gets the EVS ID for the named filesystem.
Parameters: fs_label – The filesystem label related to the EVS required Returns: EVS ID of the filesystem
-
get_evs_info
()¶ Gets the IP addresses of all EVSs in HNAS.
Returns: dictionary with EVS information - evs_info={
- <IP1>: {evs_number: number identifying the EVS1 on HNAS}, <IP2>: {evs_number: number identifying the EVS2 on HNAS}, …
}
-
get_export_list
()¶ Gets information on each NFS export.
Returns: a list of the exports configured on HNAS
-
get_export_path
(export, fs_label)¶ Gets the path of an export on HNAS
Parameters: - export – the export’s name
- fs_label – the filesystem name
Returns: string of the export’s path
-
get_fs_info
(fs_label)¶ Gets the information of a given FS.
Parameters: fs_label – Label of the filesystem Returns: dictionary with FS information - fs_info={
- ‘id’: a Logical Unit ID, ‘label’: a Logical Unit name, ‘evs_id’: the ID of the EVS in which the filesystem is created (not present if there is a single EVS), ‘total_size’: the total size of the FS (in GB), ‘used_size’: the size that is already used (in GB), ‘available_size’: the free space (in GB) }
-
get_version
()¶ Gets version information from the storage unit.
Returns: dictionary with HNAS information - storage_version={
- ‘mac’: HNAS MAC ID, ‘model’: HNAS model, ‘version’: the software version, ‘hardware’: the hardware version, ‘serial’: HNAS serial number}
-