Deploying AFM on AWS
IBM Spectrum Scale Active File Management (AFM) is used for data movement and caching between the on-premises and public cloud environments. Public cloud end points are only supported as cache sites.

- Set up the on-premises cluster.
The on-premises IBM Spectrum Scale cluster acts as the AFM home cluster. An AFM home cluster is defined as an IBM Spectrum Scale cluster that can make the NFS v3 exports available to other IBM Spectrum Scale clusters. Follow these steps to set up the on-premises cluster:
-
Run the mmnfs command to define the NFS exports and provide access to the AFM gateway nodes:
mmnfs export add /ibm/gpfs0/onprem-aws –client “172.16.1.237 (Access_Type=RW,Squash=root_squash)”The command gives the following output:mmnfs: The NFS export was created successfullyFor more information, see the IBM Spectrum Scale: Command and Programming Reference guide in the IBM Spectrum® Scale Knowledge Center.
-
Run the mmafmconfig command to enable support of extended attributes or sparse files on the AFM home exports:
mmafmconfig enable /ibm/gpfs0/onprem-awsFor more information, see the IBM Spectrum Scale: Command and Programming Reference guide in the IBM Spectrum Scale Knowledge Center.
-
- Set up the AWS cluster.
The IBM Spectrum Scale cluster on AWS acts as the AFM cache cluster. The AFM cache cluster hosts the filesets that are configured to participate in a relationship with the NFS exports in the AFM home cluster. Follow these steps to set up the AWS cluster:
- Run the following command to verify that the NFS client is installed on the nodes
that are going to server as the AFM gateway:
rpm -qi nfs-utilsIf the NFS client package is not installed, run the following command to install the NFS client on the nodes that are going to serve as the AFM gateway.
yum install nfs-utilsNote: A gateway node can communicate with the home cluster to transfer data. Refer the Configuration best practices section before you select a node to act as the AFM gateway node. -
Run the mmchnode command to define the AFM gateway nodes on the nodes selected in Step 2a.
mmchnode --gateway -N ip-172-16-1-237.eu-central-1.compute.internalThe command gives the following output:mmchnode: Processing node ip-172-16-1-237.eu-central-1.compute.internal mmchnode: Propagating the cluster configuration data to all affected nodes. This is an asynchronous process.For more information, see the IBM Spectrum Scale: Command and Programming Reference guide in the IBM Spectrum Scale Knowledge Center.
-
Run the mmcrfileset command to create an AFM fileset with a relationship to the NFS exports server from the on-premises or home cluster.Note: AFM cache mode must be specified based on the needs of the customer use case. For more information, see AFM cache modes.
mmcrfileset fs1 onprem-aws-cache -p afmTarget=10.0.240.43:/ibm/gpfs0/onprem-aws -p afmmode=read-only --inode-limit 999999 --inode-space newThe command gives the following output:Fileset onprem-aws-cache created with id 21 root inode 5767171.For more information, see the IBM Spectrum Scale: Command and Programming Reference guide in the IBM Spectrum Scale Knowledge Center.
-
Run the mmlinkfileset command to link the fileset to the junction folder:Note: A junction folder is a special directory entry, like a POSIX hard link, that connects a name in the directory of the parent fileset to the root directory of a child fileset.
mmlinkfileset fs1 onprem-aws-cache -J /gpfs/fs1/onprem-aws-cacheThe command gives following output:Fileset onprem-aws-cache linked at /gpfs/fs1/onprem-aws-cacheFor more information, see the IBM Spectrum Scale: Command and Programming Reference guide in the IBM Spectrum Scale Knowledge Center.
- Run the following command to verify that the NFS client is installed on the nodes
that are going to server as the AFM gateway:
You can prefetch the file metadata and data from the AFM home cluster before an application requests the contents. Prefetching files before an application starts can reduce the network delay when an application requests a file. Prefetch can be used to pro-actively manage WAN traffic patterns by moving files over the WAN during a period of low WAN usage. For more information, see the Prefetch section in the IBM Spectrum Scale Knowledge Center.
For more information, see the Setting up the cache cluster and Creating an AFM relationship by using the NFS protocol sections in the IBM Spectrum Scale Knowledge Center.