mkvolume

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

Read syntax diagramSkip visual syntax diagram mkvolume namename -size disk_size -unitbkbmbgbtbpb -pool storage_pool_idstorage_pool_name -cachenonereadonlyreadwrite-thin-compressed-deduplicated-buffersizebuffer_sizebuffer_percentage -warning warning_capacitywarning_percentage-noautoexpand-grainsize3264128256-udidudid-iogrpiogroup_idiogroup_name-volumegroupvolumegroup_namevolumegroup_id

Parameters

-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_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.

-preferrednode node_id | node_name
(Optional) Specifies the preferred node that is used to access the volume. Ther
Note: The -preferrednode parameter can only be specified when a single I/O group is specified in the -iogrp parameter.
-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.

On systems with a hyperswap topology, a highly available volume can be created by specifying two storage pools in different sites.

-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. 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 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%.
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 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, or 256 KB. The default is 256 KB.
-udid udid
(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).
-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.

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 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. For more information on data reduction pool planning, see Planning for data reduction pools and deduplicated volumes.
  • 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.
  • The mkvolume command is used for HyperSwap systems and as part of the command automatically creates a base volume and corresponding change volumes that synchronize changes between the two sites. If your HyperSwap system supports FlashCore and the base volume is standard-provisioned in a data reduction pool, then the corresponding change volume is created with compression enabled. If the base volume is in a standard pool, then the change volume is created as a thin-provisioned volume.

Use the mkimagevolume command to create a new volume by importing existing data on a managed disk.

Failure Scenarios

The following failure scenarios can occur when the command fails:

Scenario 1:

The command fails because of insufficient resources if the I/O group contains any of the following elements:
  • At least one 8 GiB node.
  • At least one thin-provisioned or compressed volume in a data reduction pool.
  • A FlashCopy bitmap size for I/O group exceeds 1.5 GiB.

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 (an out-of-space or data corruption issue), or a component that is associated with the thin provisioning keeping a pool volume offline.

Invocation examples

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 1 -unit tb

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:
Volume, id [4], successfully created