mkvolume
Use the mkvolume command to create an empty volume from existing storage pools.
If you are creating volumes in a pool that uses a provisioning policy, the volume is created with the default values and capacity saving characteristics that are defined in the provisioning policy. Any volume that is created in a pool with a provisioning policy adopts those values and alternative values cannot be specified with the mkvolume command. For pools with a provisioning policy, the mkvolume command parameters are simplified.
Syntax
Parameters
- Parameters with a provisioning policy
-
- -name name
- (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. - -size disk_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.
- -unit b | 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.
- -iogrp iogroup_id | iogroup_name
- (Optional) Specifies the I/O group that the new volume is cached in. If no value is specified, the caching I/O group is selected by the system based on the storage pool site.
- -preferrednode node_id | node_name
- (Optional) Specifies the preferred node that is used to access the volume.
- -pool storage_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. - -volumegroup volumegroup_name | volumegroup_id
- (Optional) Specifies the volume group that the volume should be added to.
- Parameters without a provisioning policy
-
- -name name
- (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. - -size disk_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.
- -unit b | 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.
- -iogrp iogroup_id | iogroup_name
- (Optional) Specifies the I/O group that the new volume is cached in. If no value is specified, the caching I/O group is selected by the system based on the storage pool site.
- -preferrednode node_id | node_name
- (Optional) Specifies the preferred node that is used to access the volume.
- -pool storage_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. - -cache none | 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 standard-provisioned.
- -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.You cannot specify this parameter with -thin. If you do not specify -thin or -compressed, the volume that is created is standard-provisioned.
- -deduplicated
- (Optional) Creates a deduplicated volume. If you specify -deduplicated, you
must also specify -thin or -compressed 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 regular storage pools.
- -buffersize buffer_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%
. If you are adding a volume to a pool that uses a provisioning policy, this parameter uses the default of2%
.Note: You cannot specify a buffer size for thin-provisioned or compressed volumes that are in data reduction pools. - -warning warning_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 will 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. - -grainsize 32 | 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
, or256
KB. The default is256
KB. - -udid udid
- (Optional) Deprecated.
- -volumegroup volumegroup_name | volumegroup_id
- (Optional) Specifies the volume group that a volume belongs to. The value must be either an alphanumeric string for the volume group name or a number for the volume group ID.
- Parameters using existing snapshot
-
- -type thinclone | clone
- (Required) Specifies the type of volume to create. Volume can be thinclone or clone type.
- -pool storage_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. - -fromsourcevolume volume_id | volume_name
- (Required) Specifies the image of the volume ID or name in the snapshot used to pre-populate the new volume.
- -fromsnapshotid snapshotid
- (Required) Specifies the ID for the snapshot used to pre-populate the new volume.
- -snapshot snapshot_name
- (Optional) Specifies the snapshot name used to pre-populate the new volume.
- -fromsourcegroup volume_group_id_or_name
- (Optional) Specifies the parent volume group ID or name of the snapshot to use to pre-populate the new volume.
- -fromsourceuid parent_uid
-
(Optional) Specifies the UID used to identify the parent volumes of the snapshot to use to pre-populate the new volume.
Common parameters
- -iogrp iogroup_id | iogroup_name
- (Optional) Specifies the I/O group that the new volume is cached in. If no value is specified, the caching I/O group is selected by the system based on the storage pool site.
- -preferrednode node_id | node_name
- (Optional) Specifies the preferred node that is used to access the volume.
- -volumegroup volumegroup_name | volumegroup_id
- (Optional) Specifies the volume group that a volume belongs to. The value must be either an alphanumeric string for the volume group name or a number for the volume group ID.
- -name name
- (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. - -cache none | 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.
- -udid udid
- (Optional) Specifies the unit number
udid
for the volume.Important: TheValid options are a decimal number fromudid
is an identifier that is required to support OpenVMS hosts (no other systems use this parameter).0
through32767
, or a hexadecimal number from0
through0x7FFF
. A hexadecimal number must be preceded by0x
(for example,0x1234
). - -unit b | 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.
- -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 standard-provisioned.
- -grainsize 32 | 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
, or256
KB. The default is256
KB. - -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.You cannot specify this parameter with -thin. If you do not specify -thin or -compressed, the volume that is created is standard-provisioned.
- -warning warning_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%
. - -deduplicated
- (Optional) Creates a deduplicated volume. If you specify -deduplicated, you
must also specify -thin or -compressed 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 regular storage pools.
- -noautoexpand
- (Optional) Specifies that the volume will 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. - -buffersize buffer_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%
. If you are adding a volume to a pool that uses a provisioning policy, this parameter uses the default of2%
.Note: You cannot specify a buffer size for thin-provisioned or compressed volumes that are in data reduction pools.
Description
This command creates an empty volume, which is a formatted (zeroed) volume, by using storage from existing storage pools. If the storage pool uses a provisioning policy, the volume that is created uses the capacity saving methods and default values that are defined in the provisioning policy. You do not have to define capacity savings at the volume level, making the process of creating volumes more efficient and faster. If you specify values when the pool is assigned to a provisioning policy, the mkvolume command fails. However, if you are using pools without provisioning policies, you still create volumes by specifying these values in the command. Provisioning policies are supported on standard and data reduction pools and child pools adopt the provisioning policy of the parent pool. Data reduction pools can be created with or without a provisioning policy. Data reduction pools use built-in capacity savings methods. For data reduction pools with or without provisioning policies, use the following information:
- 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 standard-provisioned 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. You can create thin-provisioned volume copies on any node type. Volumes can also have standard-provisioned volume copies in data reduction storage pools. A compressed volume copy in a data reduction pool can only be created in an I/O group with sufficient memory.
- 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
orreadonly
. You must specify chvdisk to change the volume caching mode toreadwrite
. - 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.
- The volume has zero size.
- The ownership group of the storage pool for the volume does not match the ownership group for the volume group.
Use the mkimagevolume command to create a new volume by importing existing data on a managed disk.
If a volume type is specified, the user must also provide a source volume with -fromsourcevolume parameter. They must also provide a snapshot using either the -fromsnapshotid parameter or the -snapshot parameter along with a -fromsourcegroup or -fromsourceuid parameter.
- -iogrp
- -preferrednode
- -volumegroup
- -name
- -cache
- -buffersize
- -warning
- -noautoexpand
- -grainsize
- -thin
- -compressed
- -deduplicated
- -unit
- -size
- -skipinitialization
- -remotevolume1
Creating a volume in a volume group associated with a storage partition
- cache disabled volume being created
- zero sized volume
- volume with a copy in a standard pool and a copy in a data reduction pool
When a storage partition has an HA replication policy, it is mandatory for the pool of each volume copy to be linked to all the remote systems specified in the replication policy.
- If the partition has HA established and there is management access to the remote system, the command will succeed and the change will be applied to both systems.
- If the partition has HA established and there is no management access to the remote system then the command will fail.
- If the partition does not have HA established then the local volume create will succeed and the configuration change will be applied to the remote system asynchronously as part of re-establishing HA.
Creating a volume in a volume group associated with a storage partition with an HA replication policy is only permitted for the user on the active management system.
Invocation examples with a provisioning policy
- An invocation example of any volume
-
mkvolume -pool 0 -size 1000
The detailed resulting output:
Volume, id [1], successfully created.
Invocation examples without a provisioning policy
- 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 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
-
svctask mkvolume -type thinclone -fromsourcevolume sourceVolA -fromsourcegroup sourceGroupA -snapshot noon
The detailed resulting output:
Volume, id [x], successfully created.