PowerScale Driver¶
The EMC manila driver framework (EMCShareDriver) utilizes Dell storage products to provide shared filesystems to OpenStack. The EMC manila driver is a plugin based driver which is designed to use different plugins to manage different Dell storage products.
The PowerScale manila driver is a plugin for the EMC manila driver framework which allows manila to interface with an PowerScale backend to provide a shared filesystem. The EMC driver framework with the PowerScale plugin is referred to as the “PowerScale Driver” in this document.
This PowerScale Driver interfaces with an PowerScale cluster via the REST PowerScale Platform API (PAPI) and the RESTful Access to Namespace API (RAN).
Requirements¶
PowerScale cluster running OneFS 9.10 or higher
Supported Operations¶
The following operations are supported on an PowerScale cluster:
Create CIFS/NFS Share
Delete CIFS/NFS Share
- Allow CIFS/NFS Share access
Only IP access type is supported for NFS and CIFS
Only RW access supported
Deny CIFS/NFS Share access
Create snapshot
Delete snapshot
Create share from snapshot
Extend share
Backend Configuration¶
The following parameters need to be configured in the manila configuration file for the PowerScale driver:
share_driver = manila.share.drivers.dell_emc.driver.EMCShareDriver
driver_handles_share_servers = False
emc_share_backend = powerscale
emc_nas_server = <IP address of PowerScale cluster>
emc_nas_server_port = <port to use for PowerScale cluster (optional)>
emc_nas_login = <username>
emc_nas_password = <password>
emc_nas_root_dir = <root directory path to create shares (e.g./ifs/manila)>
Restart of manila-share service is needed for the configuration changes to take effect.
Restrictions¶
The PowerScale driver has the following restrictions:
Only IP access type is supported for NFS and CIFS.
Only FLAT network is supported.
The manila.share.drivers.dell_emc.driver Module¶
EMC specific NAS storage driver. This driver is a pluggable driver that allows specific EMC NAS devices to be plugged-in as the underlying backend. Use the Manila configuration variable “share_backend_name” to specify, which backend plugins to use.
- class EMCShareDriver(*args, **kwargs)
Bases:
ShareDriverEMC specific NAS driver. Allows for NFS and CIFS NAS storage usage.
- allow_access(context, share, access, share_server=None)
Allow access to the share.
- check_for_setup_error()
Check for setup error.
- create_share(context, share, share_server=None)
Is called to create share.
- create_share_from_snapshot(context, share, snapshot, share_server=None, parent_share=None)
Is called to create share from snapshot.
- create_snapshot(context, snapshot, share_server=None)
Is called to create snapshot.
- delete_share(context, share, share_server=None)
Is called to remove share.
- delete_snapshot(context, snapshot, share_server=None)
Is called to remove snapshot.
- deny_access(context, share, access, share_server=None)
Deny access to the share.
- do_setup(context)
Any initialization the share driver does while starting.
- ensure_share(context, share, share_server=None)
Invoked to sure that share is exported.
- ensure_shares(context, shares)
Invoked to ensure that shares are exported.
- extend_share(share, new_size, share_server=None)
Is called to extend share.
- get_backend_info(context)
Get driver and array configuration parameters.
- get_configured_ip_versions()
“Get allowed IP versions.
The supported versions are returned with list, possible values are: [4], [6], or [4, 6]
Drivers that assert ipv6_implemented = True must override this method. If the returned list includes 4, then shares created by this driver must have an IPv4 export location. If the list includes 6, then shares created by the driver must have an IPv6 export location.
Drivers should check that their storage controller actually has IPv4/IPv6 enabled and configured properly.
- get_default_filter_function()
Get the default filter_function string.
Each driver could overwrite the method to return a well-known default string if it is available.
- Parameters:
pool – pool name to get the filter or None
- Returns:
None
- get_network_allocations_number()
Returns number of network allocations for creating VIFs.
- get_share_server_network_info(context, share_server, identifier, driver_options)
Obtain network allocations used by share server.
- Parameters:
context – Current context.
share_server – Share server model.
identifier – A driver-specific share server identifier
driver_options – Dictionary of driver options to assist managing the share server
- Returns:
A list containing IP addresses allocated in the backend.
Example:
['10.10.10.10', 'fd11::2000', '192.168.10.10']
- get_share_status(shares, share_server)
Invoked to get share status.
- manage_existing(share, driver_options)
manage an existing share
- manage_existing_snapshot(snapshot, driver_options)
manage an existing share snapshot
- manage_existing_snapshot_with_server(snapshot, driver_options, share_server=None)
manage an existing share snapshot
- manage_existing_with_server(share, driver_options, share_server=None)
manage an existing share
- manage_server(context, share_server, identifier, driver_options)
Manage the share server and return compiled back end details.
- Parameters:
context – Current context.
share_server – Share server model.
identifier – A driver-specific share server identifier
driver_options – Dictionary of driver options to assist managing the share server
- Returns:
Identifier and dictionary with back end details to be saved in the database.
Example:
'my_new_server_identifier',{'server_name': 'my_old_server'}
- revert_to_snapshot(context, snapshot, share_access_rules, snapshot_access_rules, share_server=None)
Reverts a share (in place) to the specified snapshot.
Does not delete the share snapshot. The share and snapshot must both be ‘available’ for the restore to be attempted. The snapshot must be the most recent one taken by Manila; the API layer performs this check so the driver doesn’t have to.
The share must be reverted in place to the contents of the snapshot. Application admins should quiesce or otherwise prepare the application for the shared file system contents to change suddenly.
- Parameters:
context – Current context
snapshot – The snapshot to be restored
share_access_rules – List of all access rules for the affected share
snapshot_access_rules – List of all access rules for the affected snapshot
share_server – Optional – Share server model or None
- Returns:
None for synchronous revert completion, or a dict with
{'status': 'reverting_to_snapshot'}to indicate the operation is running asynchronously. When returning async status, the share manager will poll the driver viaget_share_statusto track completion.
- shrink_share(share, new_size, share_server=None)
Is called to shrink share.
- snapshot_update_access(context, snapshot, access_rules, add_rules, delete_rules, share_server=None)
Update snapshot access
- unmanage(share)
Removes the specified share from Manila management.
Does not delete the underlying backend share.
For most drivers, this will not need to do anything. However, some drivers might use this call as an opportunity to clean up any Manila-specific configuration that they have associated with the backend share.
If provided share cannot be unmanaged, then raise an UnmanageInvalidShare exception, specifying a reason for the failure.
This method is invoked when the share is being unmanaged with a share type that has
driver_handles_share_serversextra-spec set to False.
- unmanage_server(server_details, security_services=None)
Unmanages the share server.
If a driver supports unmanaging of share servers, the driver must override this method and return successfully.
- Parameters:
server_details – share server backend details.
security_services – list of security services configured with this share server.
- unmanage_snapshot(snapshot)
Removes the specified snapshot from Manila management.
Does not delete the underlying backend share snapshot.
For most drivers, this will not need to do anything. However, some drivers might use this call as an opportunity to clean up any Manila-specific configuration that they have associated with the backend share snapshot.
If provided share snapshot cannot be unmanaged, then raise an UnmanageInvalidShareSnapshot exception, specifying a reason for the failure.
This method is invoked when the snapshot that is being unmanaged belongs to a share that has its share type with
driver_handles_share_serversextra-spec set to False.
- unmanage_snapshot_with_server(snapshot, share_server=None)
Removes the specified snapshot from Manila management.
Does not delete the underlying backend share snapshot.
For most drivers, this will not need to do anything. However, some drivers might use this call as an opportunity to clean up any Manila-specific configuration that they have associated with the backend share snapshot.
If provided share snapshot cannot be unmanaged, then raise an UnmanageInvalidShareSnapshot exception, specifying a reason for the failure.
This method is invoked when the snapshot that is being unmanaged belongs to a share that has its share type with
driver_handles_share_serversextra-spec set to True.
- unmanage_with_server(share, share_server=None)
Removes the specified share from Manila management.
Does not delete the underlying backend share.
For most drivers, this will not need to do anything. However, some drivers might use this call as an opportunity to clean up any Manila-specific configuration that they have associated with the backend share.
If provided share cannot be unmanaged, then raise an UnmanageInvalidShare exception, specifying a reason for the failure.
This method is invoked when the share is being unmanaged with a share type that has
driver_handles_share_serversextra-spec set to True.
- update_access(context, share, access_rules, add_rules, delete_rules, update_rules, share_server=None)
Update access to the share.
The manila.share.drivers.dell_emc.plugins.powerscale.powerscale Module¶
PowerScale specific NAS backend plugin.
- class PowerScaleStorageConnection(*args, **kwargs)
Bases:
StorageConnectionImplements PowerScale specific functionality for EMC Manila driver.
- allow_access(context, share, access, share_server)
Allow access to the share.
- check_for_setup_error()
Check for setup error.
- connect(emc_share_driver, context)
Connect to an PowerScale cluster.
- create_share(context, share, share_server)
Is called to create share.
- create_share_from_snapshot(context, share, snapshot, share_server)
Creates a share from the snapshot.
- create_snapshot(context, snapshot, share_server)
Is called to create snapshot.
- delete_share(context, share, share_server)
Is called to remove share.
- delete_snapshot(context, snapshot, share_server)
Is called to remove snapshot.
- deny_access(context, share, access, share_server)
Deny access to the share.
- deregister_dedupe_settings(share)
Deregister dedupe settings for a given share
- Share:
NFS/CIFS share
- ensure_share(context, share, share_server)
Invoked to ensure that share is exported.
- ensure_shares(context, shares)
Invoked to ensure that shares are exported.
- Shares:
A list of all shares for updates.
- Returns:
None or a dictionary of updates in the format.
- extend_share(share, new_size, share_server=None)
Extends a share.
- get_backend_info(context)
Get driver and array configuration parameters.
- Returns:
A dictionary containing driver-specific info.
- get_dedupe_settings(share)
Fetch dedupe settings for a given share
- Share:
NFS/CIFS share
- get_network_allocations_number()
Returns number of network allocations for creating VIFs.
- get_share_status(shares, share_server)
Get the current status of a share operation.
Checks the status of an asynchronous revert-to-snapshot job that was initiated by revert_to_snapshot and cleans up job data when complete. Snapshot status reconciliation is handled by the share manager.
- Parameters:
shares – The share dictionary containing share details
share_server – Share server information (not used for PowerScale)
- Returns:
Dictionary with current share status: - STATUS_REVERTING_ERROR if job failed - STATUS_AVAILABLE if job succeeded - STATUS_REVERTING_TO_SNAPSHOT if job still running
- manage_existing(share, driver_options)
Import an external NFS/CIFS share into Manila.
- manage_existing_snapshot(snapshot, driver_options)
Brings an existing snapshot under Manila management.
- remove_share_from_paths(share_path, paths, assess_paths)
- revert_to_snapshot(context, snapshot, share_access_rules, snapshot_access_rules, share_server)
Revert a share to the specified snapshot.
Creates and executes a SnapRevert job on the PowerScale cluster to restore the share to its state at the time of the snapshot. The job runs asynchronously and its status can be tracked using get_share_status.
- Parameters:
context – The request context
snapshot – The snapshot dictionary containing snapshot details
share_access_rules – List of access rules for the share
snapshot_access_rules – List of access rules for the snapshot
share_server – Share server information (not used for PowerScale)
- Returns:
Dictionary with status set to STATUS_REVERTING_TO_SNAPSHOT
- Raises:
ShareBackendException – If provider_location is missing
- setup_server(network_info, metadata=None)
Set up and configures share server with given network parameters.
- shrink_share(share, new_size, share_server=None)
Shrink a share by lowering its directory hard quota.
Rejects shrink if current logical usage exceeds the requested size.
- snapshot_update_access(context, snapshot, access_rules, add_rules=None, delete_rules=None, share_server=None)
Update snapshot access.
- teardown_server(server_details, security_services=None)
Teardown share server.
- update_access(context, share, access_rules, add_rules, delete_rules, share_server=None)
Update share access.
- update_share_stats(stats_dict)
Retrieve stats info from share.