Symantec logo



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


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

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




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.


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.

Cluster File System Issues

You can invoke setext from any node in a cluster; the resulting effects are propagated to every node.


-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 NOTES). 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 vxfs

Specifies the VxFS file system type.

-f " flags"

The available allocation flags are:


Specifies that all extents must be aligned on extent_size boundaries relative to the start of allocation units.


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.


Specifies that the reservation must be allocated contiguously.


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.


Specifies that the file may not be extended after the preallocated space is used.


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


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


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

# touch abc

# setext -F vxfs -r 100M -f chgsize abc


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