vxfs_vol_add - add a volume to a multi-volume file system
cc -I /opt/VRTS/include -L /opt/VRTS/lib
-l vxfsutil -ldl
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);
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.
vxfs_vol_add() and vxfs_vol_add2() return zero on success, non-zero on failure.
The specified volume name is reserved.
One or more of the specified pointer arguments points to an illegal address.
The calling function issued a request with a file offset off past the EOF mark.
The specified size is not a multiple of the file system block size.
The maximum number of files are open on the system.
The specified volume does not exist.
There was not enough space to create the structural files to represent the new volume.
There is no license installed to allow this operation.
This operation is not supported by the disk layout version of the specified file system. Use vxupgrade(1m) to enable this operation.
The calling process does not have correct access privileges.
There is no such device or address.
The specified file system is mounted read-only.
Too many volumes were specified for the volume set.
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)