mkvdisk
Use the mkvdisk command to create sequential, striped, or image mode volume objects. When they are mapped to a host object, these objects are seen as disk drives with which the host can run I/O operations. Note that the first syntax diagrams below is for striped or sequential volumes and the second syntax diagram is for image mode volumes. Use the mkvolume command for a simplified way of creating high availability volumes. Use the mkimagevolume command for a simplified way of creating an image mode volume, importing existing data from a managed disk.
Syntax
>>- mkvdisk -- -mdiskgrp --+-mdisk_group_id_list---+------------> '-mdisk_group_name_list-' >--+---------------------+--+-----------------------+-----------> '- -udid --vdisk_udid-' '- -vtype --+-striped-+-' '-seq-----' >--+-----------------------------+--+--------------------+------> '- -iogrp --+-io_group_id---+-' '- -size --disk_size-' '-io_group_name-' >--+-------------------------------------+--+------------+------> '- -accessiogrp --+-iogrp_id_list---+-' '- -fmtdisk -' '-iogrp_name_list-' >--+--------------+---------------------------------------------> '- -nofmtdisk -' >--+----------------------------------------------------------------------------------------------------------------------------+--> '- -rsize --+-disk_size-------------+--+--------------------------------------+--+---------------+--+----------------------+-' +-disk_size_percentage%-+ '- -warning -+-disk_size-------------+-' '- -autoexpand -' | .-32--. | '-auto------------------' '-disk_size_percentage%-' '- -grainsize -+-64--+-' +-128-+ '-256-' >--+---------------+--------------------------------------------> '- -compressed -' >--+---------------------------------------------------------------------+--> '- -copies --num_copies--+---------------+--+-----------------------+-' '- -createsync -' '- -syncrate --syncrate-' >--+------------------------------------------+-----------------> '- -mirrorwritepriority --+- latency ----+-' '- redundancy -' >--+-------------------------------+----------------------------> '- -mdisk --+-mdisk_id_list---+-' '-mdisk_name_list-' >--+------------------------+--+-----------------+--------------> '- -node --+-node_name-+-' | .-mb-. | '-node_id---' '- -unit --+-b--+-' +-kb-+ +-gb-+ +-tb-+ '-pb-' >--+-----------------------+--+-------------------------+-------> '- -name --new_name_arg-' | .-readwrite-. | '- -cache --+-readonly--+-' '-none------' >--+---------------------------+--+------------------------+--->< '- -tier --+- ssd --------+-' '- -easytier --+- on --+-' +- enterprise -+ '- off -' '- nearline ---'
>>- mkvdisk -- -mdiskgrp --+-mdisk_group_id---+-----------------> '-mdisk_group_name-' >-- -vtype --image-- -mdisk --+-mdisk_id_list---+---------------> '-mdisk_name_list-' >--+-----------------------------+--+--------------------+------> '- -iogrp --+-io_group_id---+-' '- -size --disk_size-' '-io_group_name-' >--+-------------------------------------+--+------------+------> '- -accessiogrp --+-iogrp_id_list---+-' '- -fmtdisk -' '-iogrp_name_list-' >--+--------------+---------------------------------------------> '- -nofmtdisk -' >--+----------------------------------------------------------------------------------------------------------------------------+--> '- -rsize --+-disk_size-------------+--+--------------------------------------+--+---------------+--+----------------------+-' +-disk_size_percentage%-+ '- -warning -+-disk_size-------------+-' '- -autoexpand -' | .-32--. | '-auto------------------' '-disk_size_percentage%-' '- -grainsize -+-64--+-' +-128-+ '-256-' >--+-----------+------------------------------------------------> '- -import -' >--+---------------------------------------------------------------------+--> '- -copies --num_copies--+---------------+--+-----------------------+-' '- -createsync -' '- -syncrate --syncrate-' >--+------------------------------------------+-----------------> '- -mirrorwritepriority --+- latency ----+-' '- redundancy -' >--+----------------------+--+------------------------+---------> '- -udid --vdisk_udid-' '- -node --+-node_name-+-' '-node_id---' >--+-----------------+--+-----------------------+---------------> | .-mb-. | '- -name --new_name_arg-' '- -unit --+-b--+-' +-kb-+ +-gb-+ +-tb-+ '-pb-' >--+-------------------------+--+------------------------+----->< | .-readwrite-. | '- -easytier --+- on --+-' '- -cache --+-readonly--+-' '- off -' '-none------'
Parameters
- (Required) Specifies one or more storage pools to use when you are creating this volume. If you are creating multiple copies, you must specify one storage pool per copy. The primary copy is allocated from the first storage pool in the list.
- (Optional) Specifies the I/O group (node pair) with which to
associate this volume. If you specify -node, you must also specify
-iogrp.Remember:
- Create the first compressed volume copy for an I/O group to activate compression.
- You cannot create or move a volume copy that is compressed to an I/O group that contains at least one node that does not support compressed volumes. You must select another I/O group to move the volume copy to (but this does not affect moving to the recovery I/O group).
- (Optional) Specifies the members of the volume I/O group access set. If this option is not specified, only the caching I/O group is added to the volume I/O group access set. If any access I/O groups are specified, only those I/O groups are in the access set (including if that set does not include the caching I/O group).
- (Optional) Specifies the unit number (udid for the disk. The udid is an identifier that is required to support OpenVMS hosts; no other systems use this parameter. Valid options are a decimal number 0 - 32 767, or a hexadecimal number 0 - 0x7FFF. A hexadecimal number must be preceded by 0x (for example, 0x1234).
- (Required for sequential or striped volume creation) (Optional for image volume creation) Specifies the capacity of the volume, which is used with the value of the unit. All capacities, including changes, must be in multiples of 512 bytes. An error occurs if you specify a capacity that is not a multiple of 512. This can only happen when byte units (-b) are used. However, an entire extent is reserved even if it is only partially used. The default capacity is in MB. You can specify a capacity of 0. Specify the size in bytes in multiples of logical block address (LBA) sizes.
- Note: If you do not specify the -size parameter when you create an image mode disk, the entire MDisk capacity is used.
- (Optional) Defines how much physical space is initially allocated to the thin-provisioned or compressed volume. This parameter makes the volume thin-provisioned; otherwise, the volume is fully-allocated. Specify the disk_size | disk_size_percentage value by using an integer, or an integer immediately followed by the percent character (%). Specify the units for a disk_size integer by using the -unit parameter; the default is MB. The -rsize value can be greater than, equal to, or less than the size of the volume. The auto option creates a volume copy that uses the entire size of the MDisk; if you specify the -rsize auto option, you must also specify the -vtype image option.
- (Optional) Specifies that the volume be formatted. This parameter is no longer required for any
volumes.This parameter is not required when creating fully-allocated volumes. The format operation is automatically applied to fully-allocated volumes unless you specify -nofmtdisk parameter. The format operation sets the extents that make up this volume to all zeros after it is created. This process takes place in the background concurrently with host I/O operations on the new volume.Remember: Formatting is on by default for single copy, fully-allocated, and non-image mode volumes. You cannot format an image mode volume.
The format operation completes asynchronously. You can query the status by using the lsvdiskprogress command. You cannot specify this parameter with the -vtype image parameter.
This parameter is not required when you create thin-provisioned volumes. Thin-provisioned volumes return zeros for extents that are not written to. No format operation is required. This parameter also synchronizes mirrored copies by default.
- (Optional) Specifies that formatting be turned off for the new volume.Remember: Formatting is on by default for single copy, fully-allocated, and non-image mode volumes, and you can specify this parameter to turn it off.
- (Optional) Enables compression for the volume. This parameter must be specified with -rsize and cannot be specified with -grainsize.
- (Optional) Requires that the -rsize parameter also be specified. Specifies
a threshold at which a warning error log is generated for volume copies. A warning is generated when
the used disk capacity on the thin-provisioned copy first exceeds the specified threshold. You can
specify a disk_size integer, which defaults to MBs unless the
-unit parameter is specified; or you can specify a
disk_size%, which is a percentage of the volume size. Important: If -autoexpand is:To disable warnings, specify 0.
- Enabled, the default value for -warning is 80% of the volume capacity.
- Not enabled, the default value for -warning is 80% of the real capacity.
- (Optional) Specifies that thin-provisioned copies automatically expand their real capacities by
allocating new extents from their storage pool. Requires that the -rsize
parameter also be specified. If the -autoexpand parameter is specified, the
-rsize parameter specifies a capacity that is reserved by the copy. This
protects the copy from going offline when its storage pool runs out of space by having the
storage pool to consume this reserved space first.
The parameter has no immediate effect on image mode copies. However, if the image mode copy is later migrated to managed mode, the copy is then automatically expanded.
- (Optional) Sets the grain size (KB) for a thin-provisioned volume. This parameter also requires that the -rsize parameter be specified. 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.
- (Optional) Imports a thin-provisioned volume from the MDisk. This parameter also requires that the -rsize parameter be specified.
- (Optional) Specifies the number of copies to create. The num_copies value can be 1 or 2. Setting the value to 2 creates a mirrored volume. The default value is 1.
- (Optional) Specifies the copy synchronization rate. A value of zero (0) prevents synchronization. The default value is 50. See Table 1 for the supported -syncrate values and their corresponding rates. Use this parameter to alter the rate at which the fully-allocated volume or mirrored volume format before synchronization.
- (Optional) Creates copies in sync. Use this parameter if you have already formatted the MDisks, or when read stability to unwritten areas of the volume is not required.
- (Optional) Specifies how to configure the mirror write algorithm priority. If not specified, the
default value is latency.
- Choosing latency means a copy that is slow to respond to a write input/output (I/O) becomes unsynchronized, and the write I/O completes if the other copy successfully writes the data.
- Choosing redundancy means a copy that is slow to respond to a write I/O synchronizes completion of the write I/O with the completion of the slower I/O to maintain synchronization.
- (Optional) Specifies the virtualization type. When creating sequential or image mode volumes, you must also specify the -mdisk parameter. The default virtualization type is striped.
- (Optional) Specifies the preferred node ID or the name for I/O operations to this volume. You
can use the -node parameter to specify the preferred access node. If you specify -node,
you must also specify -iogrp.Note: This parameter is required for the subsystem device driver (SDD). The system chooses a default if you do not supply this parameter.
- (Optional) Specifies the data units to use in conjunction with the capacity that is specified by the -size and -rsize parameters. The default unit type is MB.
- (Optional) Specifies one or more managed disks. For sequential and image mode volumes, the
number of MDisks must match the number of copies. For sequential mode volumes, each MDisk must
belong to the specified storage pool. For striped volumes, you cannot specify the
-mdisk parameter if the -copies value is greater than 1.
When creating a single copy striped volume, you can specify a list of MDisks to stripe across.
You must use this parameter to specify an MDisk that has a mode of unmanaged.
- (Optional) Specifies a name to assign to the new volume.
- (Optional) Specifies the caching options for the volume. Valid entries are:
- readwrite enables the cache for the volume
- readonly disables write caching while allowing read caching for a volume
- none disables the cache mode for the volume
The default is readwrite.Remember: If you do not specify the -cache parameter, the default value (readwrite) is used. - (Optional) Specifies the MDisk tier when an image mode copy is added.
- ssd
- Specifies an SSD (or flash drive) hard disk drive or an external MDisk for the newly discovered or external volume.
- nearline
- Specifies a nearline hard disk drive or an external MDisk for the newly discovered or external volume.
- enterprise
- Specifies an enterprise hard disk drive or an external MDisk for the newly discovered or external volume.
Note: This action applies to both copies if you are creating mirrored volume with two image mode copies by using this command. - Determines if the IBM®
Easy Tier® function is allowed to move extents for
this volume. Note: The -easytier parameter must be followed by either on or off:
- If set to on, then Easy Tier functions are active.
- If set to off, then Easy Tier functions are inactive.
Description
You must decide which storage pool or storage pools provide the storage for the volume. Use the lsmdiskgrp command to list the available storage pools and the amount of free storage in each pool. If you are creating a volume with more than one copy, each storage pool that you specify must have enough space for the size of the volume.
- sequential (seq)
- This virtualization type creates the volume that uses sequential extents from the specified MDisk (or MDisks, if creating multiple copies). The command fails if there are not enough sequential extents on the specified MDisk.
- striped
- This is the default virtualization type. If the -vtype parameter is not
specified, striped is the default; all managed disks in the storage pool
are used to create the volume. The striping is at an extent level; one extent from each
managed disk in the group is used. For example, a storage pool with 10 managed disks uses one extent
from each managed disk. It then uses the 11th extent from the first managed disk, and so on.
If the -mdisk parameter is also specified, you can supply a list of managed disks to use as the stripe set. This can be two or more managed disks from the same storage pool. The same circular algorithm is used across the striped set. However, a single managed disk can be specified more than once in the list. For example, if you enter -mdisk 0:1:2:1, the extents are from the following managed disks: 0, 1, 2, 1, 0, 1, 2, and so forth. All MDisks that are specified in the -mdisk parameter must be in the managed mode.
A capacity of 0 is allowed.
- image
- This virtualization type allows image mode volumes to be created when a managed disk already has
data on it, perhaps from a previrtualized subsystem. When an image mode volume is created, it
directly corresponds to the (previously unmanaged) managed disk that it was created from.
Therefore, except for thin-provisioned image mode volumes, volume logical block address (LBA)
x equals managed disk LBA x. You can use this command to bring
a nonvirtualized disk under the control of the system. After it is under the control of the system,
you can migrate the volume from the single managed disk. When it is migrated, the volume is no
longer an image mode volume. You can add image mode volumes to an already populated storage pool with other types of volumes, such as a striped or sequential.Important: An image mode volume must be 512 bytes or greater. At least one extent is allocated to an image mode volume.Remember: If you create a mirrored volume from two image mode MDisks without specifying a -size value, the capacity of the resulting volume is the smaller of the two MDisks, and the remaining space on the larger MDisk is not accessible.
- Do not create a volume in an offline I/O group. You must ensure that the I/O group is online before you create a volume to avoid any data loss. This action applies in particular to re-creating volumes that are assigned the same object ID.
- To create an image mode disk, you must already have a quorum disk present in the system because an image mode disk cannot be used to hold quorum data. Refer to information on quorum disk creation for more details.
- The command fails if either limit of 2048 volumes per I/O Group or 8192 volume copies per system is reached.
User-specified syncrate attribute value | Data copied/sec |
---|---|
1 - 10 | 128 KB |
11 - 20 | 256 KB |
21 - 30 | 512 KB |
31 - 40 | 1 MB |
41 - 50 | 2 MB |
51 - 60 | 4 MB |
61 - 70 | 8 MB |
71 - 80 | 16 MB |
81 - 90 | 32 MB |
91 - 100 | 64 MB |
An invocation example
mkvdisk -mdiskgrp Group0 -size 0
-iogrp 0 -vtype striped -mdisk mdisk1 -node 1
The resulting output:
Virtual Disk, id [1], successfully created
An invocation example for creating an image mode volume
mkvdisk -mdiskgrp Group0
-iogrp 0 -vtype image -mdisk mdisk2 -node 1
The resulting output:
Virtual Disk, id [2], successfully created
An invocation example
An invocation example for creating a new volume
mkvdisk -mdiskgrp Group0 -size 0 -unit kb
-iogrp 0 -vtype striped -mdisk mdisk1 -node 1 -udid 1234 -easytier off
The resulting output:
Virtual Disk id [2], successfully created
An invocation example for creating a thin-provisioned volume
mkvdisk -mdiskgrp Group0 -iogrp 0 -vtype striped -size 10 -unit gb -rsize 20% -autoexpand -grainsize 32
The resulting output:
Virtual Disk id [1], successfully created
An invocation example for creating a compressed volume copy
mkvdisk -mdiskgrp 0 -iogrp 0 -size 1 -unit tb -rsize 0 -autoexpand -warning 0 -compressed
The resulting output:
Virtual Disk id [1], successfully created
An invocation example for creating a mirrored image-mode volume
mkvdisk -mdiskgrp Group0:Group0 -mdisk mdisk2:mdisk3 -iogrp 0 -vtype image -copies 2
The resulting output:
Virtual Disk id [1], successfully created
An invocation example for creating a mirrored volume
mkvdisk -iogrp 0 -mdiskgrp 0:1 -size 500 -copies 2
The resulting output:
Virtual Disk id [5], successfully created
An invocation example for configuring a mirror write algorithm priority
mkvdisk -mdiskgrp Group0 -iogrp 0 -vtype striped -mirrorwritepriority redundancy -size 500
The resulting output:
Virtual Disk id [5], successfully created
An invocation example to create a disk with default grain size
mkvdisk -iogrp 0 -mdiskgrp 0 -size 100 -rsize 5%
The resulting output:
Virtual Disk id [5], successfully created
An invocation example for creating a volume with I/O groups 0 and 1 in its I/O group access set
mkvdisk -iogrp 0 -mdiskgrp 0 -size 500 -accessiogrp 0:1
The resulting output:
Virtual Disk id [5], successfully created
An invocation example for creating a volume with warning considerations
mkvdisk -mdiskgrp 6 -size 200 -rsize 50 -iogrp 0
The resulting output:
Virtual Disk, id [2], successfully created
...
lsvdisk 2
...
warning 20 # threshold in MB = 50 x 80 / 100 = 40 MB; threshold as %age of volume capacity = 40 / 200 * 100 = 20
...
An invocation example for creating a volume with warning considerations
mkvdisk -mdiskgrp 6 -size 200 -rsize 50 -iogrp 0 -warning 80%
The resulting output:
Virtual Disk, id [2], successfully created
...
lsvdisk 2
...
warning 80 # displayed as %age of volume capacity
...
An invocation example for creating a volume with warning considerations
mkvdisk -mdiskgrp 6 -size 200 -rsize 50 -iogrp 0 -autoexpand
The resulting output:
Virtual Disk, id [2], successfully created
...
lsvdisk 2
...
warning 80 # displayed as %age of volume capacity
...
An invocation example to create a volume with the read cache enabled
mkvdisk -iogrp 0 -size 10 -unit gb -mdiskgrp 0 -cache readonly
The resulting output:
Virtual Disk, id [2], successfully created
An invocation example to create volume Group0
mkvdisk -mdiskgrp Group0 -iogrp io_grp0 -vtype image -mdisk 13 -node 1 -udid 1234 -tier nearline
The resulting output:
Virtual Disk, id [0], successfully created
An invocation example to turn off formatting while creating volume Chelsea1
mkvdisk -mdiskgrp Chelsea1 -iogrp 0 -mdiskgrp 0:1 -size 500 -nofmtdisk -copies 2
The resulting output:
Virtual Disk, id [0], successfully created