addvol(8) System Manager's Manual addvol(8)
NAME
addvol - Adds a volume to an existing file domain
SYNOPSIS
/usr/sbin/addvol [-F] [-x num_pages] [-p num_pages] special domain
OPTIONS
Ignores overlapping partition or block warnings. Sets the number of pages to preallocate for the bitfile metadata table (BMT). The
default is 0 (zero) pages. This option may be useful if you are adding volumes to file domains that were created prior to the release of
Version 5.0 or with the -V3 option of the mkfdmn command. Sets the number of pages by which the bitfile metadata table (BMT) extent size
grows. The value must be greater than or equal to 128 pages. The default is 128 pages. This option may be useful if you are adding volumes
to file domains that were created prior to the release of Version 5.0 or with the -V3 option of the mkfdmn command.
OPERANDS
Specifies the block device special device name, such as /dev/disk/dsk1c, or the LSM volume name of the disk that you are adding to the file
domain. Specifies the name of the AdvFS file domain.
DESCRIPTION
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. A partition overlap would occur if you could add
a volume to a domain when a partition in it is already in use by a file system, such as AdvFS or UFS; a storage manager, such as LSM or a
raw database; or a swap area. The overlap partition check prevents this error from occurring. The check is performed on partitions that
are active (open) and on partitions that are not active (yet marked in use).
If you try to add a volume that would cause active partitions to overlap, the volume is not added and a message similar to the following is
displayed: Error: /dev/rdisk/dsk1g or an overlapping partition is open. addvol: Can't add volume '/dev/rdisk/dsk1g' to domain 'proj_x'
If you try to add a volume that would cause inactive partitions to overlap, the volume is not added and a message similar to the following
is displayed. Subsequently, you can examine and change the disk label and then run the addvol utility to add the volume. Error: Parti-
tion(s) that overlap /dev/rdisk/dsk1g are marked in use. To edit an incorrect disklabel, use the -e option with disklabel;
for more information see the disklabel(8) reference page. addvol: Can't add volume '/dev/rdisk/dsk1g' to domain 'blegga'
Use the -F option to disable testing for overlap.
Caution
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.
File domains created prior to Version 5.0 or created with the -V3 option of the mkfdmn command that contain a very large number of files
may need added BMT mcells (similar to inodes in UFS). By default, AdvFS attempts to grow the BMT by 128 pages each time additional mcells
are needed. This may cause the metadata storage to become very fragmented, resulting in a premature "out of disk space" error.
You can reduce the amount of BMT metadata fragmentation for file domains created prior to Version 5.0 or created with the -V3 option of the
mkfdmn command either by preallocating space for the BMT or by increasing the number of pages that the system attempts to grow the BMT
each time space is needed. Use the -p option to preallocate all the BMT space you expect the file domain to need. Note that space that is
preallocated cannot be deallocated. Use the -x option to specify how many pages the BMT should be extended each time additional mcells are
needed.
The following table provides guidelines for BMT growth size in pages (-x option) and BMT preallocation (-p option). If your estimated num-
ber of files is greater than those listed in the table, keep doubling the last table entry until you get a value that is close to your
needs.
--------------------------------------------------------------------
Number of Files BMT Growth Size in pages BMT Preallocation
Size in pages
--------------------------------------------------------------------
Less than 50,000 default (128) 3,600
100,000 256 7,200
200,000 512 14,400
300,000 768 21,600
400,000 1024 28,800
800,000 2048 57,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.
RESTRICTIONS
You must be the root user to use this utility.
AdvFS does not support a multivolume root file system. You cannot use the addvol utility to expand root_domain. This does not apply to
cluster root domains.
ERRORS
Command execution continues after the following warnings are displayed: addvol: Invalid value for -x addvol: Setting to minimum value of
128
Explanation:
You have entered an invalid value for the -x option.
addvol: Invalid value for -p addvol: Setting to minimum value of 0.
Explanation:
You have entered an invalid value for the -p option.
EXAMPLES
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/disk/dsk1c 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
preallocated BMT and increased extent sizes to accommodate the large number of files. # mkfdmn -p 14400 -x 1024 /dev/disk/dsk1c
news_dmn # addvol -p 14400 -x 1024 /dev/disk/dsk2c news_dmn
FILES
Specifies the command path. Contains file domain names and devices.
SEE ALSO
Commands: advscan(8), disklabel(8), mkfdmn(8), rmvol(8)
Files: advfs(4), fdmns(4)
addvol(8)