You use reallocation scans to ensure that blocks in a LUN, large file, or volume are laid out sequentially. If a LUN, large file, or volume is not laid out in sequential blocks, sequential read commands take longer to complete because each command might require an additional disk seek operation. Sequential block layout improves the read/write performance of host applications that access data on the storage system.
A reallocation scan evaluates how the blocks are laid out in a LUN, file, or volume. Data ONTAP performs the scan as a background task, so applications can rewrite blocks in the LUN or volume during the scan. Repeated layout checks during a scan ensure that the sequential block layout is maintained during the current scan.
A reallocation scan does not necessarily rewrite every block in the LUN. Rather, it rewrites whatever is required to optimize the layout of the LUN.
Data ONTAP performs a reallocation scan in the following steps:
The rate at which the reallocation scan runs (the blocks reallocated per second) depends on CPU and disk loads. For example, if you have a high CPU load, the reallocation scan will run at a slower rate, so as not to impact system performance.
You can perform reallocation scans on LUNs when they are online. You do not have to take them offline. You also do not have to perform any host-side procedures when you perform reallocation scans.
You manage reallocation scans by performing the following tasks:
You can define only one reallocation scan for a single LUN.
You can also initiate scans at any time, force Data ONTAP to reallocate blocks sequentially regardless of the optimization level of the LUN layout, and monitor and control the progress of scans.
If you delete a LUN, you do not delete the reallocation scan defined for it. If you take the LUN offline, delete it, and then reconstruct it, you still have the reallocation scan in place. However, if you delete a LUN that has a reallocation scan defined and you do not restore the LUN, the storage system console displays an error message the next time the scan is scheduled to run.
Reallocation scans are disabled by default. You must enable reallocation scans globally on the storage system before you run a scan or schedule regular scans.
To enable reallocation scans, complete the following step.
| 1 |
On the storage system's command line, enter the following command: reallocate on |
To define a reallocation scan for a LUN, complete the following step.
| 1 |
On the storage system's command line, enter the following command: reallocate start [-t threshold] [-n] [-i interval] lun_path -t threshold is a number between 3 (layout is moderately optimal) and 10 (layout is not optimal). The default is 4. A scan checks the block layout of a LUN before reallocating blocks. If the current layout is below the threshold, the scan does not reallocate blocks in the LUN. If the current layout is equal to or above the threshold, the scan reallocates blocks in the LUN. -n reallocates blocks in the LUN without checking its layout. -i interval is the interval, in hours, minutes, or days, at which the scan is performed. The default interval is 24 hours. Specify the interval as follows: [m | h | d] For example, 30m is a 30-minute interval. The countdown to the next scan begins only after the first scan is complete. For example, if the interval is 24 hours and a scan starts at midnight and lasts for an hour, the next scan begins at 1:00 a.m. the next day--24 hours after the first scan is completed. ExamplesThe following example creates a new LUN and a normal reallocation scan that runs every 24 hours. lun create -s 100g /vol/vol2/lun0 reallocate start /vol/vol2/lun0 |
|
| 2 | ||
|
You want to run the reallocation scan according to a schedule |
Proceed to Creating a reallocation scan schedule. | |
|
Proceed to Tasks for managing reallocation scans. | ||
You can run reallocation scans according to a schedule. The schedule you create replaces any interval you specified when you entered the reallocate start command.
To create a reallocation scan schedule, complete the following step.
You can delete an existing reallocation scan schedule that is defined for a LUN. If you delete a schedule, the scan runs according to the interval that you specified when you initially defined the scan using the reallocate start command.
A reallocation scan is not automatically deleted if you delete its corresponding LUN. However, if you destroy a volume, all reallocation scans defined for LUNs in that volume are deleted.
To delete a reallocation scan schedule, complete the following step.
| 1 |
reallocate schedule -d lun_path Examplereallocate schedule -d /vol/myvol/lun1 |
You perform the following tasks to manage reallocation scans:
You can perform a one-time reallocation scan on a LUN. This type of scan is useful if you do not want to schedule regular scans for a particular LUN.
To start a one-time reallocation scan, complete the following step.
| 1 |
reallocate start -o -n lun_path |
You can perform a scan that reallocates every block in a LUN or a volume regardless of the current layout by using the -f option of the reallocate start command. A full reallocation optimizes layout more aggressively than a normal reallocation scan. A normal reallocation scan moves blocks only if the move improves LUN layout. A full reallocation scan always moves blocks, unless the move makes the LUN layout even worse.
Using the -f option of the reallocate start command implies the -o and -n options. This means that the full reallocation scan is performed only once, without checking the LUN's layout first.
You might want to perform this type of scan if you add a new RAID group to a volume and you want to ensure that blocks are laid out sequentially throughout the volume or LUN.
Caution
You should not perform a full reallocation on an entire volume that has Snapshot copies. In this case, a full reallocation might result in using significantly more space in the volume, because the old, unoptimized blocks are still present in the Snapshot copy after the scan. For individual LUNs or files, try to avoid transferring large amounts of data from the Snapshot copy to the active filesystem unless absolutely necessary. The greater the differences between the LUN or file and the Snapshot copy, the more likely the full reallocation will be successful.
To perform a full reallocation scan, complete the following step.
| 1 |
reallocate start -f lun_path | volume-path |
You can quiesce a reallocation scan that is in progress and restart it later. The scan restarts from the beginning of the reallocation process. For example, if you want to back up a LUN, but a scan is already in progress, you can quiesce the scan.
To quiesce a reallocation scan, complete the following step.
| 1 |
reallocate quiesce lun_path |
You might restart a scan for the following reasons:
To restart a scan, complete the following step.
| 1 |
reallocate restart lun_path ResultThe command restarts a quiesced scan. If there is a scheduled scan that is idle, the reallocate restart command runs the scan. |
To view the status of a scan, complete the following step.
You use the reallocate stop command to permanently delete a scan you defined for a LUN. The reallocate stop command also stops any scan that is in progress on the LUN.
To delete a scan, complete the following step.
| 1 |
reallocate stop lun_path ResultThe reallocate stop command stops and deletes any scan on the LUN, including a scan in progress, a scheduled scan that is not running, or a scan that is quiesced. |
You use the reallocate off command to disable reallocation on the storage system. When you disable reallocation scans, you cannot start or restart any new scans. Any scans that are in progress are stopped. If you want to re-enable reallocation scans at a later date, use the reallocate on command.
To disable reallocation scans, complete the following step.
| 1 |
On the storage system's command line, enter the following command: reallocate off |
The following best practices are recommended for using reallocation scans:
Copyright © 1994-2005, Network Appliance, Inc. All rights
reserved.
Part No. 210-01094_B0
File: c10perf2.htm
Last updated: 08-Dec-2005 13:25:38