This procedure documents how you can convert Spectrum Scale dependent filesets used for an AFM home cluster to independent filesets. One reason for doing this would be in preparation for implementing an AFM-DR solution which requires that the primary and secondary filesets be the independent type.

The procedure is described in two columns, one representing the steps taken on an AFM cache cluster and the other representing the steps taken on the AFM home cluster. The procedure assumes the following.

  • The user wants to maintain the same junction point at the AFM home cluster for the new independent fileset that was used by the dependent fileset.
  • The user intends to delete the old dependent fileset.
AFM Home Cluster AFM Cache Cluster
Stop all IO activity to the AFM fileset at the cache site that maps to the AFM home cluster fileset which is being converted. This can be done by removing the export that corresponds to the fileset or simply disabling the methods used to access the fileset, for example stopping protocols.
Ensure all cached updates are flushed back to the home cluster by executing this command.

mmafmctl flushpending -j <fileset_name>

The command should not return until all the data is flushed but you can confirm that is true by executing the following command.

mmafmctl <fs_name> getstate

Stop all IO activity to the dependent fileset that is currently active at the AFM home cluster.
Unlink the dependent fileset and link it to a new location.

mmunlinkfileset <fs_name> <fileset_name>
mmlinkfileset <fs_name> <fileset_name> -J <full_path_to_new_junction_point>

If the dependent fileset from which data is being copied has stub files for files that have been migrated to external storage, for example TSM/HSM, TCT, or LTFS, then you set the following AFM variables to avoid the migrated files from being recalled when data is copied from the dependent fileset to the independent fileset.

mmchconfig afmIncludeDmapiCache=1 -i
mmchconfig afmIncludeDmapiHome=1 -i

At the present time these variables are not publicly documented. Therefore when you execute the mmchconfig command you will be prompted to enter a a value, and when that occurs you should enter the value ‘999’ then hit the ENTER key.

Unlink and delete the fileset from the file system. Since a new fileset is being created at the AFM home site a new fileset needs to be created at the cache site also otherwise the inodes will not be correct.

mmunlinkfileset <fs_name> <fileset_name>
mmdelfileset <fs_name> <fileset_name>

Deleting the fileset could take some time depending on the number and size of the files in the fileset. If you want to have more control over this process you could re-link the fileset into a different location and manually remove files, that is run the command, /bin/rm -rf *, at the root of the fileset. You would need to remove the AFM attributes from the fileset before re-linking it into the file system.

Create a new independent fileset as an AFM enabled LU fileset using the old dependent fileset as its AFM home site.

mmcrfileset <fs_name> <new_fileset_name> -p afmTarget=gpfs:///<full_path_to_new_junction_point> -p afmMode=lu –inode-space new

Since both the old dependent fileset and this newly created independent fileset exist in the same cluster we can use the gpfs protocol to transfer data between the two filesets. This is faster than using NFS.
Link the new independent fileset to the place where the old dependent fileset was linked.

mmlinkfileset <fs_name> <new_fileset> -J <previous_junction_point_for_dependent_fileset>

Run this command to ensure ACLs are properly copied to the new fileset and to the cache cluster.

mmafmconfig enable <previous_junction_point_for_dependent_fileset>

At this point you can re-enable access to the AFM fileset (now the independent fileset) for users. However, you may want to first start to prefetch data and metadata from the old dependent fileset to the new independent fileset. The following command can be used to initiate the prefetch.

mmafmctl <fs_name> prefetch -j <new_fileset> —directory <previous_junction_point_for_dependent_fileset> –enable-failed-file-list

The prefetch command will return immediately. To check the status of the prefetch operation you can run this command.

mmafmctl <fs_name> prefetch -j <new_fileset>

Create a new AFM enabled fileset and link it into the file system.

mmcrfileset <fs_name> <fileset_name> –inode-space new -p afmTarget=<addr>:<path_to_independent_fileset> -p afmMode=<afm_mode>
mmlinkfileset <fs_name> <fileset_name> -J <full_path_to_junction_point>

Re-enable IO to the AFM fileset.
Confirm that all the files have been prefetched from the old dependent fileset to the new independent fileset. This can be done via the mmafmctl command with the prefetch option, showing no further data to copy, or the getstate option showing the queue for the fileset is 0 length.
Disable AFM on the new fileset. Note the fileset needs to be unlinked to change the AFM attribute. This will require that you stop all IO to the fileset at the home cluster. You do not need to stop IO at the cache cluster because when IO is stopped to the fileset at the home cluster it will appear as a lost connection to the cache cluster. When the fileset is re-linked at the home cluster the cache cluster will resume copying data back to the home cluster.

mmunlinkfileset <fs_name> <new_fileset_name>
mmchfileset <fs_name> <new_fileset_name> -p afmTarget=disable
mmlinkfileset <fs_name> <new_fileset> -J <previous_junction_point_for_dependent_fileset>

Remove the files from the old fileset then unlink and delete it.

cd <full_path_to_new_junction_point>
/bin/rm -rf *
cd /
mmunlinkfileset <fs_name> <fileset_name>
mmdelfileset <fs_name> <fileset_name>

Join The Discussion

Your email address will not be published. Required fields are marked *