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
- Create a primary
fileset.
A sample output is as follows:mmcrfileset fs1 primary1 -p afmmode=primary --inode-space=new -p afmTarget=SecondaryNode1:/gpfs/fs1/secondary1
Fileset primary1 created with id 288 root inode 27787267. Primary Id (afmPrimaryId) 2836795238918359130-3F69A8C064BE2942-288
- On a secondary cluster, create a secondary fileset by using the primary
ID.
A sample output is as follows:mmcrfileset fs1 secondary1 -p afmMode=secondary -p afmPrimaryID=2836795238918359130-3F69A8C064BE2942-288 --inode-space new
Fileset secondary1 created with id 209 root inode 6291459.
- On a secondary cluster, link the secondary fileset and add its NFS
export.
A sample output is as follows:mmlinkfileset fs1 secondary1 -J /gpfs/fs1/secondary1
Fileset secondary1 linked at /gpfs/fs1/secondary1
Create 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)
Export this fileset path.
systemctl restart nfs-server
- On the primary cluster link the primary
fileset
A sample output is as follows:mmlinkfileset fs1 primary1 -J /gpfs/fs1/primary1
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.
- On the primary cluster create and link a dependent fileset by using primary1 inode
space.
A sample output is as follows:mmcrfileset fs1 primary1dep1 --inode-space=primary1
Fileset primary1dep1 created with id 290 root inode 27811842.
A sample output is as follows:mmcrfileset fs1 primary1dep2 --inode-space=primary1
Fileset primary1dep2 created with id 291 root inode 27811843.
A sample output is as follows:mmlinkfileset fs1 primary1dep1 -J /gpfs/fs1/primary1/primary1dep1
Fileset primary1dep1 linked at /gpfs/fs1/primary1/primary1dep1
A sample output is as follows:mmlinkfileset fs1 primary1dep2 -J /gpfs/fs1/primary1/primary1dep2
Fileset primary1dep2 linked at /gpfs/fs1/primary1/primary1dep2
- On the secondary cluster check that the filesets are created and
linked.
A sample output is as follows:mmlsfileset fs1
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
- On the primary fileset create some data and let it replicate on the secondary
fileset.
A sample output is as follows:dd if=/dev/urandom of=/gpfs/fs1/primary1/primary1dep1/file1 count=4 bs=256K
4+0 records in 4+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00924786 s, 113 MB/s
A sample output is as follows:dd if=/dev/urandom of=/gpfs/fs1/primary1/primary1dep1/file2 count=4 bs=256K
4+0 records in 4+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0077314 s, 136 MB/s
A sample output is as follows:dd if=/dev/urandom of=/gpfs/fs1/primary1/primary1dep2/file1 count=4 bs=256K
4+0 records in 4+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0085112 s, 123 MB/s
A sample output is as follows:dd if=/dev/urandom of=/gpfs/fs1/primary1/primary1dep2/file2 count=4 bs=256K
4+0 records in 4+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0086434 s, 121 MB/s
A sample output is as follows:ls -R /gpfs/fs1/primary1
/gpfs/fs1/primary1: primary1dep1 primary1dep2 /gpfs/fs1/primary1/primary1dep1: file1 file2 /gpfs/fs1/primary1/primary1dep2: file1 file2
- After data is replicated, verify the data is present on the
secondary.
A sample output is as follows:ls -R /gpfs/fs1/secondary1
/gpfs/fs1/secondary1: primary1dep1 primary1dep2 /gpfs/fs1/secondary1/primary1dep1: file1 file2 /gpfs/fs1/secondary1/primary1dep2: file1 file2
- On the primary fileset unlink and delete the dependent
fileset.
A sample output is as follows:mmunlinkfileset fs1 primary1dep1 -f
Fileset primary1dep1 unlinked.
A sample output is as follows:mmdelfileset fs1 primary1dep1 -f
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.
A sample output is as follows:ls -R /gpfs/fs1/primary1
PrimaryNode1 1] /gpfs/fs1/primary1: primary1dep2 /gpfs/fs1/primary1/primary1dep2: file1 file2
- On the secondary fileset verify that the fileset is
deleted.
A sample output is as follows:mmlsfileset fs1
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