Converting AFM relationship to AFM DR

A working AFM single writer (SW) or independent writer (IW) relationship can be converted to a primary/secondary relationship.

Complete the following steps:
Note: In case of multiple IW caches to the same home, you can convert only one to primary.
  1. Ensure all contents are cached. AFM fileset must be in active state by flushing queues and for filesets that have contents at home, the complete namespace should be constructed at the cache using stat on all entries, to avoid orphans. In SW/IW filesets, some files might not be cached or some files might be evicted. All such files should be cached using prefetch. Complete the following steps to ensure that all contents are present and are up to-date in the SW/IW caches:
    1. Ensure that the storage capacity on the cache fileset is the same as on the home and the set quotas match.
    2. Run mmchfileset filesystem sw/iw cache -p afmEnableAutoEviction=no to disable automatic eviction.
    3. Ensure that afmPrefetchThreshold is set to 0 on the SW/IW cache.
    4. Run a policy scan on the home to get the list of files and use the list in mmafmctl prefetch on the cache to ensure all files are cached, or run a policy scan on the cache to test the cached flag of each file and report on any that are not fully cached.
  2. Convert the fileset on the primary site to a primary using mmafmctl. The primary id is generated and a psnap0 is created on the primary site. AFM gateway nodes must be defined in the primary site, and the file system is mounted on all gateway nodes before conversion. By default, RPO is disabled. You can use the mmafmctl convertToPrimary command to enable RPO. You can use the mmchfileset command later to enable RPOs.
  3. Convert the home to a secondary and set the primary id by using mmchfileset or mmafmctl with the convertToSecondary option. Run on the primary cluster.
After the primary and secondary are converted and connected through primary ID, the psnap0 queued from the primary fileset is played on the secondary fileset. The two filesets are ready for use. For more information, see mmafmctl command.
Note:
  • IW/SW fileset must communicate at-least once to home before conversion. Newly created and inactive filesets might not convert successfully. When you convert a fileset in inactive state, it will convert to primary but will not create psnap0. Next access of the primary fileset will trigger recovery and create the psnap0 and move the psnap0 and the pending changes to home.
  • If applications are in progress on the cache fileset during conversion, some inodes might be orphans and the –check-metadata option might show failures. It might be useful to use the –nocheck-metadata option in such cases.
  • If cached files had been evicted from SW/IW cache, conversion with the –check-metadata option might show failures. It might be useful to use the –nocheck-metadata option in such cases.
  • If home of an IW fileset is running applications during conversion, IW should revalidate with home to pull in all the latest data before conversion. During conversion, if any file/directory is not present in cache, it might result in a conflict error and fileset might go into NeedsResync state, AFM automatically fixes the conflicts during next recovery.
  • You cannot convert a SW fileset that is in an unmounted state or NeedsResync state.
  • Resync does not split data transfers even if parallel data transfer is configured, and the target is a mapping.