addvol - Adds a volume to an existing domain
/usr/sbin/addvol [-F] [-x num_pages] [-p num_pages] special
domain
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 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 domains that were created
prior to the release of Version 5.0, or with the -V3
option of the mkfdmn command.
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 domain. This command supports shorthand
device names for block special devices. For example,
if you enter dsk2g, it will be translated to
/dev/disk/dsk2g. Specifies the name of the AdvFS domain.
A newly created domain consists of one volume which can be
a disk or a logical volume. The addvol utility enables you
to grow the number of volumes within an existing domain.
You can add volumes immediately after creating a 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.
Caution
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 tried to 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: Partition(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 domain does not affect the logical
structure of the filesets within the domain. You can add a
volume to an active domain while its filesets are mounted
and in use.
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 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 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 number 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 Preallocation
BMT Growth Size in pages 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.
This command supports shorthand names for LSM volume
names. For example, if you enter the following: # addvol
testdg.vol1 dom1
the volume name will be translated to: # addvol
/dev/vol/testdg/vol1 dom1
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.
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.
The following example adds a new volume to an active
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 domain for a news service
that will handle as many as 400,000 files. The
news_dmn 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
Specifies the command path. Contains domain names and
devices.
Commands: advscan(8), disklabel(8), mkfdmn(8), rmvol(8)
Files: advfs(4), fdmns(4)
addvol(8)
[ Back ] |