Online creation and linking of a dependent fileset in AFM DR

On an independent fileset, AFM is always enabled for granularity and use of features such as quotas and eviction. However, you can create a dependent fileset by using inode space of an AFM-DR fileset and link this dependent fileset to an AFM-DR primary fileset for the data synchronization.

Online creation and linking of a dependent fileset ensures that the dependent fileset with the same name is also created on the secondary for data movement. All data and metadata operations that are generated in the dependent fileset, which is linked to a primary fileset, work seamlessly. Applications can create data on the AFM-DR fileset path and the linked dependent fileset path. AFM synchronizes the created data to the secondary fileset.

On an AFM-DR primary fileset when a dependent fileset is created and linked, a dependent fileset is created and linked to the dependent fileset on the secondary cluster. Similarly, when a fileset is unlinked and deleted from a primary fileset, it is unlinked and deleted from the AFM-DR secondary fileset. All I/Os generated in the linked dependent fileset use the same gateway node that is assigned to the AFM-DR fileset.

Example

  1. Create a primary fileset.
     mmcrfileset fs1 primary1 -p afmmode=primary --inode-space=new -p afmTarget=SecondaryNode1:/gpfs/fs1/secondary1
    A sample output is as follows:
    Fileset primary1 created with id 288 root inode 27787267.
    Primary Id (afmPrimaryId) 2836795238918359130-3F69A8C064BE2942-288
  2. On a secondary cluster, create a secondary fileset by using the primary ID.
     mmcrfileset fs1 secondary1 -p afmMode=secondary -p afmPrimaryID=2836795238918359130-3F69A8C064BE2942-288 --inode-space new
    A sample output is as follows:
    Fileset secondary1 created with id 209 root inode 6291459.
  3. On a secondary cluster, link the secondary fileset and add its NFS export.
     mmlinkfileset fs1 secondary1 -J /gpfs/fs1/secondary1
    A sample output is as follows:
    Fileset secondary1 linked at /gpfs/fs1/secondary1
  4. Start of changeCreate an NFS export entry for the linked secondary fileset path.
    /gpfs/fs1/primary1 <GatewayIPs>(rw,nohide,insecure,no_subtree_check,sync,no_root_squash,fsid=1)
    End of change
  5. Start of changeExport this fileset path.
    systemctl restart nfs-server
    End of change
  6. On the primary cluster link the primary fileset
     mmlinkfileset fs1 primary1 -J /gpfs/fs1/primary1
    A sample output is as follows:
    Fileset primary1 linked at /gpfs/fs1/primary1
    First snapshot name is psnap0-rpo-3F69A8C064BE2942-288
    Flushing dirty data for snapshot primary1:psnap0-rpo-3F69A8C064BE2942-288...
    Quiescing all operations in the inode space 53.
    Snapshot primary1:psnap0-rpo-3F69A8C064BE2942-288 created with id 497.
  7. On the primary cluster create and link a dependent fileset by using primary1 inode space.
     mmcrfileset fs1 primary1dep1 --inode-space=primary1
    A sample output is as follows:
    Fileset primary1dep1 created with id 290 root inode 27811842.
     mmcrfileset fs1 primary1dep2 --inode-space=primary1
    A sample output is as follows:
    Fileset primary1dep2 created with id 291 root inode 27811843.
     mmlinkfileset fs1 primary1dep1 -J /gpfs/fs1/primary1/primary1dep1
    A sample output is as follows:
    Fileset primary1dep1 linked at /gpfs/fs1/primary1/primary1dep1
     mmlinkfileset fs1 primary1dep2 -J /gpfs/fs1/primary1/primary1dep2
    A sample output is as follows:
    Fileset primary1dep2 linked at /gpfs/fs1/primary1/primary1dep2
  8. On the secondary cluster check that the filesets are created and linked.
     mmlsfileset fs1
    A sample output is as follows:
    Filesets in file system 'fs1':
    Name                     Status    Path                                    
    root                     Linked    /gpfs/fs1                                                   
    secondary1               Linked    /gpfs/fs1/secondary1                    
    primary1dep1             Linked    /gpfs/fs1/secondary1/primary1dep1       
    primary1dep2             Linked    /gpfs/fs1/secondary1/primary1dep2   
    
  9. On the primary fileset create some data and let it replicate on the secondary fileset.
    dd if=/dev/urandom of=/gpfs/fs1/primary1/primary1dep1/file1 count=4 bs=256K
    A sample output is as follows:
    4+0 records in
    4+0 records out
    1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00924786 s, 113 MB/s
    dd if=/dev/urandom of=/gpfs/fs1/primary1/primary1dep1/file2 count=4 bs=256K
    A sample output is as follows:
    4+0 records in
    4+0 records out
    1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0077314 s, 136 MB/s
    dd if=/dev/urandom of=/gpfs/fs1/primary1/primary1dep2/file1 count=4 bs=256K
    A sample output is as follows:
    4+0 records in
    4+0 records out
    1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0085112 s, 123 MB/s
    dd if=/dev/urandom of=/gpfs/fs1/primary1/primary1dep2/file2 count=4 bs=256K
    A sample output is as follows:
    4+0 records in
    4+0 records out
    1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0086434 s, 121 MB/s
    ls -R /gpfs/fs1/primary1
    A sample output is as follows:
    /gpfs/fs1/primary1:
    primary1dep1 primary1dep2
     
    /gpfs/fs1/primary1/primary1dep1:
    file1 file2
     
    /gpfs/fs1/primary1/primary1dep2:
    file1 file2
  10. After data is replicated, verify the data is present on the secondary.
    ls -R /gpfs/fs1/secondary1
    A sample output is as follows:
    /gpfs/fs1/secondary1:
    primary1dep1 primary1dep2
     
    /gpfs/fs1/secondary1/primary1dep1:
    file1 file2
     
    /gpfs/fs1/secondary1/primary1dep2:
    file1 file2
  11. On the primary fileset unlink and delete the dependent fileset.
     mmunlinkfileset fs1 primary1dep1 -f
    A sample output is as follows:
    Fileset primary1dep1 unlinked.
     mmdelfileset fs1 primary1dep1 -f
    A sample output is as follows:
    Checking fileset ...
    Checking fileset complete.
    Deleting user files ...
     100.00 % complete on Fri Oct 20 09:36:28 2023 ( 100352 inodes with total 392 MB data processed)
    Deleting fileset ...
    Fileset primary1dep1 deleted.
    ls -R /gpfs/fs1/primary1
    A sample output is as follows:
    PrimaryNode1 1] 
    /gpfs/fs1/primary1:
    primary1dep2
     
    /gpfs/fs1/primary1/primary1dep2:
    file1 file2
  12. On the secondary fileset verify that the fileset is deleted.
     mmlsfileset fs1
    A sample output is as follows:
    Filesets in file system 'fs1':
    Name Status Path 
    root Linked /gpfs/fs1 
    secondary1 Linked /gpfs/fs1/secondary1 
    primary1dep2 Linked /gpfs/fs1/secondary1/primary1dep2
     
    SecondaryNode1 0] ls -R /gpfs/fs1/secondary1
    /gpfs/fs1/secondary1:
    primary1dep2
     
    /gpfs/fs1/secondary1/primary1dep2:
    file1 file2
Note: When recovery is running because of some failures, dependent filesets must not be unlinked.