Previous Topic: rename (Volume Management)--Rename an Application User VolumeNext Topic: copy (Volume Management)--Copy a Volume


resize (Volume Management)--Resize a Volume.

Resize a volume

Syntax
volume resize <name> size=<size> [parN.size=<val>] [--prefill]  
Options
<name>

Name of the existing volume to resize. The format of <name> is the following:

<application>:<volume>

application volume

<application>:<class>.<volume>

singleton class volume

_GLOBAL:<volume>

global volume

_GLOBAL_RO:<volume>

global read-only volume

size=<size>

New volume size, units may be specified (for example, 128M[B], 2G[B]). If units are not specified, it is assumed that the size is in MB.

parN.size=<val>

Specifies the size for partition N. The value can be absolute (that is, 20G) or relative (that is +10G). parN refers to a primary, extended or logical partition or an lvm logical volume.

For primary partitions, this can be specified as parN.size, for logical partitions, the syntax is parN.parM.size (N is the number of the extended partition, M is the number of the logical partition on it starting from 1).

For lvm logical volumes the syntax is parN.lv_name.size.

--prefill

Allocate ALL blocks for the resized volume.

Examples
volume resize my-app:data size=500M

resize an unpartitioned volume

volume resize my-app:MYSQL.boot size=1G

resize application singleton class volume

volume resize my-app:data par2.size=+2G

resize a partitioned volume, adding 2GB to the second partition

volume resize my-app:data size=10G

Resize a partitioned volume with one existing partition, to 10GB - the partition will be expanded/shrunk to the full size of the volume

volume resize my-app:data par3.par2.size=-3G

Resize a partitioned volume, shrinking second logical partition by 3GB, total size of volume will be adjusted accordingly

volume resize my-app:data size=10G par3.size=-1G

Resize a partitioned volume, changing partition 3 size but keeping the overall volume size (10GB) and leaving the freed space unallocated

volume resize my-app:data par2.size=+1G par3.size=-1G

Modify a partitioned volume by moving space (1GB) from partition 3 to partition 2

volume resize my-app:data par2.size=+1G

Resize a partitioned volume by adding additional space to an lvm partition without changing the size of logical volumes - this will leave unallocated space on the volume group which can be used for new logical volumes or/and snapshots

Notes: