Failback with pre-migrated file on old primary and no changes from acting primary
This use case describes failing back with pre-migrated file on old primary.
Fileset: primary
State of the file in latest RPO at primary: Migrated
Action on the file from primary after latest RPO: Recall and update ctime
Primary disaster, failover to secondary, old primary came back up, run failback start
State of the file in the old primary after failback start: P with blocks from RPO
Current state of the file on acting primary: R with no mtime change
State of the file in the old primary after applyUpdates: P with blocks from RPO
#create a new file from primary, flush to secondary
(05:28:53) hs21n30:~ # dd if=/dev/urandom of=/gpfs/fs2/HSMprimary/file5 bs=1M
count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.14042 s, 7.5 MB/s
(05:30:59) hs21n30:~ # mmafmctl fs2 getstate -j
HSMprimary
Fileset Name Fileset Target Cache State Gateway Node Queue Length Queue numExec
------------ -------------- ------------- ------------ ------------ -------------
HSMprimary nfs://c41bn3/gpfs/fs2/HSMsecondary Active hs22n25 0 19
#Migrate the file from primary
(05:31:25) hs21n30:~ # dsmmigrate
/gpfs/fs2/HSMprimary/file5
Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 7, Release 1, Level 3.0
Client date/time: 02/08/16 05:31:59
(c) Copyright by IBM Corporation and other(s) 1990, 2016. All Rights Reserved.
(05:32:05) hs21n30:~ # dsmls /gpfs/fs2/HSMprimary/file5 | grep
file5
1048576 0 0 m file5
#trigger a new RPO snapshot at primary
(05:32:51) hs21n30:~ # mmpsnap fs2 create -j HSMprimary
--rpo
Flushing dirty data for snapshot HSMprimary:psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-32-57...
Quiescing all file system operations.
Snapshot HSMprimary:psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-32-57 created with id 10051.
mmpsnap: The peer snapshot psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-32-57 is created successfully.
(05:32:57) hs21n30:~ # mmafmctl fs2 getstate -j
HSMprimary
Fileset Name Fileset Target Cache State Gateway Node Queue Length Queue numExec
------------ -------------- ------------- ------------ ------------ -------------
HSMprimary nfs://c41bn3/gpfs/fs2/HSMsecondary Active hs22n25 0 24
#Recall and update ctime of file
(05:34:57) hs21n30:~ # dsmrecall /gpfs/fs2/HSMprimary/file5
(05:35:17) hs21n30:~ # dsmls /gpfs/fs2/HSMprimary/file5 | grep
file5
1048576 1048576 1024 p file5
(05:35:21) hs21n30:~ # chmod 777 /gpfs/fs2/HSMprimary/file5
#Run failoverToSecondary at secondary
(05:33:27) c41bn3:~ # mmafmctl fs2 failoverToSecondary -j HSMsecondary --restore
mmafmctl: failoverToSecondary restoring from psnap psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-32-57
[2016-02-08 05:36:04] Restoring fileset "HSMsecondary" from snapshot "psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-32-57" of filesystem "/dev/fs2"
[2016-02-08 05:36:05] Scanning inodes, phase 1 ...
[2016-02-08 05:36:06] 2770438144 inodes have been scanned, 50% of total.
[2016-02-08 05:36:06] 5540876288 inodes have been scanned, 100% of total.
[2016-02-08 05:36:06] Constructing operation list, phase 2 ...
[2016-02-08 05:36:06] 0 operations have been added to list.
[2016-02-08 05:36:06] 1 operations have been added to list.
[2016-02-08 05:36:06] Deleting the newly created files, phase 3 ...
[2016-02-08 05:36:07] Deleting the newly created hard links, phase 4 ...
[2016-02-08 05:36:08] Splitting clone files, phase 5 ...
[2016-02-08 05:36:08] Deleting the newly created clone files, phase 6 ...
[2016-02-08 05:36:09] Moving files, phase 7 ...
[2016-02-08 05:36:10] Reconstructing directory tree, phase 8 ...
[2016-02-08 05:36:11] Moving files back to their correct positions, phase 9 ...
[2016-02-08 05:36:11] Re-creating the deleted files, phase 10 ...
[2016-02-08 05:36:12] Re-creating the deleted clone parent files, phase 11 ...
[2016-02-08 05:36:13] Re-creating the deleted clone child files, phase 12 ...
[2016-02-08 05:36:14] Re-creating the deleted hard links, phase 13 ...
[2016-02-08 05:36:14] Restoring the deltas of changed files, phase 14 ...
[2016-02-08 05:36:16] Restoring the attributes of files, phase 15 ...
[2016-02-08 05:36:17] Restore completed successfully.
[2016-02-08 05:36:17] Clean up.
Primary Id (afmPrimaryId) 5492471941218300346-C0A82917531DFD53-645
Fileset HSMsecondary changed.
Promoted fileset HSMsecondary to Primary
# Start failbackToPrimary at old primary
(05:35:30) hs21n30:~ # mmafmctl fs2 failbackToPrimary -j HSMprimary
--start
Fileset HSMprimary changed.
mmafmctl: failbackToPrimary restoring from psnap psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-32-57
[2016-02-08 05:36:42] Restoring fileset "HSMprimary" from snapshot "psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-32-57" of filesystem "/dev/fs2"
[2016-02-08 05:36:44] Scanning inodes, phase 1 ...
[2016-02-08 05:37:02] 71403200 inodes have been scanned, 50% of total.
[2016-02-08 05:37:20] 142806400 inodes have been scanned, 100% of total.
[2016-02-08 05:37:20] Constructing operation list, phase 2 ...
[2016-02-08 05:37:20] 0 operations have been added to list.
[2016-02-08 05:37:20] 1 operations have been added to list.
[2016-02-08 05:37:20] Deleting the newly created files, phase 3 ...
[2016-02-08 05:37:21] Deleting the newly created hard links, phase 4 ...
[2016-02-08 05:37:22] Splitting clone files, phase 5 ...
[2016-02-08 05:37:23] Deleting the newly created clone files, phase 6 ...
[2016-02-08 05:37:24] Moving files, phase 7 ...
[2016-02-08 05:37:24] Reconstructing directory tree, phase 8 ...
[2016-02-08 05:37:25] Moving files back to their correct positions, phase 9 ...
[2016-02-08 05:37:26] Re-creating the deleted files, phase 10 ...
[2016-02-08 05:37:27] Re-creating the deleted clone parent files, phase 11 ...
[2016-02-08 05:37:27] Re-creating the deleted clone child files, phase 12 ...
[2016-02-08 05:37:28] Re-creating the deleted hard links, phase 13 ...
[2016-02-08 05:37:29] Restoring the deltas of changed files, phase 14 ...
[2016-02-08 05:37:30] Restoring the attributes of files, phase 15 ...
[2016-02-08 05:37:31] Restore completed successfully.
[2016-02-08 05:37:31] Clean up.
#ApplyUpdates on old primary
(05:37:32) hs21n30:~ # mmafmctl fs2 applyUpdates -j
HSMprimary
[2016-02-08 05:37:38] Getting the list of updates from the acting Primary...
[2016-02-08 05:37:43] Applying the 1 updates...
[2016-02-08 05:37:43] 1 updates have been applied, 100% of total.
mmafmctl: Creating the failback psnap locally. failback-psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-37-36
Flushing dirty data for snapshot HSMprimary:failback-psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-37-36...
Quiescing all file system operations.
Snapshot HSMprimary:failback-psnap-rpo-C0A8741A5587A9AB-143-16-02-08-05-37-36 created with id 10052.
#State of the file in the old primary after applyUpdates
(05:38:01) hs21n30:~ # dsmls
/gpfs/fs2/HSMprimary/file5
Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 7, Release 1, Level 3.0
Client date/time: 02/08/16 05:38:11
(c) Copyright by IBM Corporation and other(s) 1990, 2016. All Rights Reserved.
ActS ResS ResB FSt FName
1048576 1048576 1024 p file5
(05:38:11) hs21n30:~ # mmafmctl fs2 failbackToPrimary -j HSMprimary --stop
Fileset HSMprimary changed.