Changing target protocol of SW/IW filesets
The target protocol used by an SW/IW fileset can be changed from NFS to GPFS or vice-versa. See the following examples:
Changing SW target from GPFS protocol to NFS
#current state of afm fileset
mmafmctl fs1 getstate –j sw1
Fileset Name Fileset Target Cache State Gateway Node Queue Length Queue numExec
------------ -------------- ------------- ------------ ------------ -------------
sw1 gpfs:///gpfs/remotefs1/sw1 Active c25m4n04 0 2
#change protocol using mmafmctl failover command
mmafmctl fs1 failover -j sw1 --new-target=c2m3n06:/gpfs/fs1/sw1
mmafmctl: Performing failover to nfs://c2m3n06/gpfs/fs1/sw1
Fileset sw1 changed.
mmafmctl: Failover in progress. This may take while...
Check fileset state or register for callback to know the completion status.
#mmfs.log of MDS:
Thu Feb 25 11:30:45 IST 2016: mmafmctl: [I] Performing resync of fileset: sw1
Thu Feb 25 11:30:45 IST 2016: [N] AFM: Running following policy scan to find files from /gpfs/fs1/sw1
mmafmlocal /usr/lpp/mmfs/bin/mmapplypolicy /gpfs/fs1/sw1/.snapshots/sw1.afmresync.14605 --scope fileset -S sw1.afmresync.14605 -P /tmp/filedirPolicy.mmafmctl.17222 -s /tmp/ -L 0 -I defer -N mount -f /tmp/policyData.mmafmctl.17222 >/tmp/policyLog.mmafmctl.17222 2>&1
Thu Feb 25 11:30:47.922 2016: [I] AFM: Starting 'queue' operation for fileset 'sw1' in filesystem '/dev/fs1'.
Thu Feb 25 11:30:47.923 2016: [I] Command: tspcache /dev/fs1 1 sw1 0 514 0 54 0 122
Thu Feb 25 11:30:47.980 2016: [I] Command: successful tspcache /dev/fs1 1 sw1 0 514 0 54 0 122
Thu Feb 25 11:30:48.171 2016: [I] Command: tsdelsnapshot fs1 sw1.afmresync.14605 -j sw1 0
Thu Feb 25 11:30:48.371 2016: [I] Command: successful tsdelsnapshot fs1 sw1.afmresync.14605 -j sw1 0
Thu Feb 25 11:35:33.764 2016: [I] Command: tschfileset /dev/fs1 newSanity-160225-100224-NativeGPFS-TC1-IW -p afmtarget gpfs://c2m3n06//gpfs/remotefs1/newSanity-160225-100224-NativeGPFS-TC1-IW
Thu Feb 25 11:35:33.804 2016: [I] Command: successful tschfileset /dev/fs1 newSanity-160225-100224-NativeGPFS-TC1-IW -p afmtarget gpfs://c2m3n06//gpfs/remotefs1/newSanity-160225-100224-NativeGPFS-TC1-IW
#Fileset changed to use NFS protocol
get -j sw1
Fileset Name Fileset Target Cache State Gateway Node Queue Length Queue numExec
------------ -------------- ------------- ------------ ------------ -------------
sw1 nfs://c2m3n06/gpfs/fs1/sw1 Active c25m4n04 0 5
Changing SW target from NFS protocol to GPFS
#Convert above fileset back to GPFS
mmafmctl fs1 failover -j sw1 --new-target=gpfs:///gpfs/remotefs1/sw1
mmafmctl: Performing failover to gpfs:///gpfs/remotefs1/sw1
Fileset sw1 changed.
mmafmctl: Failover in progress. This may take while...
Check fileset state or register for callback to know the completion status.
mmafmctl fs1 getstate –j sw1
Fileset Name Fileset Target Cache State Gateway Node Queue Length Queue numExec
------------ -------------- ------------- ------------ ------------ -------------
sw1 gpfs:///gpfs/remotefs1/sw1 Active c25m4n04 0 5
Changing IW target from GPFS protocol to NFS
mmafmctl fs1 getstate –j iw1
Fileset Name Fileset Target Cache State Gateway Node Queue Length Queue numExec
------------ -------------- ------------- ------------ ------------ -------------
iw1 gpfs:///gpfs/remotefs1/iw1 Active c25m4n03 0 3
mmafmctl fs1 failover -j iw1 --new-target=c2m3n06:/gpfs/fs1/iw1
mmafmctl: Performing failover to nfs://c2m3n06/gpfs/fs1/iw1
Fileset iw1 changed.
mmafmctl: Failover in progress. This may take while...
Check fileset state or register for callback to know the completion status.
mmafmctl fs1 getstate -j iw1
Fileset Name Fileset Target Cache State Gateway Node Queue Length Queue numExec
------------ -------------- ------------- ------------ ------------ -------------
iw1 nfs://c2m3n06/gpfs/fs1/iw1 Active c25m4n03 0 7155