The allocation management process consists of three steps:
1. Measure the current layout. If the optimization is less then a threshold value then take no action. This step is optional.
2. Perform reallocation of the large file or LUN.
3. Measure the layout again. If the optimization is above the threshold value, repeat steps 2. and 3. as necessary.
These steps, together with scheduling and other information comprise a reallocation job.
Reallocation processing operates as a background task. Output goes to the system log. Current status may be viewed using the reallocate status subcommand.
A reallocation job can be run at a specific interval, which is the default, or at scheduled times, set using the reallocate schedule subcommand.
The reallocation process balances the data blocks reallocated against the performance gained by performing the reallocation. It only reallocates blocks when a performance improvement is predicted. That is, if a section of a file or LUN is already optimal then no change will be made. In addition, full one-time reallocation of a large file, LUN or a whole volume, can be forced by using the -f option with reallocate start. A full reallocation will reallocate data unless the performance is predicated to be worse after the movement. Full reallocation is equivalent to using wafl scan reallocate.
Enable or disable reallocation jobs globally. When jobs are off no new reallocation jobs may be started or restarted. Any existing jobs that are executing will be requested to stop.
reallocate start [-t threshold] [-i interval] [-n] [-o] pathname
Start reallocation on the LUN or large file specified by pathname.
The reallocation job normally performans a check for the current layout optimization before performing reallocation. If the current optimization is less than the threshold then no reallocation will be performed. If the -n option is specified this check is suppressed. The threshold to use may be specified by the -t option (see below).
The reallocation job will be run periodically at a system-defined interval. The interval between runs may be changed with the -i (interval) option The interval is specified as a number of minutes, hours or days, NNN[mhd]. Note, depending on the system configuration and write/read workload it may be appropriate to have the job run at a close interval or at a long interval. If the -o (once) option is used then the job will be run once only, and then automatically removed from the system.
The threshold when a LUN or file is considered unoptimized enough that a reallocation should be performed is given as a number from 3 (moderately optimized) to 10 (very unoptimized). For users of the wafl scan measure_layout command these thresholds are comparable with the ratio output. The default threshold is 4.
reallocate start -f pathname | /vol/volname
The -f (force) option performs a one-time full reallocation of a file, LUN or an entire volume. A forced reallocation will rewrite blocks in the file, LUN or volume unless the change is predicated to result in worse performance.
If a reallocation job already exists for the path_name it will be stopped, and then restarted as a full reallocation scan. After the reallocation scan completes the job will revert to its previous schedule. If the job was previously quiesced, it will no longer be quiesced.
reallocate stop pathname
Request that a reallocation job on the LUN or file indicated by pathname should be stopped. The stop subcommand will also persistently remove any reallocation job information for pathname, for example scheduled jobs that are not running or jobs that are quiesced.
reallocate status [-v] [pathname]
Display reallocation status. If pathname is given then only the status for that LUN or file will be displayed. If no pathname is given then the status for all reallocation jobs is displayed.
If -v (verbose) is used then more verbose output is used.
reallocate schedule [-d] [-s schedule] pathname
Set or deletes the schedule to run the reallocation job for pathname. The -s option sets a new schedule, specified by schedule. The -d option deletes an existing schedule.
The format for schedule is a single string with four fields:
"minute hour dayofmonth dayofweek"
The wild card "*" in a field means all values for the field. Each field may be expressed as a single value or a comma-separated list.
minute can be a value from 0 to 59.
hour can be a value from 0 (midnight) to 23 (11 pm)
dayofmonth can be a value from 1 to 31.
dayofweek can be a value from 0 (Sunday) to 6 (Saturday).
reallocate quiesce pathname Quiesce any running realloca_tion job on LUN or file pathname, preserving persistent state so that the job may be started again later, using reallocate restart.
reallocate restart pathname
Restart a reallocation job on pathname. If the job was quiesced, it becomes no longer quiesced. If the job was idle (not yet time to be run again) it will immediately be scheduled to run.
Check the LUN /vol/db1/lun1 allocation periodically.
reallocate schedule -s "0 23 * 6" /vol/db/lun1
Schedule a reallocation job at 11 pm every Saturday.
Removing a large file or LUN will not remove any reallocation job created on the file or LUN. Instead the reallocation job will suspend until either the file or LUN is recreated, or the reallocation job is destroyed.
Renaming or destroying an entire volume will rename or destroy all reallocation jobs associated with that volume.