Use the mkvolume command to create an empty volume from existing
storage pools. You can use this command for high
availability configurations that include HyperSwap, but it can also be
used for volumes that are not high availability.
Syntax
mkvolume [ name name ] -size disk_size [ -unit { b | kb | mb | gb | tb | pb } ] [ -iogrp { iogroup_id | iogroup_name } ] -pool { storage_pool_id | storage_pool_name } [ -cache { none | readonly | readwrite } ] [ { -thin | -compressed } [ -deduplicated ] ] [ -buffersize { buffer_size | buffer_percentage% } ] [ -warning { warning_capacity | warning_percentage% } ] [ -noautoexpand ] [ -grainsize { 32 | 64 | 128 | 256 } ] [ -udid udid ] -volumegroup { volumegroup_name | volumegroup_id }
Parameters
- -namename
- (Optional) Specifies the name that is used for the volume that is created. This value must
be an alphanumeric string 1 - 63 characters.
Remember: If you do not specify
-name, a unique default name such as volume1 is
used.
- -sizedisk_size
- (Required) Specifies the capacity of the volume, which is used with the value of the unit.
The default capacity is in MB. When the unit of bytes is used, all capacities must be in
multiples of 512 bytes. An entire extent is reserved even if it is only partially used.
- -unitb | kb | mb | gb | tb | pb
- (Optional) Specifies the data units to use with the capacity that is specified by the
-size parameter. The default unit type is mb.
- -iogrpiogroup_id_list | iogroup_name_list
- (Optional) Specifies the I/O group that the new volume is cached in. The value can be a
colon-separated list of up to two I/O group IDs or names. If no value is specified, the
caching I/O group is selected based on the storage pool site. If you do not specify the
-iogrp parameter, the caching I/O group is selected by the system.
Important: If two I/O groups are specified, they must be in different sites, and the
storage pools that are specified must be in different sites. The order of the sites must
correspond.
If you create a HyperSwap volume, the
caching I/O groups are selected based on the sites of the storage pools.
- -poolstorage_pool_id_list | storage_pool_name_list
- (Required) Specifies the storage pool in which to create the new volume. The value must be
a colon-separated list of up to two storage pool IDs or names.
Note: If one storage pool is
specified, a basic volume is created with one copy.
On systems with
standard topology, a mirrored volume can be created by specifying two
storage pools.
On systems with
a hyperswap topology, a highly available volume can be created by specifying
two storage pools in different sites.
- -cachenone | readonly | readwrite
- (Optional) Specifies the caching options for the volume. Use one of the following valid
entries:
- readwrite enables the cache for the volume (default).
- readonly disables write caching but allows read caching for a
volume.
- none disables the cache mode for the volume.
- -thin
- (Optional) Specifies that the volume is to be created with thin provisioning. You cannot
specify this parameter with -compressed. If you do not specify
-thin or -compressed, the volume that is created is
fully allocated.
- -compressed
- (Optional) Specifies that the volume is to be created compressed. If the
-iogrp parameter is not specified, the least used I/O group is used for
compressed copies (considering the subset of I/O groups that support compression).
Remember: This command fails if no I/O groups support compression. If two sites exist,
both sites must have at least one I/O group that supports compression.
You cannot
specify this parameter with -thin. If you do not specify
-thin or -compressed, the volume that is created
is fully allocated.
- -deduplicated
- (Optional) Creates a deduplicated volume. If you specify
-deduplicated, you must also specify -rsize because
it applies only to thin-provisioned or compressed volumes.
Note: Data deduplication works only
with data reduction storage pools. You can only create deduplicated volumes and volume copies
in an I/O group if there are no compressed volumes or volume copies in the storage
pools.
- -buffersizebuffer_size | buffer_percentage
- (Optional) Specifies the pool capacity the volume attempts to reserve as a buffer for
thin-provisioned and compressed volumes. You must specify either -thin or
-compressed with this parameter. The default value is
2%.
Note: You cannot specify a buffer size for
thin-provisioned or compressed volumes that are in data reduction
pools.
- -warningwarning_capacity | warning_percentage
- (Optional) Specifies a threshold at which a warning error log is generated for volumes. A
warning is generated when the used disk capacity on the thin-provisioned volume exceeds the
specified threshold. You must specify either -thin or
-compressed with this parameter. The default value is
80%.
- -noautoexpand
- (Optional) Specifies that the volume not automatically expand as it is written to. The
available buffer capacity decreases as the used capacity increases. The volume copy goes
offline if the buffer capacity is fully used. The buffer capacity can be increased by
specifying expandvdisksize -rsize. You must specify either
-thin or -compressed with this parameter. If you do
not specify -noautoexpand, the volume automatically expands as it is
written to.
- -grainsize32 | 64 | 128 | 256
- (Optional) Sets the grain size (KB) for a thin-provisioned volume. If you are using the
thin-provisioned volume in a FlashCopy map, use
the same grain size as the map grain size for best performance. If you are using the
thin-provisioned volume directly with a host system, use a small grain size. The grain size
value must be 32, 64, 128, or
256 KB. The default is 256 KB.
- -udidudid
- (Optional) Specifies the unit number udid for the volume.
Important: The udid is an identifier that is required to support
OpenVMS hosts (no other systems use this parameter).
Valid options are a decimal
number from 0 through 32767, or a hexadecimal number from
0 through 0x7FFF. A hexadecimal number must be preceded by
0x (for example, 0x1234).
- -volumegroupvolumegroup_name | volumegroup_id
- (Optional) Specifies the volume group that a volume belongs to. The value must be an
alphanumeric string for the volume group name and the value must be a number for the volume
group ID.
Description
This command creates an empty
volume, which is a formatted (zeroed) volume, by using storage from existing storage pools. You can also create a highly available volume on systems with
hyperswap topology.
If you create a thin-provisioned or compressed volume from a data reduction
storage pool, the properties of the storage pool are used for the new volume. You can create
fully allocated volumes from data reduction storage pools, but those volumes do not use the
storage pool properties.
On some node types, you can create a compressed volume copy in a data
reduction storage pool for an I/O group. A compressed volume copy in a data
reduction pool can only be created in an I/O group with V5030, V7000, or SVC node types.
You can create thin-provisioned volume copies on any node type. Volumes can also have fully
allocated volume copies in data reduction storage pools.
You cannot specify -noautoexpand when you create
thin-provisioned or compressed volume copies from a data reduction storage pool.
You cannot create a volume copy that is a thin-provisioned or compressed
volume in a data reduction storage pool, and the volume caching mode is none or
readonly. You must specify chvdisk to change the volume
caching mode to readwrite.
You cannot specify -warning for a thin-provisioned or
compressed volume copy in a data reduction storage pool.
You cannot specify -grainsize for thin-provisioned and
compressed volume copies in data reduction storage pools. This type of volume copy is created
with a size of 8 KB.
Thin-provisioned or compressed volume copies in data reduction pools cannot
be created if the data reduction storage pool is offline and requires recovery. If the recovery
is still in progress, you must wait until the recovery is complete and the pool is in
online state.
Compressed volumes/copies cannot be created if the
I/O group in which the copy is being created supports only software compression and:
- The I/O group already has Real-time compression copies and the copy is data reduction.
- The I/O group already has data reduction copies and the copy uses Real-time
compression.
Use the mkimagevolume command to create
a new volume by importing existing data on a managed disk.
Scenario 1
If the I/O group contains:
- At least one 8 GB node.
- At least one thin-provisioned or compressed volume in a data reduction
pool.
- And you try to set the FlashCopy bitmap size for that I/O group to at least 1.5 GB.
The command fails due to insufficient resources available.
Scenario 2
When a thin-provisioned or compressed volume
is created within a data reduction pool, the pool must have enough
capacity to create more volumes that track SCSI unmap operations from
the host. If this capacity is not available, the command fails.
Scenario 3
Volumes cannot be created in a data reduction
pool if offline thin-provisioned or compressed volumes exist in a
data reduction pool, either because of thin provisioning (out of space
or corruption), or a component underneath thin provisioning is holding
a volume in the pool offline.
An invocation example to create a volume in storage pool
0
mkvolume -pool 0 -size 1000
The detailed
resulting output:
Volume, id [0], successfully created.
An invocation example to create a
HyperSwap volume with
a hyperswap
topology
mkvolume -pool site1pool:site2pool -size 200
The
detailed resulting
output:
Volume, id [2], successfully created.
An invocation example to create a thin-provisioned volume from a data reduction storage
pool
mkvolume -pool datareductionpool2 -size 10 -unit gb -thin
The detailed resulting output:
Volume, id [6], successfully created.
An invocation example to create a deduplicated volume copy
mkvolume -pool datareductionpool0 -size 100 -unit gb -iogrp 0 -thin -deduplicated
The resulting output:
Virtual Disk, id [4], successfully created