test veritas logo


vxfs_vol_add(3)

NAME

vxfs_vol_add - add a volume to a multi-volume file system

SYNOPSIS

cc -I /opt/VRTS/include -L /opt/VRTS/lib
-l vxfsutil -ldl

#include <sys/types.h>

#include <vxfsutil.h>

int vxfs_vol_add(int fd, char *volname, uint64_t size);

int vxfs_vol_add2(int fd, char *volname, uint64_t size, uint64_t flags);

AVAILABILITY

VRTSvxfs

DESCRIPTION

The vxfs_vol_add() function adds the volume specified by volname to a multi-volume file system as free space. The fd argument is a file descriptor of any file in the target volume or file system. The size of the volume to use is specified by the size argument (in bytes). It is possible to use only a portion of the available space in the volume. The volume is added as a data-only volume, which allows only data allocations.

The vxfs_vol_add2() function is the same as the vxfs_vol_add() function, except that the volume flags can be explicitly specified. The flags argument can be 0, which indicates that the volume will be added as a metadata-eligible (metadataok) volume. Alternately, flags can be set to VX_VOLFLAG_DATAONLY, which indicates that the volume will be added as a data-only volume.

RETURN VALUES

vxfs_vol_add() and vxfs_vol_add2() return zero on success, non-zero on failure.

ERRORS

EEXIST The specified volume name is reserved.
EFAULT One or more of the specified pointer arguments points to an illegal address.
EFBIG The calling function issued a request with a file offset off past the EOF mark.
EINVAL The specified size is not a multiple of the file system block size.
ENFILE The maximum number of files are open on the system.
ENOENT The specified volume does not exist.
ENOSPC There was not enough space to create the structural files to represent the new volume.
ENOSYS There is no license installed to allow this operation.
ENOTSUP This operation is not supported by the disk layout version of the specified file system. Use vxupgrade(1m) to enable this operation.
EPERM The calling process does not have correct access privileges.
ENXIO There is no such device or address.
EROFS The specified file system is mounted read-only.
VX_ETOOMANYVOLS Too many volumes were specified for the volume set.

SEE ALSO

vxfs_ap_assign_ckpt(3), vxfs_ap_assign_file(3), vxfs_ap_assign_fs(3), vxfs_ap_define(3), vxfs_ap_remove(3), vxfs_ap_enforce_file(3), vxfs_ap_enumerate(3), vxfs_ap_query(3), vxfs_ap_query_ckpt(3), vxfs_ap_query_file(3), vxfs_ap_query_fs(3), vxfs_vol_clearflags(3), vxfs_vol_deencapsulate(3), vxfs_vol_encapsulate(3), vxfs_vol_enumerate(3), vxfs_vol_queryflags(3), vxfs_vol_remove(3), vxfs_vol_resize(3), vxfs_vol_setflags(3), vxfs_vol_stat(3)


VxFS 8.0 vxfs_vol_add(3)