Restoring the locality for files without WADFG
This topic lists the steps to control the first replica of all blocks.
- Check whether the file is configured with WADFG.
mmlsattr -d -L /sncfs/test file name: /sncfs/test metadata replication: 3 max 3 data replication: 3 max 3 immutable: no appendOnly: no flags: storage pool name: datapool fileset name: root snapshot name: Write Affinity Depth Failure Group(FG) Map for copy:1 1,0,1 Write Affinity Depth Failure Group(FG) Map for copy:2 2,0,1 Write Affinity Depth Failure Group(FG) Map for copy:3 3,0,1 creation time: Thu Mar 24 16:15:01 2016 Misc attributes: ARCHIVE Encrypted: no gpfs.WADFG: 0x312C302C313B322C302C313B332C302C31
If you see gpfs.WADFG (as per the preceding example) from the output of mmlsattr, the file is configured with WADFG, and, in this gpfs.WADFG case, follow the instructions in Restoring the locality for files with WADFG. If you do not see the gpfs.WADFG text, go to the step2.
-
Select the node to store all the blocks from the first replica of the data. One disk from this
node is used to store the first replica of the file, assuming that this node has at least one local
disk that serves the GPFS file system.
In IBM Storage Scale 4.2.2.0 and later, mmrestripefile -l is optimized to reduce unnecessary data movement. For files with WAD=1, if the target node is from the same failure group as the current node holding the replica 1 of blocks, mmrestripefile -l does not move the second and third replica. If it is not, mmrestripefile -l moves three replicas of all the blocks
- If you are using IBM
Storage Scale 4.1.1.0 or
later:
- ssh to the target node selected in step 2
- run mmrestripefile –l filename for each filename to set the data locality for.
If you are using IBM Storage Scale 4.1.1.0 or earlier
- ssh to the target node selected in step 2
- mmchdisk <fs-name> suspend -d "any-one-data-disk"
- mmchdisk <fs-name> resume -d "any-one-data-disk"
- mmrestripefile -b filename
- Check the data locality by running:
/usr/lpp/mmfs/samples/fpo/tsGetDataBlk /sncfs/test -r 3
The first replica of all blocks is located in the target node.