CLI Client: Shares
This page describes how to use the Openstack CLI client to manage CephFS shares.
List Existing Shares
openstack share list
List all shares in your project.
Create a Share
--description <share-description>
: additional share descriptions
openstack share create --name <new-share-name> CephFS <size-in-GiB>
Create a new share with the specified size in GB. Only CephFS shares are supported.
After a share is created, add share rules to create credentials for clients to access the newly created share.
Option:
--name <new-share-name>
: share name
Example: openstack share create --name my_new_cephfs_share CephFS 100
Resize a Share
openstack share resize <share-name-or-id> <size-in-GiB>
Resize the share to the specified size. The new share size will take effect for all connected clients immediately.
Delete a Share
openstack share delete <share-name-or-id>
Delete the specified share.
List Existing Share Rules
openstack share access list <share-name-or-id>
List existing share rules for the specified share.
Add a Share Rule
openstack share access create --access-level <access-level> <share-name-or-id> cephx <access-to>
Create a share rule(Cephx keyring) for a CephFS client to access the share. We recommend creating and naming a share rule per CephFS client so each client's access can be revoked by deleting the client's share rule.
Required options:
<access-level>
: Read/Write(rw
) or Read-Only(ro
)<access-to>
: Name of the share rule (CephFS client's hostname)
For example: openstack share access create --access-rule rw my_new_cephfs_share cephx myworkstation1
Now you can follow these instructions on the client to access the CephFS share.
Remove a Share Rule
openstack share access delete <share-name-or-id> <access-rule-id>