rmvol(8)rmvol(8)NAMErmvol - Removes a volume from an existing domain
/usr/sbin/rmvol [-f] [-s] [-v] special... domain
Forces the removal of a volume that contains one or more stripe seg‐
ments without first requesting confirmation. Performs a free-space
check before beginning rmvol operations. If calculations determine that
not enough free space will be available for the complete migration of
all data for all volumes requested for removal, rmvol will fail before
migrating any data. Upon failure, the amount of free space needed for
complete migration of all data is displayed. Displays messages that
describe which files are moved off the specified volume. Using this
option slows the rmvol process.
Specifies the block device special file name, such as /dev/disk/dsk2c,
of the volume that you are removing from the domain. This command sup‐
ports 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 domain.
The rmvol utility enables you to decrease the number of volumes within
an existing domain. When you attempt to remove a volume, the file sys‐
tem automatically migrates the contents of that volume to another vol‐
ume in the domain.
The logical structure of the filesets in a domain is unaffected when
you remove a volume. If you remove a volume that contains a stripe seg‐
ment, the rmvol utility moves the segment to another volume that does
not already contain a stripe segment of the same file. If a file is
striped across all volumes in the domain, the utility requests confir‐
mation before placing a second stripe segment on a volume that has one.
Before you can remove a volume from a domain, all filesets in the
domain must be mounted. If you try to remove a volume from an active
domain that includes unmounted filesets, the system displays an error
message indicating that a fileset is unmounted. This message is
repeated until you mount all filesets in the domain.
If you attempt to remove a volume from an inactive domain, the system
returns the ENO_SUCH_DOMAIN error message. A domain is inactive when
none of its filesets are mounted. In this case, the rmvol command does
not remove the volume.
The rmvol command allows you to remove multiple volumes at one time.
When you remove multiple volumes with one command, the file system
automatically migrates the contents of each volume, one volume at a
time, to another volume in the domain. The file system does the follow‐
ing: Migrates data only to volumes that will continue to exist after
the completed execution of the rmvol command. Prevents running appli‐
cations from placing new files onto disks marked for removal.
The rmvol utility will move as many files as possible to free space on
the remaining volumes until no space is available, at which point a
message indicating the lack of space is sent to standard output. Files
that were not moved remain on their original volume. Volume removal is
processed in the order in which volumes were specified on the command
The -s option causes rmvol to perform a free space check before opera‐
tions start, in order to ensure that enough room is available to
migrate the contents of all volumes being requested for removal. The
rmvol utility will immediately exit and return an error if inadequate
free space is available on other volumes in the domain to accept the
offloaded files from the departing volumes.
If any of the volumes specified are not in the stated domain, the com‐
mand will fail and no volumes will be removed.
You can interrupt the rmvol process without damaging your domain. AdvFS
will stop removing files from the volume. Files already removed from
the volume will remain in their new location. Interrupting an rmvol
operation with a system crash, a power failure, loosing the remote
login, or the kill command can leave the volume in an inaccessible
state. If a volume does not allow new allocations after an rmvol opera‐
tion, use the chvol -A command to reactivate the volume.
The rmvol utility has the following restrictions: You must be the root
user to use this utility. You cannot run the rmvol utility while the
defragment, balance, rmfset, or rmvol utility is running on the same
domain. You cannot remove all volumes in the domain. At least one
volume must remain. All volumes to be removed must be within the
This command supports shorthand names for LSM volume names. For exam‐
ple, if you enter the following: # rmvol testdg.vol1 dom1
the volume name will be translated to: # rmvol /dev/vol/testdg/vol1
The following example removes a volume from an active domain called
accounts_dmn. The domain contains two volumes, /dev/disk/dsk1c and
/dev/disk/dsk2c. This example removes volume /dev/disk/dsk1c from the
domain: # rmvol dsk1c accounts_dmn
The /etc/fdmns/accounts_dmn subdirectory now has only one entry,
the entry for /dev/disk/dsk2c. The following example removes
one volume from a three-volume domain. Each volume in the
accounts_dmn domain contains one segment of /usr/myfile, which
is a three-way striped file: # rmvol dsk3c accounts_dmn
rmvol: Removing volume '/dev/disk/dsk3c' from domain
This volume contains one stripe segment of /usr/myfile, which
will be moved to another volume in the domain that already con‐
tains a stripe segment of /usr/myfile.
Do you want to continue? (y/n):y
One volume in the accounts_dmn domain now contains two stripe
segments of myfile, which is no longer an optimally striped
file. The following example removes three volumes from a
domain: # rmvol dsk5b dsk3a dsk4a rmvol_dmn1
rmvol: Removing 3 volume(s) from domain 'rmvol_dmn1'
rmvol: Removing volume '/dev/disk/dsk5b' from domain
rmvol: Removed volume '/dev/disk/dsk5b' from domain
rmvol: Removing volume '/dev/disk/dsk3a' from domain
rmvol: Removed volume '/dev/disk/dsk3a' from domain
rmvol: Removing volume '/dev/disk/dsk4a' from domain
rmvol: Removed volume '/dev/disk/dsk4a' from domain
rmvol: Removed 3 volume(s) from domain 'rmvol_dmn1' The follow‐
ing example attempts to remove volumes when not enough free
space is available to migrate all data: # rmvol /dev/disk/dsk1c
/dev/disk/dsk2d test_dmn rmvol: Removing 2 volume(s) from domain
'rmvol_dmn1' rmvol: Removing volume '/dev/disk/dsk1c' from
domain 'test_dmn' rmvol: Removed volume '/dev/disk/dsk1c' from
domain 'test_dmn' rmvol: Removing volume '/dev/disk/dsk2d' from
domain 'test_dmn' rmvol: Ran out of free space to migrate data
off volume rmvol: Can't move file /rmvol_fset1/file18 metadata
rmvol: Can't remove volume '/dev/disk/dsk2d' from domain
'rmvol_dmn1' rmvol: Can't remove 1 volume(s) from domain
'rmvol_dmn1' The following example specifies the -s option in an
attempt to remove volumes when not enough free space is avail‐
able to migrate all data: # rmvol-s dsk1a dsk3b test
rmvol: Removing 2 volume(s) from domain 'test'
rmvol: Not enough free space for complete migration of all vol‐
requested for removal.
Free space needed: 65592K
Free space available: 46296K
rmvol: Can't remove 2 volume(s) from domain 'test'
Specifies the command path. Contains domain names and devices.
SEE ALSOaddvol(8), advfs(4), advscan(8), chvol(8), fdmns(4), mkfdmn(8),