addvol - Adds a volume to an existing file domain
/usr/sbin/addvol [-F ] [-x num_pages]
[-p num_pages] special domain
Specifies the block device special file name, such as /dev/rz2c, of the disk that you are adding to the file domain. Specifies the name of the AdvFS file domain.
The flags -x num_pages and -p num_pages will be retired in a future release of the operating system. Users should plan to migrate away from the use of these flags. The use of these flags was necessary in versions of DIGITAL UNIX older than version 4.0E to manipulate contiguous storage for bitfile metadata table (BMT) operations. In DIGITAL UNIX Version 4.0E or later, storage for BMT operations is managed internally by the operating system.
Ignores overlapping partition or block warnings. Sets the number of pages by which the bitfile metadata table (BMT) extent size grows. The default is 128 pages. Sets the number of pages to preallocate for the BMT. The default is 0 (zero) pages.
A newly created file domain consists of one volume, which can be a disk or a logical volume. The addvol utility enables you to increase the number of volumes within an existing file domain. You can add volumes immediately after creating a file domain, or you can wait until the filesets within the domain require additional space.
For optimum performance, each volume that you add should consist of the entire disk (typically, partition c). Existing data on the volume you add is destroyed during the addvol procedure. Do not add a volume containing data that you want to keep.
The addvol command checks for potential overlapping partitions before adding the volume. If you try to add a volume that would cause partitions to overlap with any other file systems, including Logical Storage Manager (LSM), UNIX file system (UFS), and AdvFS, or that would overlap with blocks that are currently in use, the following message is displayed and the volume is not added:
/dev/rrz1g or an overlapping partition is open. Quitting .... addvol: Can't add volume '/dev/rz1g' to domain 'proj_x'
If you try to add a volume that would cause partitions to overlap with other file systems, but none of the partitions are currently in use, the following message will display. You can choose to continue with the procedure or stop.
Partition(s) which overlap /dev/rrz1g are marked in use. If you continue with the operation you can possibly destroy existing data. CONTINUE? [Y/N]
Use the -F flag to disable testing for overlap.
Disabling the overlap check can result in extensive data loss and should be used with extreme caution.
Adding volumes to a file domain does not affect the logical structure of the filesets within the file domain. You can add a volume to an active file domain while its filesets are mounted and in use. While up to 250 volumes per domain are allowed, limiting the number of volumes to 3 decreases the risk of disk errors that can cause the entire domain to become inaccessible.
Although you can use the advscan command to re-create a file domain, it is good practice to maintain a hardcopy record of each volume you have. You must have the names of all the volumes in the domain to manually re-create the /etc/fdmns directory.
Systems with domains that contain very large numbers of files can use more metadata extents (similar to inodes in UFS) than normal. By default, AdvFS attempts to grow the bitmap metadata table (BMT) by 128 pages each time additional metadata extents are needed. Frequent requests by the system to increase the BMT causes the metadata to become very fragmented, which can result in an out of disk space error when there is actually space available.
You can reduce the amount of metadata fragmentation in one of two ways: by preallocating all of the space for the BMT when the volume is added or by increasing the number of pages that the system attempts to grow the metadata table each time more space is needed.
To preallocate all of the BMT space that you expect the file domain to need, use the mkfdmn command with the -p flag set to specify the number of pages to preallocate. Space that is preallocated to the BMT cannot be deallocated Do not preallocate excessive space for the BMT. The table below provides BMT page number estimates for numbers of files.
To set the BMT to grow by more than 128 pages each time additional metadata extents are needed, use the addvol command with the -x flag set to specify a number of pages greater than 128. You can increase the number of pages to any value; the table below shows suggested guidelines.
|Number of Files||Extent Size (pages)||Metadata Table Size (pages)|
|Less than 50,000||default (128)||3,600|
To get the maximum benefit from increasing the number of metadata table extent pages, use the same number of pages when adding a volume with the addvol command as was assigned when the domain was created with the mkfdmn command.
You cannot exceed 250 volumes per file domain. Also, you must have root-user privilege to access this utility.
AdvFS does not support a multivolume root file system. You cannot use the addvol utility to expand root_domain.
You must register the Advanced File System Advanced Utilities license to use this utility.
The following example adds a new volume to an active file domain called accounts_dmn. After the new volume is added, the balance command is run to even the distribution of files over all of the volumes in the domain.
# addvol /dev/rz1c accounts_dmn # balance accounts_dmn
The /etc/fdmns/accounts_dmn subdirectory now includes new entries for two volumes.
The following example sets up a file domain for a news service that will handle as many as 400,000 files. The news_dmn file domain will contain two volumes that are configured with increased extent sizes to accommodate the large number of files.
# mkfdmn -x 1024 /dev/rz1c news_dmn # addvol -x 1024 /dev/rz2c news_dmn
Specifies the command path. Contains file domain names and devices.
advfs(4), advscan(8), disklabel(8), fdmns(4), mkfdmn(8).