The mmdas command

The mmdas command manages IBM Spectrum Scale Data Access Services (DAS) service instances, accounts, and exports.

Synopsis

mmdas service create ServiceName --acceptLicense
                                 --ipRange IPAddressRange --scaleFactor ScaleFactor
                                 [ --scaleDataBackend FileSystemMountPoint ]
                                 [ --dbStorageClass CSIFilesetName ]
                                 [ --help ]  

or

mmdas service delete ServiceName [ --help ] 

or

mmdas service list [ ServiceName ] [ --output OutputFormat ] [ --help ] 

or

mmdas service update ServiceName { --enable | --disable } --scaleFactor ScaleFactor 
                                 { --enableMD5 | --disableMD5 } { --enableAutoHA | --disableAutoHA } [ --help ]

or

mmdas account create AccountName [ --gid GroupID ] [ --newBucketsPath BucketsPath ]
                                 [ --uid UserID ] [ --help ] 

or

mmdas account delete [ AccountName | UserID:GroupID ] [ --help ]

or

mmdas account list [ AccountName | UserID:GroupID ] [ --output OutputFormat ] [ --help ]

or

mmdas account update AccountName [ --newBucketsPath BucketsPath ] 
                                 [ --resetKeys ][ --help ]

or

mmdas export create ExportName  [ --filesystemPath FileSystemPath ] [ --help ] 

or

mmdas export delete ExportName [ --help ] 

or

mmdas export list [ ExportName ] [ --output OutputFormat ] [ --help ] 

Availability

Available on all IBM Spectrum Scale editions.

Description

Use the mmdas command to manage IBM Spectrum Scale Data Access Services (DAS) cluster. The mmdas command communicates with the IBM Spectrum Scale DAS REST interface for performing the management functions.
Prerequisite: Before you can use the mmdas command, you must complete the post deployment steps. For more information, see Example configuration of IBM Spectrum Scale DAS.

Parameters

service
Manages the IBM Spectrum Scale DAS instance with one of the following actions.
create
Creates an IBM Spectrum Scale DAS S3 service instance with the specified parameters.
ServiceName
Specifies the name of the service instance that you want to create. IBM Spectrum Scale DAS only supports s3 as service instance name.
--acceptLicense
Accepts the IBM Spectrum Scale license. If you do not use this option, the license is not accepted.
--dbStorageClass CSIFilesetName
Optional. Specifies the name of the storage class to configure a database for the S3 service.
Note: The dbStorageClass parameter is optional. The IBM Spectrum Scale DAS operator selects the storage classes defined on the OCP cluster by using spectrumscale.csi.ibm.com, if there is only one such storage class. If there are more than one storage classes defined on the OCP cluster using spectrumscale.csi.ibm.com as the provisioner, the DAS operator cannot automatically select one of those to configure the S3 service with. In such a scenario, you need to specify which of those storage classes must be used to configure the S3 service.
--scaleDataBackend FileSystemMountPoint
Optional. Specifies the file system mount point that is to be enabled for the S3 service interface.
Note: IBM Spectrum Scale DAS only supports scaleDataBackend with the S3 service.
--ipRange IPAddressRange
Specifies the range of IP addresses that is to be used for the MetalLB configuration.
IPAddressRange has the following requirements:
  • It must be in the format: x.x.x.x-x.x.x.x
  • It must be in a sequence. For example, 192.0.2.11-192.0.2.15
  • It must match the number of OCP nodes which are labeled for IBM Spectrum Scale usage; nodes that have the scale=true label.
--scaleFactor ScaleFactor
Specifies the number of IBM Spectrum Scale DAS labeled nodes on which the service endpoints can scale to. The default value is 1.
Note: Select a scale factor according to your requirements at the time of creating the service because the scale factor must not be changed during active I/O.
delete
Deletes the specified IBM Spectrum Scale DAS service instance.
ServiceName
Specifies the service instance that you want to delete. IBM Spectrum Scale DAS only supports s3 as service instance name.
list
Displays the information for the specified IBM Spectrum Scale DAS service instance or all service instances.
ServiceName
Specifies the name of the service instance for which you want to display the information. IBM Spectrum Scale DAS only supports s3 as service instance name.
--output OutputFormat
Optional. Specifies the format of the output. You can specify json to generate output in the JSON format. The default output format is text.
update
Enables or disables the IBM Spectrum Scale DAS service instance.
ServiceName
Specifies the name of the service instance. IBM Spectrum Scale DAS only supports s3 as service instance name.
--disable
Disables the specified service instance.
--enable
Enables the specified service instance.
--disableMD5
Disables md5sum calculation for S3 objects at the S3 service level. The md5sum calculation is disabled by default.
--enableMD5
Enables md5sum calculation for S3 objects at the S3 service level.
--disableAutoHA
Disables automatic IP address failover and failback. Automatic IP address failover and failback is enabled at the time of the creation of the service instance.
--enableAutoHA
Enables automatic IP address failover and failback.
--scaleFactor ScaleFactor
Specifies the number of IBM Spectrum Scale DAS labeled nodes on which the service endpoints can scale to.
Note:
  • You must not change --scaleFactor during active I/O, otherwise I/O failure might occur. Change the scale factor during a maintenance window when there is no active I/O. For more information, see Changing scaleFactor might result in I/O failure.
  • You can set the --scaleFactor parameter only if the service is configured with --ipRange at the time of service creation.
