The following modifiers are used with the vxassist
command to resize a volume:
growto
Increase volume to a specified length.
growby
Increase volume by a specified amount.
shrinkto
Reduce volume to a specified length.
shrinkby
Reduce volume by a specified amount.
Caution
You cannot grow or shrink any volume associated with an encapsulated root disk (rootvol
, usr
, var
, opt
, swapvol
, and so on) because these map to a physical underlying partition on the disk and must be contiguous. If you attempt to grow rootvol
, usrvol
, varvol
, or swapvol
, the system could become unbootable if you need to revert back to booting from slices. It can also prevent a successful Solaris upgrade and you might have to do a fresh install. Additionally, the upgrade_start
script might fail.
To extend a volume to a specific length, use the following command:
# vxassist [-b] [-g
diskgroup
] growto
volume
length
Note
If specified, the -b
option makes growing the volume a background task.
For example, to extend volcat
to 2000 sectors, use the following command:
# vxassist -g mydg growto volcat 2000
Note
If you previously performed a relayout on the volume, additionally specify the attribute layout=nodiskalign
to the growto
command if you want the subdisks to be grown using contiguous disk space.
To extend a volume by a specific length, use the following command:
# vxassist [-b] [-g
diskgroup
] growby
volume
length
Note
If specified, the -b
option makes growing the volume a background task.
For example, to extend volcat
by 100 sectors, use the following command:
# vxassist -g mydg growby volcat 100
Note
If you previously performed a relayout on the volume, additionally specify the attribute layout=nodiskalign
to the growby
command if you want the subdisks to be grown using contiguous disk space.
To shrink a volume to a specific length, use the following command:
# vxassist [-g
diskgroup
] shrinkto
volume
length
For example, to shrink volcat
to 1300 sectors, use the following command:
# vxassist -g mydg shrinkto volcat 1300
Caution
Do not shrink the volume below the current size of the file system or database using the volume. The vxassist
shrinkto
command can be safely used on empty volumes.
To shrink a volume by a specific length, use the following command:
# vxassist [-g
diskgroup
] shrinkby
volume
length
For example, to shrink volcat
by 300 sectors, use the following command:
# vxassist -g mydg shrinkby volcat 300
Caution
Do not shrink the volume below the current size of the file system or database using the volume. The vxassist
shrinkby
command can be safely used on empty volumes.