test veritas logo


setext(1)

NAME

setext - set extent attributes on a file in a VxFS file system

SYNOPSIS

setext -e extent_size [ -r reservation ] [ -t vxfs ] [ -f flags ] filename

setext -r reservation [ -e extent_size ] [ -t vxfs ] [ -f flags ] filename

AVAILABILITY

VRTSvxfs

DESCRIPTION

setext specifies a fixed extent size for a file and reserves space for a file. The file must already exist.

You can specify multiple flags by entering multiple instances of -f on the command line.

You can only specify the allocation flags with either the -e or -r option.

For the -e or -r options, you can specify the size in number of file system blocks or in bytes. A numeric value specifies file system blocks, while a numeric value with a suffix specifies the size in blocks or bytes: b for 512-byte blocks, k for kilobytes, m for megabytes, g for gigabytes, or t for terabytes.

NOTES

The align and noextend allocation flags are persistent attributes of the file and therefore visible via getext or the VX_GETEXT ioctl. Although trim is not a persistent attribute of the file, it is visible until it is cleared during the final close of the file. Other allocation flags may have persistent effects, but are not visible as allocation flags.

In some cases, fsadm may reorganize the extent map of a file in such a way as to make it less contiguous. However, it does not change the geometry of a file that has a fixed extent size.

A basic license enables the setext command; setext does not require a full license.

OPTIONS

-e extent_size
  Specifies a fixed extent size. extent_size is either the number of file system blocks, or the size in bytes to allocate for the extent (see DESCRIPTION). A value of zero cancels any previous settings for fixed-size extents for the file and uses the default extent allocation policy. See the vxtunefs(1M) manual page for information on extent size parameters.
-f flags The available allocation flags are:
align Specifies that all extents must be aligned on extent_size boundaries relative to the start of allocation units.
chgsize Immediately incorporates the reservation into the file and updates the file’s inode with size and block count information that is increased to include the reserved space. The space added to the file is not initialized. Only users with root privileges can use the -f chgsize option.
contig Specifies that the reservation must be allocated contiguously.
growfile Specifies that the size of the file will be changed to include the reservation. This operation does not physically clear the file on-disk and therefore is very fast. Reads to the grown portion of the file, that is, the portion between the current size of the file and the size after this operation succeeds, will return zeroes. Writes to the grown portion will never fail with ENOSPC. This operation can be carried out by all users.
noextend Specifies that the file may not be extended after the preallocated space is used.
noreserve Specifies that the reservation is not a persistent attribute of the file. Instead, the space is allocated until the final close of the file, when space not used by the file is freed. The temporary reservation is not visible to the user (via getext or the VX_GETEXT ioctl, for example).
trim Specifies that the reservation is reduced to the current file size after the last close by all processes that have the file open.
-r reservation
  Preallocates space for a file. You can specify the reservation in number of file system blocks or the actual size in bytes (see DESCRIPTION).
Space reserved by the -r option is discarded if you compress the file. You cannot reserve new space for the file until you uncompress the file.
-t vxfs Specifies the VxFS file system type.

EXAMPLES

The following commands create a file named "abc" and preallocates 100 MB of disk space for the file:

# touch abc # setext -t vxfs -r 100M -f chgsize abc

SEE ALSO

getext(1), fsadm_vxfs(1), vxtunefs(1M), vxfsio(7) - particularly the section on VX_SETEXT


VxFS 7.4 setext(1)