account
Manages the IBM Spectrum Scale Data Access Services (DAS) S3 user accounts with one of the following actions:
create
Creates an IBM Spectrum Scale DAS S3 user account and generates the secret key and the access key for the S3 user account.
AccountName
Specifies the name of the S3 user account that you want to create.
--gid GroupID
Specifies the group ID that is associated with the S3 user account that you want to create.
--newBucketsPath BucketsPath
Optional. Specifies the file system absolute path, which acts as a base path for S3 buckets created using S3 API by this user.
Note: When you specify this parameter for creating an account, the specified path is not validated. If the specified path is not valid, an error occurs when you try to create an export. Administrators must specify the newBucketsPath to enable s3 accounts of end users to create exports using the S3 IO path. If newBucketsPath is not specified for an S3 account, by default, the S3 user cannot create new exports and gets the AccessDenied error while trying to create an export using the S3 IO path.
--uid UserID
Specifies the user ID that is associated with the S3 user account that you want to create.
delete
Deletes the specified IBM Spectrum Scale DAS S3 user account.
AccountName | UserID:GroupID
Specifies the account name or the group ID and the user ID of the S3 user account that you want delete.
list
Displays the IBM Spectrum Scale DAS S3 user account information for the specified account name or the group ID and the user ID or all user accounts.
AccountName | UserID:GroupID
Specifies the account name or the user ID and the group ID of the S3 user account for which you want to display the information.
Note: The access key and the secret key associated with an S3 user account are only displayed in the output if you specify an account name with this command.
--output OutputFormat
Specifies the format of the output. You can specify json to generate output in the JSON format. The default output format is text.
update
Updates the specified IBM Spectrum Scale DAS S3 user account.
AccountName
Specifies the name of the S3 user account that you want to update.
--newBucketsPath BucketsPath
Specifies the file system absolute path for creating new buckets for the S3 user account that you want to update.
--resetKeys
Resets the S3 user account access key and secret key.
export
Manages the IBM Spectrum Scale Data Access Services (DAS) S3 exports with one of the following actions.
create
Creates an IBM Spectrum Scale DAS S3 export access with the specified parameters.
ExportName
Specifies the name of the S3 export that you want to create. The name of the export must:
  • consist of lower case alphanumeric characters, - (dash), or . (period)
  • begin and end with an alphanumeric character
  • have a length greater than or equal to 3 characters and less than or equal to 63 characters
--filesystemPath FileSystemPath
Specifies the absolute path that is to be exported.
delete
Deletes the S3 export associated with the specified IBM Spectrum Scale DAS export name.
ExportName
Specifies the name of the S3 export that you want to delete.
list
Displays the information for the specified IBM Spectrum Scale DAS S3 export or lists all IBM Spectrum Scale DAS S3 exports.
ExportName
Specifies the name of the S3 export for which you want to display the information.
--output OutputFormat
Specifies the format of the output. You can specify json to generate output in the JSON format. The default output format is text.

Exit status

0
Successful completion.
nonzero
A failure has occurred.

Security

You must have root authority to run the mmdas command.

