Managing SMB shares by using imperative method
Learn how to create, list, or remove SMB shares by using imperative specific command-line instructions.
Before you begin
- Ensure that the SMB module is configured with
cephadmorchestration to function properly. - Gather information about the domain if you are using active-directory.
- Create a domain user to join to active directory (AD).
- Determine whether you need to use custom_dns setting.
- Which users to define if you are not using AD.
About this task
This method uses commands like ceph smb share create and ceph smb share rm, similar to those used in Ceph NFS manager module on the command line.
Creating SMB shares
About this task
Learn to create SMB shares by using the imperative method.
Procedure
ceph smb share create CLUSTER_ID SHARE_ID CEPHFS_VOLUME PATH [--share-name=SHARE_NAME] [--subvolume=SUBVOLUME_NAME] [--readonly]
Use the CLUSTER_ID that is provided while creating the SMB cluster. For more information, see Managing SMB clusters by using imperative method.
| Parameters | Description |
|---|---|
| cluster_id | A short string uniquely identifying the cluster. |
| share_id | A short string uniquely identifying the share |
| cephfs_volume | The name of the CephFS volume to be shared. |
| path | A path relative to the root of the volume and/or subvolume. |
| share_name | Optional. The public name of the share, visible to clients. If not provided the
share_id will be used automatically. |
| subvolume |
Optional. A subvolume name in the form |
| readonly | Creates a read-only share. |
Removing SMB shares
About this task
Learn to remove SMB shares by using the imperative method.
Procedure
ceph smb share rm CLUSTER_ID SHARE_ID
Listing SMB shares
About this task
The listing of cluster IDs output defaults to JSON, select YAML encoding with
the --format=yaml option.
Procedure
ceph smb share ls CLUSTER_ID [--format=FORMAT]