Table of ContentsView in Frames

Performing a full reallocation scan of a LUN, file, or volume

You can perform a scan that reallocates every block in a LUN, file, or 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 the layout of a LUN, file, or volume. A full reallocation scan always moves blocks, unless the move makes the layout even worse.

About this task

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 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.

Attention: You cannot perform a full reallocation (using the -f option) on an entire volume that has existing Snapshot copies, unless you also perform a physical reallocation (using the -p option). Otherwise, an error message is displayed. If you do a full reallocation on a file or LUN without the -p option, you might end up 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, avoid transferring large amounts of data from the Snapshot copy to the active file system 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.

If a full reallocation scan fails because of space issues, consider performing reallocation scans on a per-file basis, by using reallocate start file_pathname without any options. However, if the space issue is caused by a full reallocation on a file or LUN that was performed without the -p option, a long-term solution is to wait until the Snapshot rotation has freed space on the volume and then to rerun the full reallocation scan with the -p option.

Step

  1. Enter the following command:
    reallocate start -f [-p] [-u] pathname | vol/volname

    • -p reallocates user data on the physical blocks in the aggregate while preserving the logical block locations within a FlexVol volume. You cannot use the -p option with the -u option.

      This option also reallocates the shared blocks in a deduplicated volume. Reallocation scans skip deduplicated data if you do not specify the -p option. You can use this option only with FlexVol volumes, with files and LUNs within FlexVol volumes, or with deduplicated volumes.

      Do not use -p when you start a reallocation scan on a compressed volume. Starting a reallocation scan on a compressed volume using -p does not optimize the layout of a volume.

    • -u duplicates blocks that are shared between files by deduplication. Duplicating the blocks removes the sharing. This option can help remove fragmentation; however, because blocks are duplicated, it can result in increased disk usage, especially for full reallocation. You cannot use the -u option with the -p option.