The resize command resizes a file to the desired modulo and increases or decreases the apparent contiguous portion (or modulo) of the specified file without requiring a file-restore. It either adds or releases the amount of overflow necessary to reach the new modulo, and rehashes all of the items. The rehashing is done by groups and the current relative group being rehashed displays on the screen.
For Windows: Not Supported in FSI. See the nt_resize command for an alternate resize method.
resize file.reference{modulo} {(options}
resize-file
options | a | Allocates new file space only. If this option is used, then the new segment is added, but no items are rehashed. This is useful for allocating the new file space in the foreground, and then starting another resizing process as a phantom to complete the rehashing process. |
s | Suppresses output of the relative group counter during rehashing. | |
u | Unconditional resizing. Normally, resizing processes pause temporarily when some other process is accessing the file in a sequential fashion (for example, a save, an AQL or FlashBASIC select). This is because items are in motion during the resizing and sequential processes may find an item twice. The u option disables this behavior so that resizing proceeds irrespective of any sequential processes. Also, the u option releases extra unused file space at the end of a resize down irrespective of how many users have that file open. | |
w{n} | Waits after every group. If a numeric parameter is not specified, then this option causes the resizing process to wait for approximately 100 milliseconds between each group that it rehashes. If an optional numeric parameter is specified, then the process sleeps for n seconds between each group. This option minimizes the impact on overall system performance during the resizing process and is strongly recommended. | |
z | Rehashes a small number of groups only. This is used by the check-resizing and kill-resizing commands after a resizing process has been terminated unexpectedly. Under these conditions, the resize command processes enough groups to assure that no duplicate items occur in groups which were previously being rehashed. |
The resize command allows a file to be read or modified while the items are being rehashed. Furthermore, the resizing process does not require a completely new block of overflow with a size equal to the new modulo. Instead, it allocates a new file segment, which is only as big as the difference between the old and new modulos, and maps this segment onto the existing file. The file then displays to have one contiguous block available even though it may really be several blocks internally.
Once a resizing command has begun rehashing a file, the command can be logged-off or interrupted without problems. The resizing process can then be restarted on the same line or on a phantom.
If the modulo is not specified, then the resize command resizes the file according to the reallocation attribute in the file’s D-pointer.
To display all resizing processes currently active, use the list-resizing command.
To temporarily stop all resizing processes on the system, use the kill-resizing command.
To restart all resizing processes (on phantoms), use the check-resizing command. This command is executed at coldstart time to restart any resizing commands, which were interrupted by a shutdown.
After resizing a file, the D-pointer of that file displays a modulo equal to the new modulo. The reallocation attribute is also changed to the new modulo. The internal base and modulo of each of the file’s segments display in the segment-base and segment-mod attributes. These attributes cannot be modified.
Pausing for another process doing sequential file access..Due to their long-running time, and lack of effect on actual data, resizing commands are not transferred to the transaction log. It is not possible to resize the mds file, but the file-of-files file can be resized. On a specified file, it is not possible to resize to a new modulo until the previous resizing (if any) has completed. When resizing downwards, it is sometimes not possible to release the extra file space if another user has that file open. In this case, all users must close the file before the space can be released. When all users have exited the file, re-execute the resize command to give the space.
Assume that a file called mydata exists with a modulo of 7, and that the istat command indicates a suggested modulo of 13.
resize mydata 13 Allocating 6 additional frames for primary file space. Rehashing 7 group(s). 7 [188] Resizing complete.
The file now exists with a modulo of 13.