Disable AFM by using disable-online feature
Describes how to disable AFM by using disbale-online
feature.
An AFM fileset can be disabled by using online disable feature and converted to an independent fileset. Online disable feature can be used runtime and there is no need to unlink the fileset or take any downtime for applications. After the fileset is disabled, files and directories in that fileset will no longer sync with the target or remote cluster. The online disable feature is available only on AFM read only (RO) and Local updates (LU) mode filesets. After the fileset is AFM disabled by using online disable features, the fileset cannot be converted to an AFM fileset.
To dissociate home or target and cache relationship of an AFM fileset, you can convert the AFM
fileset to an independent fileset by using mmchfileset fsname filesetname
-p afmTarget=disable-online
. Thereafter, the fileset is an IBM Storage Scale independent fileset and file operations are not queued
to home. An example is the case of NFS migration, where AFM fileset must be disabled after migration
for local usage.
The mmchfileset fsname filesetname -p
afmTarget=disable-online
command is interactive and provides an option to check weather
files from home or remote fileset are cached into the AFM cache fileset. It is recommended that
system administrators first verify the files that are ingested from home by providing “yes” input to
verification of files and orphans prompt. After all the files are cached, the recommended step can
be skipped and disable online can be run.
Example
- Rotest1 is cache fileset
-
[root@cacheNode1 ~]# mmlsfileset fs1 rotest1 --afm -L
Filesets in file system 'fs1': Attributes for fileset rotest1: ================================ Status Linked Path /gpfs/fs1/rotest1 Id 52 Root inode 3407875 Parent Id 0 Created Mon Jan 30 01:03:14 2023 Comment Inode space 26 Maximum number of inodes 100352 Allocated inodes 100352 Permission change flag chmodAndSetacl afm-associated Yes Permission inherit flag inheritAclOnly Target nfs://homeNode1/gpfs/fs1/rotest Mode read-only File Lookup Refresh Interval 30 (default) File Open Refresh Interval 60 (default) Dir Lookup Refresh Interval 60 (default) Dir Open Refresh Interval 60 (default) Async Delay disable Expiration Timeout disable (default) Last pSnapId 0 Display Home Snapshots no (default) Number of Gateway Flush Threads 4 Prefetch Threshold 0 (default) Eviction Enabled yes (default) IO Flags 0x0 (default) IO Flags2 0x0 (default)
- Data in rotest1 fileset
-
[root@cacheNode1 ~]# ls -lR /gpfs/fs1/rotest1
/gpfs/fs1/rotest1: total 16 drwxr-xr-x. 2 root root 8192 Jan 30 01:00 dir1 drwxr-xr-x. 2 root root 8192 Jan 30 01:00 dir2 -rw-r--r--. 1 root root 7 Jan 30 01:00 file1 -rw-r--r--. 1 root root 7 Jan 30 01:00 file2 -rw-r--r--. 1 root root 7 Jan 30 01:00 file3 -rw-r--r--. 1 root root 7 Jan 30 01:00 file4 -rw-r--r--. 1 root root 7 Jan 30 01:00 file5 /gpfs/fs1/rotest1/dir1: total 0 -rw-r--r--. 1 root root 7 Jan 30 01:00 file1 -rw-r--r--. 1 root root 7 Jan 30 01:00 file2 -rw-r--r--. 1 root root 7 Jan 30 01:00 file3 /gpfs/fs1/rotest1/dir2: total 0 -rw-r--r--. 1 root root 7 Jan 30 01:00 file1 -rw-r--r--. 1 root root 7 Jan 30 01:00 file2 -rw-r--r--. 1 root root 7 Jan 30 01:00 file3
- Reading files as below (These files are cached)
-
[root@CacheNode1 ~]# cat /gpfs/fs1/rotest1/file* > /dev/null [root@CacheNode1 ~]# [root@CacheNode1 ~]# cat /gpfs/fs1/rotest1/dir1/file* > /dev/null
- Perform disable-online
-
[root@CacheNode1 ~]# mmchfileset fs1 rotest1 -p afmTarget=disable-online
Warning! Once disabled, AFM cannot be re-enabled on this fileset. Do you wish to continue? (yes/no) yes Warning! Fileset should be verified for uncached files and orphans. If already verified, then skip this step. Do you wish to verify same? (yes/no) yes Verifying if all the data is cached. This may take a while... mmchfileset: [E] Uncached files present, run prefetch first Files list file: /var/mmfs/tmp/cmdTmpDir.mmchfileset.1152157/list-file.mmchfileset.1152157
- Verification of cached files shows the files (uncached) in the list file
-
[root@CacheNode1 ~]# cat /var/mmfs/tmp/cmdTmpDir.mmchfileset.1152157/list-file.mmchfileset.1152157 %2Fgpfs%2Ffs1%2Frotest1%2Fdir2%2Ffile2 %2Fgpfs%2Ffs1%2Frotest1%2Fdir2%2Ffile1 %2Fgpfs%2Ffs1%2Frotest1%2Fdir2%2Ffile3
- Use the list that is provided by the above command for prefetching as below
-
[root@CacheNode1 ~]# mmafmctl fs1 prefetch -j rotest1 --list-file /var/mmfs/tmp/cmdTmpDir.mmchfileset.1152157/list-file.mmchfileset.1152157
mmafmctl: Performing prefetching of fileset: rotest1 Queued ( Processed/ Total) Failed TotalData (approx in Bytes) 3 ( 3/ 3) 0 21 prefetch successfully queued at the gateway. [root@CacheNode1 ~]# [root@CacheNode1 ~]# mmchfileset fs1 rotest1 -p afmTarget=disable-online Warning! Once disabled, AFM cannot be re-enabled on this fileset. Do you wish to continue? (yes/no) yes Warning! Fileset should be verified for uncached files and orphans. If already verified, then skip this step. Do you wish to verify same? (yes/no) yes Verifying if all the data is cached. This may take a while... All the data is cached, rerun the command to disable AFM. mmchfileset: Command failed. Examine previous error messages to determine cause.
- Above command make sure that all the data is cached. Proceed to disable without verification
-
[root@CacheNode1 ~]# mmchfileset fs1 rotest1 -p afmTarget=disable-online
Warning! Once disabled, AFM cannot be re-enabled on this fileset. Do you wish to continue? (yes/no) yes Warning! Fileset should be verified for uncached files and orphans. If already verified, then skip this step. Do you wish to verify same? (yes/no) no Fileset rotest1 changed.
- After fileset is disabled, it will no longer associate to AFM target or home fileset
-
[root@CacheNode1 ~]# mmlsfileset fs1 rotest1 --afm -L
Filesets in file system 'fs1': Attributes for fileset rotest1: ================================ Status Linked Path /gpfs/fs1/rotest1 Id 52 Root inode 3407875 Parent Id 0 Created Mon Jan 30 01:03:14 2023 Comment Inode space 26 Maximum number of inodes 100352 Allocated inodes 100352 Permission change flag chmodAndSetacl afm-associated No Permission inherit flag inheritAclOnly