Examples

  • mmdas service examples:
    1. To create an IBM Spectrum Scale DAS S3 service instance and accept the IBM Spectrum Scale license with the IP address range and the scale factor specified, issue the following command:
      mmdas service create s3 --acceptLicense --ipRange "192.0.2.12-192.0.2.14" --scaleFactor 1
      A sample output is as follows:
      Create request for Spectrum Scale Data Access Service: 's3' is accepted
    2. To create an IBM Spectrum Scale DAS S3 service instance and accept the IBM Spectrum Scale license while specifying the CSI fileset for the S3 service database and the file system for the data backend for the S3 service, issue the following command:
      mmdas service create s3 --acceptLicense --ipRange "192.0.2.12-192.0.2.14" --scaleFactor 1 --dbStorageClass ibm-spectrum-scale-csi-fileset --scaleDataBackend /mnt/fs1
      A sample output is as follows:
      Create request for Spectrum Scale Data Access Service: 's3' is accepted
    3. To list the information of IBM Spectrum Scale DAS service instances, issue the following command:
      mmdas service list
      A sample output is as follows:
      Name   Enable  Phase 
      -----  -----   ------ 
      s3     true    Ready 
      • The Enable column shows whether the S3 service instance is enabled or disabled.
      • The deployment phase of the service instance shown in the Phase column can be one of the following values:
        • Ready: The service instance is ready to be used for S3 account creation or export creation.
        • Configuring: The service instance configuration is in progress.
        • Connecting: The service instance is trying to establish communication between the S3 endpoints and the S3 database.
        • Failed: The service instance configuration has failed.
        Restriction: Once you issue the service creation command, for a brief period of time, the Phase column might be empty.
    4. To list the detailed information for the IBM Spectrum Scale DAS S3 service instance, issue the following command:
      mmdas service list s3
      A sample output is as follows:
      Name   AcceptLicense   DbStorageClass                  Enable  EnableMD5
      -----  -----           --------------                  ------
      s3     true            ibm-spectrum-scale-sample       true    true
      
      ScaleDataBackend       Phase   S3Endpoints
      -----                  -----   --------------
      [/mnt/remote-sample]   Ready   [https://s3-endpoints.example.com https://192.0.2.12 https://192.0.2.13 https://192.0.2.14]
      
      IpRange                EnableAutoHA    ScaleFactor
      -----                  -----           --------------
      192.0.2.12-192.0.2.14    true            1
    5. To update the scale factor for an IBM Spectrum Scale DAS service instance, issue the following command:
      mmdas service update s3 --scaleFactor 2
      A sample output is as follows:
      Update request for Spectrum Scale Data Access Service: 's3' is accepted
    6. To enable md5sum calculation for S3 objects at the S3 service level, issue the following command:
      mmdas service update s3 --enableMD5
      A sample output is as follows:
      Update request for Spectrum Scale Data Access Service: 's3' is accepted
    7. To disable automatic IP address failover and failback, issue the following command:
      mmdas service update s3 --disableAutoHA
      A sample output is as follows.
      Update request for Spectrum Scale Data Access Service: 's3' is accepted
    8. To delete an IBM Spectrum Scale DAS service instance, issue the following command:
      mmdas service delete s3
      A sample output is as follows:
      IBM Spectrum Scale DAS service s3 delete request accepted
  • mmdas account examples:
    1. To create an IBM Spectrum Scale DAS S3 user account, issue the following command:
      mmdas account create s3user --gid 777 --uid 888 --newBucketsPath "mnt/fs1/fset1/user1_buckets"
      A sample output is as follows:
      Account is created successfully. The secret and access keys are as follows. 
      
      Secret Key					  Access Key 
      ----------			                ----------- 
      q2F4l5tt8/8mFXt8YOroVrUPx80TW6dlrVYm/zGO	47al0MTOuj98WkgHWmti 
    2. To list the account information for all IBM Spectrum Scale DAS user accounts, issue the following command:
      mmdas account list
      A sample output is as follows:
      Name       UID	GID	New buckets path 
      ----       ---	---	-----------------	 
      s3user1    888	777	/mnt/fs1/fset1/user1_buckets/s3user1_buckets	 
      
      s3user2    679	629	/mnt/fs1/fset1/user1_buckets/s3user2_buckets	 
      
      s3user3    478	128	/mnt/fs1/fset1/user1_buckets/s3user3_buckets	 
      
      s3user4    471	127	/mnt/fs1/fset1/user1_buckets/s3user4_buckets 
      
      s3user5    431	124	/mnt/fs1/fset1/user1_buckets/s3user5_buckets
    3. To list the account information for a specified S3 user account in the JSON format, issue the following command:
      mmdas account list s3user1 -o json
      A sample output is as follows:
      {"name":"s3user1","uid":888,"gid":777,"new_buckets_path":"/mnt/fs1/fset1/user1_buckets/s3user1_buckets",
      "access_key":"47al0MTOuj98WkgHWmti","secret_key":"q2F4l5tt8/8mFXt8YOroVrUPx80TW6dlrVYm/zGO"}
    4. To delete an IBM Spectrum Scale DAS S3 user account by specifying the account name, issue the following command:
      mmdas account delete s3user1
      A sample output is as follows:
      Account is successfully deleted
      Note: Before deleting the S3 user account, you must delete the associated exports.
    5. To delete an IBM Spectrum Scale Data Access Services (DAS) S3 user account by specifying the group ID and user ID, issue the following command:
      mmdas account delete 888:777
      A sample output is as follows:
      Account is successfully deleted
      Note: Before deleting the S3 user account, you must delete the associated exports.
    6. To update the bucket path and reset the access and secret keys for an IBM Spectrum Scale DAS S3 user account, issue the following command:
      mmdas account update s3user2 --newBucketsPath "mnt/fs1/fset1/sharedBuckets" --resetKeys
      A sample output is as follows:
      Account is successfully updated
  • mmdas export examples:
    1. To create an IBM Spectrum Scale DAS S3 export, issue the following command:
      mmdas export create bucket2 --filesystemPath /mnt/fs1/fset1/bucket1
      A sample output is as follows:
      Export is successfully created
    2. To list all IBM Spectrum Scale DAS S3 exports, issue the following command:
      mmdas export list
      A sample output is as follows:
      Name 
      ------ 
      bucket2 
      bucket2user1 
      user1bucket1
    3. To list the information of an IBM Spectrum Scale DAS S3 export, issue the following command:
      mmdas export list bucket2
      A sample output is as follows:
      Name       Filesystem Path         		 
      -----      -----------------       		 
      
      bucket2   /mnt/fs1/fset1/bucket1 
    4. To delete an IBM Spectrum Scale DAS S3 export, issue the following command:
      mmdas export delete bucket3
      A sample output is as follows:
      Export is successfully deleted

Location

/usr/local/bin