Resync on SW filesets
A conflict situation might arise due to an inadvertent write on a SW home. AFM runs a resynchronization automatically.
If AFM detects inconsistencies during flushing, the fileset goes into NeedsResync state. When this occurs AFM runs a resynchronization automatically during the next request to the primary gateway, and the inconsistencies are resolved.
If resync is not triggered automatically, the inconsistencies must be manually resolved by running the resync command . When running a resync the fileset must be in the Active or the NeedsResync state. Resync is not allowed on IW filesets as multiple cache filesets can update the same set of data. Use the following command - mmafmctl Device {resync | expire | unexpire} -j FilesetName. For more information, see mmafmctl command.
mmafmctl: Performing resync of fileset: sw1
# mmafmctl fs1 getstate -j sw1
Fileset Name Fileset Target Cache State Gateway Node Queue Length Queue numExec
------------ -------------- ----------- ------------ ------------ -------------
sw1 nfs://c26c3apv2/gpfs/homefs1/newdir1 Dirty c26c2apv1 4067 10844
During a resync all cached data and metadata are queued in the priority queue. The resync process is asynchronous and completes in the background. The callback event afmManualResyncComplete is triggered when the resync completes. Once the priority queue is completely flushed, the fileset state changes to Active.
Evicted files are not synchronized to home.
Out-band Resync - You can choose to copy all cached data offline from the AFM cache to the new home with any tool that preserves modification time (mtime) with nanoseconds granularity. An example of such a tool is - rsync version 3.1.0 or later with protocol version 31. After the data is copied, you can run mmafmctl failover to compare mtime and filesize at home, and avoid queuing unnecessary data to home.
Resync does not delete new files or directories that are created at home. Similarly, rename of files/directories at home are not deleted by resync