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
c26c2apv2 Thu Feb 25 11:07:15 4]# 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
c26c2apv2 Thu Feb 25 11:28:37 4]~# 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
c26c2apv2 Thu Feb 25 11:30:47 4]~# 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
c26c2apv2 Thu Feb 25 11:40:36 4]~# 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.
c26c2apv2 Thu Feb 25 11:43:51 4]~# 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
c26c2apv2 Thu Feb 25 11:48:36 4]iw1# 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
c26c2apv2 Thu Feb 25 11:48:39 4]iw1# 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.
c26c2apv2 Thu Feb 25 11:51:36 4]iw1# 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