Unity Driver
EMC manila driver framework (EMCShareDriver) utilizes the EMC storage products
to provide the shared filesystems to OpenStack. The EMC manila driver is a
plugin based driver which is designed to use different plugins to manage
different EMC storage products.
Unity plugin is the plugin which manages the Unity Storage System to provide
shared filesystems. EMC driver framework with Unity plugin is referred to as
Unity driver in this document.
This driver performs the operations on Unity by REST API. Each backend manages
one Unity Storage System. Multiple manila backends need to be configured to
manage multiple Unity Storage Systems.
Requirements
- Unity OE 4.0.1 or higher.
- StorOps 1.1.0 or higher is installed on Manila node.
- Following licenses are activated on Unity:
- CIFS/SMB Support
- Network File System (NFS)
- Thin Provisioning
- Fiber Channel (FC)
- Internet Small Computer System Interface (iSCSI)
Supported Operations
In detail, users are allowed to do following operation with EMC Unity
Storage Systems.
- Create/delete a NFS share.
- Create/delete a CIFS share.
- Extend the size of a share.
- Shrink the size of a share.
- Modify the host access privilege of a NFS share.
- Modify the user access privilege of a CIFS share.
- Take/Delete snapshot of a share.
- Create a new share from snapshot.
Supported Network Topologies
Pre-Configurations
On Manila Node
StorOps library is required to run Unity driver.
Please install it with the pip command.
You may need root privilege to install python libraries.
On Unity System
- Configure System level NTP Server
Configure the NTP server for your Unity at:
Unisphere -> Settings -> Management -> System Time and NTP
Select “Enable NTP synchronization” and add your NTP server(s).
- Configure System level DNS Server
Configure the DNS server for your Unity at:
Unisphere -> Settings -> Management -> DNS Server
Select “Configure DNS server address manually” and add your DNS server(s).
Configurations
Following configurations need to be configured in /etc/manila/manila.conf
for the Unity driver.
share_driver = manila.share.drivers.dell_emc.driver.EMCShareDriver
emc_share_backend = unity
emc_nas_server = <management IP address of the Unity system>
emc_nas_login = <user with administrator privilege>
emc_nas_password = <password>
emc_nas_server_container = [SPA|SPB]
emc_nas_pool_names = <Comma separated pool names>
emc_interface_ports = <Comma separated ports list>
- emc_share_backend is the plugin name. Set it to unity for the Unity
driver.
- emc_nas_server is the management IP for Unity.
- emc_nas_server_container is the SP that will be used as share server.
- emc_nas_pool_names is the name of the pools to be used by this backend.
If no name is specified, all storage pools on the system will be managed.
Wild card character is supported.
Examples: pool_1, pool_*, *
- emc_interface_ports is the white list of the ports to be used for
connection. Wild card character is supported.
Examples: spa_eth1, spa_*, *
Restart of manila-share service is needed for the configuration changes to take
effect.
IPv6 support
IPv6 support for Unity driver is introduced in Queens release. The feature is divided
into two parts:
- The driver is able to manage share or snapshot in the Neutron IPv6 network.
- The driver is able to connect Unity management interface using its IPv6 address.
Pre-Configurations for IPv6 support
The following parameters need to be configured in /etc/manila/manila.conf
for the Unity driver:
network_plugin_ipv6_enabled = True
- network_plugin_ipv6_enabled indicates IPv6 is enabled.
If you want to connect Unity using IPv6 address, you should configure IPv6 address
by /net/if/mgmt uemcli command, mgmtInterfaceSettings RESTful api or the system
settings of Unity GUI for Unity and specify the address in /etc/manila/manila.conf:
emc_nas_server = <IPv6 address>
Snapshot support
In the Mitaka and Newton release of OpenStack, Snapshot support is enabled by default for a newly created share type.
Starting with the Ocata release, the snapshot_support extra spec must be set to True in order to allow snapshots for
a share type. If the ‘snapshot_support’ extra_spec is omitted or if it is set to False, users would not be able to
create snapshots on shares of this share type. The feature is divided into two parts:
- The driver is able to create/delete snapshot of share.
- The driver is able to create share from snapshot.
Pre-Configurations for Snapshot support
The following extra specifications need to be configured with share type.
- snapshot_support = True
- create_share_from_snapshot_support = True
For new share type, these extra specifications can be set directly when creating share type:
manila type-create --snapshot_support True --create_share_from_snapshot_support True ${share_type_name} True
Or you can update already existing share type with command:
manila type-key ${share_type_name} set snapshot_support=True
manila type-key ${share_type_name} set create_share_from_snapshot_support=True
To snapshot a share and create share from the snapshot
Firstly, you need create a share from share type that has extra specifications(snapshot_support=True, create_share_from_snapshot_support=True).
Then snapshot the share with command:
manila snapshot-create ${source_share_name} --name ${target_snapshot_name} --description " "
After creating the snapshot from previous step, you can create share from that snapshot.
Use command:
manila create nfs 1 --name ${target_share_name} --metadata source=snapshot --description " " --snapshot-id ${source_snapshot_id}
Restrictions
The Unity driver has following restrictions.
- EMC Unity does not support the same IP in different VLANs.
- Only IP access type is supported for NFS.
- Only user access type is supported for CIFS.
API Implementations
Following driver features are implemented in the plugin.
- create_share: Create a share and export it based on the protocol used
(NFS or CIFS).
- create_share_from_snapshot: Create a share from a snapshot - clone a
snapshot.
- delete_share: Delete a share.
- extend_share: Extend the maximum size of a share.
- shrink_share: Shrink the minimum size of a share.
- create_snapshot: Create a snapshot for the specified share.
- delete_snapshot: Delete the snapshot of the share.
- update_access: recover, add or delete user/host access to a share.
- allow_access: Allow access (read write/read only) of a user to a
CIFS share. Allow access (read write/read only) of a host to a NFS
share.
- deny_access: Remove access (read write/read only) of a user from
a CIFS share. Remove access (read write/read only) of a host from a
NFS share.
- ensure_share: Check whether share exists or not.
- update_share_stats: Retrieve share related statistics from Unity.
- get_network_allocations_number: Returns number of network allocations for
creating VIFs.
- setup_server: Set up and configures share server with given network
parameters.
- teardown_server: Tear down the share server.
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: manila.share.driver.ShareDriver
EMC 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)
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.
-
extend_share
(share, new_size, share_server=None)
Is called to extend share.
-
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_network_allocations_number
()
Returns number of network allocations for creating VIFs.
-
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
|
-
shrink_share
(share, new_size, share_server=None)
Is called to shrink share.
-
update_access
(context, share, access_rules, add_rules, delete_rules, share_server=None)
Update access to the share.
The manila.share.drivers.dell_emc.plugins.unity.connection
Module
Unity backend for the EMC Manila driver.
-
class
UnityStorageConnection
(*args, **kwargs)
Bases: manila.share.drivers.dell_emc.plugins.base.StorageConnection
Implements Unity specific functionality for EMC Manila driver.
-
IP_ALLOCATIONS
= 1
-
allow_access
(context, share, access, share_server=None)
Allow access to a share.
-
check_for_setup_error
()
Check for setup error.
-
clear_access
(share, white_list=None)
-
connect
(emc_share_driver, context)
Connect to Unity storage.
-
create_share
(context, share, share_server=None)
Create a share and export it based on protocol used.
-
create_share_from_snapshot
(context, share, snapshot, share_server=None)
Create a share from a snapshot - clone a snapshot.
-
create_snapshot
(context, snapshot, share_server=None)
Create snapshot from share.
-
delete_share
(context, share, share_server=None)
Delete a share.
-
delete_snapshot
(context, snapshot, share_server=None)
Delete a snapshot.
-
deny_access
(context, share, access, share_server)
Deny access to a share.
-
ensure_share
(context, share, share_server)
Ensure that the share is exported.
-
extend_share
(share, new_size, share_server=None)
Invoked to extend share.
-
get_network_allocations_number
()
Returns number of network allocations for creating VIFs.
-
get_pool
(share)
Get the pool name of the share.
-
revert_to_snapshot
(context, snapshot, share_access_rules, snapshot_access_rules, share_server=None)
Reverts a share (in place) to the specified snapshot.
-
setup_server
(network_info, metadata=None)
Set up and configures share server with given network parameters.
-
shrink_share
(share, new_size, share_server=None)
Shrinks a share to new size.
Parameters: |
- share – Share that will be shrunk.
- new_size – New size of share.
- share_server – Data structure with share server information.
Not used by this driver.
|
-
teardown_server
(server_details, security_services=None)
Teardown share server.
-
update_access
(context, share, access_rules, add_rules, delete_rules, share_server=None)
Update access rules for given share.
-
update_share_stats
(stats_dict)
Communicate with EMCNASClient to get the stats.
-
static
validate_network
(network_info)
-
validate_port_configuration
(port_ids_conf)
Initializes the SP and ports based on the port option.