mmafmcosconfig command
Creates and displays an AFM to cloud object storage fileset.
Synopsis
mmafmcosconfig Device FilesetName --endpoint http[s]://{[Region@]Server |
[Region@]ExportMap}[:port]
[--object-fs {--convert --cleanup} --xattr --ssl-cert-verify --user-keys
{--bucket BucketName | --new-bucket BucketName} --dir Path
{--policy PolicyFile | --tmpdir DirectoryPattern --tmpfile FilePattern}
--quota-files NumberOfFiles --quota-blocks NumberOfBlocks
--uid UID --gid GID --perm Permission --mode AccessMode
--fast-readdir --chunk-size Size --read-size Size --fast-readdir2
--acls {--vhb | --gcs | --azure} --prefix Prefix --directory-object
--async-prefetch-interval Value --verbose]
or
mmafmcosconfig Device FilesetName --report
Availability
Available on all IBM Storage Scale editions.
Description
The mmamfcosconfig command constructs a new AFM to cloud object storage fileset with the specified name parameters. A single command is provided to create and link the AFM to cloud object storage fileset. You can specify the parameters such as policies, mode, and permissions to save running extra commands. To modify any parameters after the creation of the AFM to cloud object storage fileset, you need to run a specific command separately such as establishing policy or modifying quota on the fileset.
A report that has all details of the AFM to cloud object storage fileset can be generated.
Before you run this command, ensure that the gpfs.afm.cos package is installed on the gateway nodes.
For more information about filesets, see the filesets section in the IBM Storage Scale: Administration Guide.
This command can be used to convert an IBM
Storage Scale file system or IBM
Storage Scale fileset to an AFM to cloud object storage manual update (MU) mode enabled file system or
fileset for the cloud synchronization.
Parameters
- Device
- Specifies a device name of a file system to contain a new fileset.
- FilesetName
- Specifies a name of an AFM to cloud object storage fileset to be created. To convert a file system
to an AFM to cloud object storage fileset for the manual update mode
replication use the FilesetName as a root.
Note: The following restrictions should be applied on the fileset names:
- The name must be unique within the file system.
- The length of the name must be in the range 1-255.
- The name root is reserved for a fileset of the root directory of the file system.
- The name cannot be the reserved word "new". However, the character string "new" can appear within a fileset name.
- The name cannot begin with a hyphen (-).
- The name cannot contain these characters: / ? $ & * ( ) ` # | [ ] \fR.
- The name cannot contain a white-space character such as blank space or tab.
- --endpoint EndpointURL
- Specifies an endpoint URL that is the address of a cloud object storage server on which it
receives requests from clients. An endpoint can be either HTTP or HTTPS. It can also be a DNS
qualified hostname or an IP address. An endpoint also contains a port number on which the cloud
object storage server is
running.
- Protocol
- Specifies the protocol to be used which has either
http://
orhttps://
support .
- Region
- Specifies a region where a bucket is located on a cloud object server. You can specify a region with a server or a map name by separating them with '@'.
- ExportMap
- When the parallel reads operation is used for an AFM to cloud object storage fileset, an export map is created by using the mmafmconfig command. This export map must be used instead of the server parameter to perform parallel data operations from the mapped gateways. For more information, see the mmafmconfig command.
- port
- Specifies a port number on a cloud object storage server on which it is listening from the clients. Default port is 80.
- --object-fs
- Specifies the behavior of an AFM to cloud object storage fileset. The
following two modes can be enabled on an AFM to cloud object storage fileset:
- ObjectFS
- This behavior is used to enable auto-synchronization of metadata from a cloud object storage server to the AFM to cloud object storage enabled fileset. This mode allows AFM to auto-synchronization fileset metadata when a lookup or readdir operation is performed on the fileset or the AFM refresh intervals are triggered.
- ObjectOnly
- If the --object-fs parameter is not defined, the ObjectOnly mode will be set. This is the default behavior, which is set on the AFM to cloud object storage server.
- --convert
- Converts the existing GPFS independent fileset to an AFM manual update (MU) mode fileset and establishes relation with a cloud object storage bucket. With --convert option, the other options such as --dir, --uid, --cleanup, and --perm are not supported.
- --cleanup
- Specifies whether to clean up data and delete an existing fileset with the same name, and re-creates a new AFM to cloud object storage fileset with given parameters.
- --xattr
- Specifies user-extended attributes to be synchronized with a cloud object storage. If this option is skipped, the AFM to cloud object storage does not synchronize user-extended attributes with the cloud object storage.
- --ssl-cert-verify
- Specifies SSL certificate verification. This option is valid only with HTTPS. Default value of this parameter is disabled.
- --user-keys
- Specifies adding a callback to collect an access key and a secret key from a file.
- --bucket BucketName
- Identifies a unique bucket on a cloud object storage server. AFM will use this bucket as the target for an AFM to cloud object storage fileset, and it will synchronize data between the AFM to cloud object storage fileset and the bucket on the cloud object storage.
- --new-bucket BucketName
- Specifies a new bucket to be created on a cloud object storage by the AFM to cloud object storage and used this as the Target.
- --dir Path
- Specifies a junction path to link an AFM to cloud object storage fileset inside a file system. If not specified, default junction path will be used.
- --policy PolicyFile
- Specifies a policy to be applied for an AFM to cloud object storage fileset. If not specified, default policy is enabled.
- --tmpdir DirectoryPattern
- Specifies a directory pattern if a policy is not provided.
- --tmpfile FilePattern
- Specifies a file pattern to be set if a policy is not provided.
- --quota-files NumberOfFiles
- Specifies the number of file limit to be set as file quota on an AFM to cloud object storage fileset. If not specified, default file quota is in effect. Units are in numbers, for example, 104857600.
- --quota-blocks NumberOfBlocks
- Specifies the data block limits to be set as block quota on an AFM to cloud object storage fileset. If not specified, default block quota is in effect. Units are in numbers.
- --uid UID
- Specifies a user ID to be set on an AFM to cloud object storage fileset. If not specified, default owner will be set, for example, root.
- --gid GID
- Specifies a group ID to be set on an AFM to cloud object storage fileset. If not specified, default group will be set, for example, root.
- --perm Permission
- Specifies the access permission to be set on an AFM to cloud object storage fileset. This is in the octal format. Example 0770. If not specified, default permission will be set.
- --mode AccessMode
- All AFM fileset modes support an AFM to cloud object storage fileset. These modes are independent-writer (IW), manual-updates (MU), single-writer (SW), read-only (RO), and local-updates (LU). Default is the SW mode.
- --fast-readdir
- Improves the read-dir performance of an AFM to cloud object storage fileset by skipping synchronization of extended attributes and ACLs of an object between a cloud object storage server and a cache fileset.
- --chunk-size Size
- Specifies the chunk size to control the number of upload parts on a cloud object storage. The unit is defined in number. Default is 16 MB chunk size.
- --read-size Size
- Specifies the read size to control the number of download data blocks into an AFM to cloud object storage fileset. The unit is defined in number. Default is 16 MB download size.
--fast-readdir2
Specifies an optional parameter version 2 of --fast-readdir for AFM to perform all the operations of --fast-readdir along with the delete operation synchronization from a cloud object storage bucket to the AFM cache fileset.
- --acls
- Enables the cache to synchronize ACL to the cloud object storage server. If not specified, AFM will not synchronize ACLs to cloud object storage.

- --vhb
- Provides support of S3 style virtual hosting of buckets such as URL to use them during the AFM to cloud object storage creation. For the --vhb option, an endpoint has the https://bucket-name.s3.region-code.amazonaws.com format. AFM still requires a region to add it to the URL and separate it by using ‘@’ symbol.

- --gcs
- The --gcs parameter is used for Google cloud object storage backend. Enabling this parameter makes AFM to cloud object storage compatible with the list operations used by the Google cloud object.

- --azure
- The --azure parameter is used for Azure Blob Storage backend. This parameter must be specified to use Azure Blob Storage.

- --prefix Prefix
- Specifies a prefix to organize data inside a bucket where AFM can synchronize all the fileset data to the prefix. After an AFM to cloud object storage fileset is created by specifying the prefix, AFM appends the prefix to the bucket and use this root path as the target path. AFM will now upload or download all the fileset data to this prefix path under the bucket.
- --directory-object
- AFM to cloud object storage supports directory objects. All directories with and without objects can now be synchronized to the cloud object storage. You can now set extended attributes on directories with the directory object support.

- --async-prefetch-interval
- Specifies an interval when AFM automatically pulls the changed data and the metadata from a cloud object storage bucket to an AFM to cloud object storage fileset asynchronously.


- --verbose
- Displays details of all operations that are performed during the creation of an AFM to cloud object fileset on the terminal. This parameter is optional.

- --report
- This option is used to generate a colon (':') separated information of the AFM to cloud object storage enabled fileset. This option shows information such as policy, quota that is set on the fileset. This option generates a report of the specified bucket and serverName combination.
To change the configuration or a parameter of an AFM to cloud object storage fileset that is already created, you need to run separate commands such as mmchfileset and mmchpolicy.
Exit status
- 0
- Successful completion.
- nonzero
- A failure occurred.
Security
You must have root authority to run the mmafmcosconfig command.
The node on which the command is issued must be able to run remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a GPFS file system.
Examples
- Create an export map by using the mmafmconfig
command.
$ mmafmconfig add map1_cos --export-map lb1.ait.cleversafelabs.com/c7f2n03,lb1.ait.cleversafelabs.com/c7f2n04 --no-server-resolution
- Create an AFM to cloud object storage fileset relation by using the
export
map.
$ mmafmcosconfig fs1 cosbucket1 --endpoint http://map1_cos --object-fs --bucket cosbucket1 --debug --mode iw
- To create an AFM to cloud object storage fileset by using the
ObjectFS mode, issue the following command:
# mmafmcosconfig fs1 SW1 --endpoint http://<IP>:<port> --xattr --bucket vault1 --mode sw --object-fs
- To create an AFM to cloud object storage fileset by using the
ObjectOnly mode, issue the following
command:
# mmafmcosconfig fs1 SW2 --endpoint http://<IP>:<port> --xattr --bucket vault2 --mode sw
- To list the fileset report in the colon (:) separate format, issue the following
command:
# mmafmcosconfig fs1 SW2 --report
- To convert an existing file system, fs2, to an AFM to cloud object storage file system replication by using manual updates
mode and supporting extended attributes, and ACLs, issue the following
command:
mmafmcosconfig fs2 root --endpoint https://s3.us-east.cloud-object-storage.appdomain.cloud --bucket bucket1 --object-fs --mode mu --xattr --convert --acls
- To organize the fileset data, you can create a fileset by specifying
the prefix value as 'site1' inside a bucket 'bkt1' as shown in the following sample
command:
mmafmcosconfig fs1 sw1 --endpoint http://region@endpoint --object-fs --xattr --bucket bkt1 --acls --mode sw --prefix site1
Create relationship of an independent-writer mode fileset "container1" with an Azure Blob container "container1" in the storage account "azureaccount1", which supports extended attributes ACLS and directory objects.
mmafmcosconfig fs1 container1 --endpoint https://azureaccount1.blob.core.windows.net --xattr --new-bucket container1 --mode sw --object-fs --azure --acls --directory-object
Convert an independent fileset “fileset1” to an AFM to COS manual updates mode fileset relationship with Azure Blob container "container1" in the "azureaccount1" storage account, which supports extended attributes ACLS and directory objects.
mmafmcosconfig fs1 fileset1 --endpoint https://azureaccount1.blob.core.windows.net --xattr --new-bucket container1 --mode mu --object-fs --azure --acls --directory-object --convert
See also
Location
/usr/lpp/mmfs/bin