10.4. Adding and removing shares by using manage/unmanage
You can manage file shares that already exist in storage by using the manage/unmanage feature of the Shared File Systems service (manila). Users can perform operations on managed shares, such as granting access, mounting, and resizing, in the same way that they perform these operations on Shared File Systems service shares.
You can manage the lifecycle of shares that have the driver_handles_share_servers (DHSS) parameter set to true and shares that have DHSS set to false. To manage DHSS=true shares, you must also manage the share server that contains the share.
When you unmanage a share, you remove the share from the management of the Shared File Systems service without deleting the share. If shares have dependent snapshots or share replicas, you can only remove the shares from the Shared File Systems service when the snapshots or share replicas have been removed.
- Limitations
- The driver must support manage/unmanage functionality.
- The manage/unmanage feature does not support native CephFS or CephFS-NFS back ends. You can remove CephFS shares from the management of the Shared File Systems service. However, you cannot bring existing CephFS shares under the management of the Shared File Systems service.
- When you bring a share under the management of the Shared File Systems service, existing clients are disconnected. When you remove a share from the management of the Shared File Systems service, existing clients remain connected.
Procedure
Access the remote shell for the
openstackclientpod from your workstation:$ oc rsh -n openstack openstackclientManage a share:
$ openstack share adopt --name <name> --description <description> --share-type <share_type> --driver-options [<key=value> [<key=value> ...]] [--public] [--share-server-id <share_server_id>] \ [--wait] <service_host> <protocol> <export_path>-
Replace
<name>with a descriptive name for the share. -
Replace
<description>with a description of the share. -
Replace
<share_type>with the share type of the share. -
Replace
<key=value>with the key-value pair of the driver property you want to associate to your share. You can use multiple key-value pairs you want to associate to your image. -
Replace
<share_server_id>with ID of your share server. -
Replace
<service_host>with the host server. -
Replace
<protocol>with the NAS protocol of the share, for example,nfs. -
Replace
<export_path>with the export path of the share.
-
Replace
Verify that the share is available:
$ openstack share show <name>Unmanage a share:
$ openstack share abandon [--wait] <name>Exit the
openstackclientpod:$ exit