[16] | 1 | .TH mmrestripefs 02/16/06 |
---|
| 2 | mmrestripefs Command |
---|
| 3 | .SH "Name" |
---|
| 4 | .PP |
---|
| 5 | \fBmmrestripefs\fR - Rebalances or restores the replication factor of all |
---|
| 6 | files in a file system. |
---|
| 7 | .SH "Synopsis" |
---|
| 8 | .PP |
---|
| 9 | \fBmmrestripefs\fR \fIDevice\fR {\fB-m\fR | \fB-r\fR | |
---|
| 10 | \fB-b\fR | \fB-p\fR} [\fB-N\fR |
---|
| 11 | {\fINode\fR[,\fINode\fR...] | |
---|
| 12 | \fINodeFile\fR | \fINodeClass\fR}] [\fB-P\fR \fIPoolName\fR] |
---|
| 13 | .SH "Description" |
---|
| 14 | .PP |
---|
| 15 | Use the \fBmmrestripefs\fR command to rebalance or restore the |
---|
| 16 | replication factor of all files in a file system. The |
---|
| 17 | \fBmmrestripefs\fR command moves existing file system data between |
---|
| 18 | different disks in the file system based on changes to the disk state made by |
---|
| 19 | the |
---|
| 20 | \fBmmchdisk\fR, \fBmmadddisk\fR, and \fBmmdeldisk\fR commands. |
---|
| 21 | .PP |
---|
| 22 | The \fBmmrestripefs\fR command attempts to restore the metadata or data |
---|
| 23 | replication factor of any file in the file system. |
---|
| 24 | .PP |
---|
| 25 | You must specify one of the four options (\fB-b\fR, \fB-m\fR, |
---|
| 26 | \fB-r\fR, or \fB-p\fR) to indicate how much file system data to |
---|
| 27 | move. You can issue this command against a mounted or unmounted file |
---|
| 28 | system. |
---|
| 29 | .PP |
---|
| 30 | If you do not use replication, the \fB-m\fR and \fB-r\fR options are |
---|
| 31 | equivalent. Their behavior differs only on replicated files. |
---|
| 32 | After a successful replicate (\fB-r\fR option), all suspended disks are |
---|
| 33 | empty. A migrate operation, using the \fB-m\fR option, leaves data |
---|
| 34 | on a suspended disk as long as at least one other replica of the data remains |
---|
| 35 | on a disk that is not suspended. Restriping a file system includes |
---|
| 36 | replicating it. The \fB-b\fR option performs all the operations of |
---|
| 37 | the \fB-m\fR and \fB-r\fR options. |
---|
| 38 | .PP |
---|
| 39 | Consider the necessity of restriping and the current demands on the |
---|
| 40 | system. New data that is added to the file system is correctly |
---|
| 41 | striped. Restriping a large file system requires a large number of |
---|
| 42 | insert and delete operations and may affect system performance. Plan to |
---|
| 43 | perform this task when system demand is low. |
---|
| 44 | .PP |
---|
| 45 | When using SANergy, consider these points: |
---|
| 46 | .RS +3 |
---|
| 47 | .HP 3 |
---|
| 48 | \(bu If the \fBmmrestripefs\fR command is issued on a file that is locked by |
---|
| 49 | SANergy, the command waits until it is unlocked before proceeding. |
---|
| 50 | .HP 3 |
---|
| 51 | \(bu I/O operations from SANergy clients must terminate before using the |
---|
| 52 | \fBmmrestripefs\fR command. If not, the client applications receive |
---|
| 53 | an error. |
---|
| 54 | .RE |
---|
| 55 | .PP |
---|
| 56 | \fBDetermining how long mmrestripefs takes to complete\fR |
---|
| 57 | .PP |
---|
| 58 | To determine how long the \fBmmrestripefs\fR command will take to complete, |
---|
| 59 | consider these points: |
---|
| 60 | .RS +3 |
---|
| 61 | .HP 3 |
---|
| 62 | 1. How much data is to be moved by issuing the \fBdf -k\fR command. |
---|
| 63 | .HP 3 |
---|
| 64 | 2. How many GPFS client nodes there are to do the work. |
---|
| 65 | .HP 3 |
---|
| 66 | 3. How much virtual shared disk server or Network Shared Disk (NSD) |
---|
| 67 | server bandwidth is available for I/O. |
---|
| 68 | .HP 3 |
---|
| 69 | 4. If you have added new disks to a file system, after the disks have been |
---|
| 70 | added determine how much free space is on each of the new disks by issuing the |
---|
| 71 | \fBmmdf\fR \fIDevice\fR \fB- q\fR |
---|
| 72 | command. |
---|
| 73 | .RE |
---|
| 74 | .PP |
---|
| 75 | The restriping of a file system is done by having one thread on each node in |
---|
| 76 | the cluster work on a subset of files. Consequently, the more GPFS |
---|
| 77 | client nodes performing work for the restripe, the faster the |
---|
| 78 | \fBmmrestripefs\fR command will complete. The nodes that should |
---|
| 79 | participate in the restripe are specified on the command using the \fB-N\fR |
---|
| 80 | parameter. Based on raw I/O rates, you should be able to estimate the |
---|
| 81 | length of time for the restripe. However, to account for the overhead |
---|
| 82 | of scanning all metadata, that value should be doubled. |
---|
| 83 | .PP |
---|
| 84 | Assuming that you have enough nodes to saturate the disk servers, and have |
---|
| 85 | to move all of the data, the time to read and write every block of data is |
---|
| 86 | roughly: |
---|
| 87 | .sp |
---|
| 88 | .nf |
---|
| 89 | 2 * fileSystemSize / averageDiskserverDataRate |
---|
| 90 | .fi |
---|
| 91 | .sp |
---|
| 92 | .PP |
---|
| 93 | As an upper bound, due to overhead of scanning all of the metadata, this |
---|
| 94 | time should be doubled. If other jobs are heavily loading the virtual |
---|
| 95 | shared disk servers, this time may increase even more. |
---|
| 96 | .RS +3 |
---|
| 97 | \fBNote:\fR |
---|
| 98 | .RE |
---|
| 99 | .RS +9 |
---|
| 100 | There is no particular reason to stop all other jobs while the |
---|
| 101 | \fBmmrestripefs\fR command is running. The CPU load of the command |
---|
| 102 | is minimal on each node and only the files that are being restriped at any |
---|
| 103 | moment are locked to maintain data integrity. |
---|
| 104 | .RE |
---|
| 105 | .SH "Parameters" |
---|
| 106 | .PP |
---|
| 107 | .RS +3 |
---|
| 108 | \fB\fIDevice\fR |
---|
| 109 | \fR |
---|
| 110 | .RE |
---|
| 111 | .RS +9 |
---|
| 112 | The device name of the file system to be restriped. File system |
---|
| 113 | names need not be fully-qualified. \fBfs0\fR is as acceptable as |
---|
| 114 | \fB/dev/fs0\fR. |
---|
| 115 | .PP |
---|
| 116 | This must be the first parameter. |
---|
| 117 | .RE |
---|
| 118 | .PP |
---|
| 119 | .RS +3 |
---|
| 120 | \fB-N {\fINode\fR[,\fINode\fR...] | |
---|
| 121 | \fINodeFile\fR | \fINodeClass\fR} |
---|
| 122 | \fR |
---|
| 123 | .RE |
---|
| 124 | .RS +9 |
---|
| 125 | Specify the nodes that participate in the restripe of the file |
---|
| 126 | system. This command supports all defined node classes. The |
---|
| 127 | default is \fBall\fR (all nodes in the GPFS cluster will participate in the |
---|
| 128 | restripe of the file system). |
---|
| 129 | .PP |
---|
| 130 | For information on how to specify node names, see \fISpecifying nodes as input to GPFS commands\fR |
---|
| 131 | in \fIGPFS: Administration and Programming Reference\fR. |
---|
| 132 | .RE |
---|
| 133 | .SH "Options" |
---|
| 134 | .PP |
---|
| 135 | .RS +3 |
---|
| 136 | \fB-b |
---|
| 137 | \fR |
---|
| 138 | .RE |
---|
| 139 | .RS +9 |
---|
| 140 | Rebalances all files across all disks that are not suspended, even if they |
---|
| 141 | are stopped. Although blocks are allocated on a stopped disk, they are |
---|
| 142 | not written to a stopped disk, nor are reads allowed from a stopped disk, |
---|
| 143 | until that disk is started and replicated data is copied onto it. The |
---|
| 144 | \fBmmrestripefs\fR command rebalances and restripes the file system. |
---|
| 145 | Use this option to rebalance the file system after adding, changing, or |
---|
| 146 | deleting disks in a file system. |
---|
| 147 | .RS +3 |
---|
| 148 | \fBNote:\fR |
---|
| 149 | .RE |
---|
| 150 | .RS +9 |
---|
| 151 | Rebalancing of files is an I/O intensive and time consuming operation, and is |
---|
| 152 | important only for file systems with large files that are mostly |
---|
| 153 | invariant. In many cases, normal file update and creation will |
---|
| 154 | rebalance your file system over time, without the cost of the |
---|
| 155 | rebalancing. |
---|
| 156 | .RE |
---|
| 157 | .RE |
---|
| 158 | .PP |
---|
| 159 | .RS +3 |
---|
| 160 | \fB-m |
---|
| 161 | \fR |
---|
| 162 | .RE |
---|
| 163 | .RS +9 |
---|
| 164 | Migrates all critical data off any suspended disk in this file |
---|
| 165 | system. Critical data is all data that would be lost if currently |
---|
| 166 | suspended disks were removed. |
---|
| 167 | .RE |
---|
| 168 | .PP |
---|
| 169 | .RS +3 |
---|
| 170 | \fB-P \fIPoolName\fR |
---|
| 171 | \fR |
---|
| 172 | .RE |
---|
| 173 | .RS +9 |
---|
| 174 | Directs \fBmmrestripefs\fR to repair only files assigned to the |
---|
| 175 | specified storage pool. |
---|
| 176 | .RE |
---|
| 177 | .PP |
---|
| 178 | .RS +3 |
---|
| 179 | \fB-p |
---|
| 180 | \fR |
---|
| 181 | .RE |
---|
| 182 | .RS +9 |
---|
| 183 | Directs \fBmmrestripefs\fR to repair the file placement within the |
---|
| 184 | storage pool. |
---|
| 185 | .PP |
---|
| 186 | Files assigned to one storage pool, but with data in a different pool, will |
---|
| 187 | have their data migrated to the correct pool. Such files are referred |
---|
| 188 | to as ill-placed. Utilities, such as the \fBmmchattr\fR command, may change a file's storage |
---|
| 189 | pool assignment, but not move the data. The \fBmmrestripefs\fR |
---|
| 190 | command may then be invoked to migrate all of the data at once, rather than |
---|
| 191 | migrating each file individually. Note that the rebalance operation, |
---|
| 192 | specified by the \fB-b\fR option, also performs data placement on all |
---|
| 193 | files, whereas the placement option, specified by \fB-p\fR, rebalances only |
---|
| 194 | the files that it moves. |
---|
| 195 | .RE |
---|
| 196 | .PP |
---|
| 197 | .RS +3 |
---|
| 198 | \fB-r |
---|
| 199 | \fR |
---|
| 200 | .RE |
---|
| 201 | .RS +9 |
---|
| 202 | Migrates all data off suspended disks. It also restores all |
---|
| 203 | replicated files in the file system to their designated degree of replication |
---|
| 204 | when a previous disk failure or removal of a disk has made some replica data |
---|
| 205 | inaccessible. Use this parameter either immediately after a disk |
---|
| 206 | failure to protect replicated data against a subsequent failure, or before |
---|
| 207 | taking a disk offline for maintenance to protect replicated data against |
---|
| 208 | failure of another disk during the maintenance process. |
---|
| 209 | .RE |
---|
| 210 | .SH "Exit status" |
---|
| 211 | .PP |
---|
| 212 | .PP |
---|
| 213 | .RS +3 |
---|
| 214 | \fB0 |
---|
| 215 | \fR |
---|
| 216 | .RE |
---|
| 217 | .RS +9 |
---|
| 218 | Successful completion. |
---|
| 219 | .RE |
---|
| 220 | .PP |
---|
| 221 | .RS +3 |
---|
| 222 | \fBnonzero |
---|
| 223 | \fR |
---|
| 224 | .RE |
---|
| 225 | .RS +9 |
---|
| 226 | A failure has occurred. |
---|
| 227 | .RE |
---|
| 228 | .SH "Security" |
---|
| 229 | .PP |
---|
| 230 | You must have root authority to run the \fBmmrestripefs\fR |
---|
| 231 | command. |
---|
| 232 | .PP |
---|
| 233 | You may issue the \fBmmrestripefs\fR command from any node in the GPFS |
---|
| 234 | cluster. |
---|
| 235 | .PP |
---|
| 236 | When using the \fBrcp\fR and \fBrsh\fR commands for remote |
---|
| 237 | communication, a properly configured \fB.rhosts\fR file must exist |
---|
| 238 | in the root user's home directory on each node in the GPFS |
---|
| 239 | cluster. If you have designated the use of a different remote |
---|
| 240 | communication program on either the |
---|
| 241 | \fBmmcrcluster\fR |
---|
| 242 | or the |
---|
| 243 | \fBmmchcluster\fR command, you must |
---|
| 244 | ensure: |
---|
| 245 | .RS +3 |
---|
| 246 | .HP 3 |
---|
| 247 | 1. Proper authorization is granted to all nodes in the GPFS cluster. |
---|
| 248 | .HP 3 |
---|
| 249 | 2. The nodes in the GPFS cluster can communicate without the use of a |
---|
| 250 | password, and without any extraneous messages. |
---|
| 251 | .RE |
---|
| 252 | .SH "Examples" |
---|
| 253 | .RS +3 |
---|
| 254 | .HP 3 |
---|
| 255 | 1. To move all critical data from any suspended disk in file system |
---|
| 256 | \fBfs0\fR, issue this command: |
---|
| 257 | .sp |
---|
| 258 | .nf |
---|
| 259 | mmrestripefs fs0 -m |
---|
| 260 | .fi |
---|
| 261 | .sp |
---|
| 262 | The system displays information similar to: |
---|
| 263 | .sp |
---|
| 264 | .nf |
---|
| 265 | Scanning file system metadata, phase 1 ... |
---|
| 266 | Scan completed successfully. |
---|
| 267 | Scanning file system metadata, phase 2 ... |
---|
| 268 | Scan completed successfully. |
---|
| 269 | Scanning file system metadata, phase 3 ... |
---|
| 270 | Scan completed successfully. |
---|
| 271 | Scanning file system metadata, phase 4 ... |
---|
| 272 | Scan completed successfully. |
---|
| 273 | Scanning user file metadata ... |
---|
| 274 | 6 % complete on Fri Feb 10 15:45:07 2006 |
---|
| 275 | 45 % complete on Fri Feb 10 15:48:03 2006 |
---|
| 276 | 78 % complete on Fri Feb 10 15:49:28 2006 |
---|
| 277 | 85 % complete on Fri Feb 10 15:49:53 2006 |
---|
| 278 | 100 % complete on Fri Feb 10 15:53:21 2006 |
---|
| 279 | Scan completed successfully. |
---|
| 280 | .fi |
---|
| 281 | .sp |
---|
| 282 | .HP 3 |
---|
| 283 | 2. To rebalance all files in file system \fBfs1\fR across all defined, |
---|
| 284 | accessible disks that are not stopped or suspended, issue this command: |
---|
| 285 | .sp |
---|
| 286 | .nf |
---|
| 287 | mmrestripefs fs1 -b |
---|
| 288 | .fi |
---|
| 289 | .sp |
---|
| 290 | The system displays information similar to: |
---|
| 291 | .sp |
---|
| 292 | .nf |
---|
| 293 | GPFS: 6027-589 Scanning file system metadata, phase 1 ...\ |
---|
| 294 | 48 % complete on Wed Aug 16 16:47:53 2000 |
---|
| 295 | 96 % complete on Wed Aug 16 16:47:56 2000 |
---|
| 296 | 100 % complete on Wed Aug 16 16:47:56 2000 |
---|
| 297 | GPFS: 6027-552 Scan completed successfully. |
---|
| 298 | GPFS: 6027-589 Scanning file system metadata, phase 2 ...\ |
---|
| 299 | GPFS: 6027-552 Scan completed successfully. |
---|
| 300 | GPFS: 6027-589 Scanning file system metadata, phase 3 ...\ |
---|
| 301 | 98 % complete on Wed Aug 16 16:48:02 2000 |
---|
| 302 | 100 % complete on Wed Aug 16 16:48:02 2000 |
---|
| 303 | GPFS: 6027-552 Scan completed successfully. |
---|
| 304 | GPFS: 6027-565 Scanning user file metadata ... |
---|
| 305 | GPFS: 6027-552 Scan completed successfully. |
---|
| 306 | .fi |
---|
| 307 | .sp |
---|
| 308 | .RE |
---|
| 309 | .SH "See also" |
---|
| 310 | .PP |
---|
| 311 | .PP |
---|
| 312 | mmadddisk Command |
---|
| 313 | .PP |
---|
| 314 | mmapplypolicy Command |
---|
| 315 | .PP |
---|
| 316 | mmchattr Command |
---|
| 317 | .PP |
---|
| 318 | mmchdisk Command |
---|
| 319 | .PP |
---|
| 320 | mmdeldisk Command |
---|
| 321 | .PP |
---|
| 322 | mmrpldisk Command |
---|
| 323 | .PP |
---|
| 324 | mmrestripefile Command |
---|
| 325 | .SH "Location" |
---|
| 326 | .PP |
---|
| 327 | \fB/usr/lpp/mmfs/bin\fR |
---|
| 328 | .PP |
---|