Home > Veritas Storage Foundation™ Volume Manager Manual Pages
VXDISK (1M) |
Maintenance Commands |
vxdisk [-g diskgroup] check disk ...
vxdisk [-fd] classify [ctrl=ctlr[,ctlr...]] [disk=disk[,disk...]] [udid=udid[,udid...]]
vxdisk [-g diskgroup] [-o clearkey=key] clearhost disk ...
vxdisk clearimport accessname ...
vxdisk define accessname [attribute ...]
vxdisk define accessname type=simple [attribute ...]
vxdisk define accessname type=sliced [attribute ...]
vxdisk define accessname [type=auto] format=simple [attribute ...]
vxdisk define accessname [type=auto] format=sliced [attribute ...]
vxdisk define accessname [type=auto] format=cdsdisk [attribute ...]
vxdisk [-f] destroy accessname
vxdisk [-f] flush accessname
vxdisk getctlr accessname
vxdisk [[-o coordinator] -f] init accessname [attribute ...]
vxdisk [-f] init accessname type=simple [attribute ...]
vxdisk [-f] init accessname type=sliced [attribute ...]
vxdisk [-f] init accessname [type=auto] format=simple [attribute ...]
vxdisk [-f] init accessname [type=auto] format=sliced [attribute ...]
vxdisk [-f] init accessname [type=auto] format=cdsdisk [attribute ...]
vxdisk
[-g diskgroup]
[-o alldgs]
[-o listreserve]
[-o tag=[~]name[=[~]value]]
[-bceqsv]
list
[disk ...]
vxdisk [-x attr] [-p] list [disk ...]
vxdisk
[-g diskgroup]
[-q]
[-o tag=[~]name[=[~]value]]
listtag [disk ...]
vxdisk offline accessname ...
vxdisk -l filename offline
vxdisk online accessname ...
vxdisk -a online
vxdisk -l filename online
vxdisk [-g diskgroup] path
vxdisk reclaim disk|enclosure|diskgroup [[disk|enclosure|diskgroup] ...]
vxdisk [-f] [-g diskgroup] resize {accessname|medianame} [length=value]
vxdisk rm accessname ...
vxdisk [-g diskgroup] rmregion region_type disk offset [length]
vxdisk [-g diskgroup] rmtag
{disk {site=siteid | name} [name\...]|
{site|name} {disk|{e|encl|enclr}:enclosure}
[{disk|{e|encl|enclr}:enclosure}\.\.\.]}
vxdisk
[-f]
scandisks [new | fabric |
[!]device=device_list |
[!]ctlr=controller_list |
[!]pctlr=physical_ controller_list]
vxdisk [-g diskgroup] set disk [attribute ...]
vxdisk [-g diskgroup] [-f] settag
{disk {site=siteid | name[=value]} [name[=value]\...]|
{site=siteid|name[=value]} {disk|{e|encl|enclr}:enclosure}
[{disk|{e|encl|enclr}:enclosure}\.\.\.]}
vxdisk -o thin list
vxdisk [-f] [-g diskgroup] updateudid disk ...
accessname refers to the disk access name, while disk represents the disk media name. vxdisk accesses disks based on disk access names, which are system-specific names that relate to disk addresses. Disk access names equate to the device handle of a device, and may or may not require a partition specification. For instance, sda3 or hdc, where sdc3 refers to the third partition on device sdc, and hdc refers to the whole device hdc.
Operations that take an accessname argument (see the SYNOPSIS section) accept only disk access names, as defined in the previous paragraph. Operations that take a disk argument can take disk access names or disk media names (for example, disk01). For such operations, a disk group can be specified with -g to disambiguate disk media names that are used in more than one disk group.
Physical disks in VxVM are assumed to be movable, and are usually identified by a unique disk ID stored on the physical disk, rather than by a disk device node. This allows disks to be moved to different controllers, different hosts, or be remapped by the system without affecting correct operation.
VxVM maintains information about disk device addresses as disk access records. Disk access records are used to identify physical disks from disk IDs that are stored on the disks themselves. The name of a disk access record is based on the corresponding disk access name.
Physical disks contain public regions, which are used for allocating subdisks. They can also contain private regions, which are used for storing private Veritas Volume Manager information. Private regions are configured and maintained entirely by VxVM. See the PRIVATE REGIONS section for more information about the layout of private regions.
The behavior of the vxdisk utility depends upon the keyword specified as the first operand.
- reserve
- Masks out a region of disk that should be reserved for purposes other than use by VxVM. This could be used, for example, to mask out a boot file system that cannot be used for subdisk allocation, or to mask out a region containing blocks that are used for bad-block or bad-track replacement.
Adding a region fails if a subdisk or region is already allocated over the requested region.
Note: The addregion functionality is currently unimplemented for any of the existing disk types.
For shared disks, VxVM detaches an unusable disk only if the disk group's detach policy is set to global. If the disk group detach policy is local, the disk is not detached. However, if hosts in the cluster do not indicate that a disk is usable, the disk is detached from the entire cluster. See vxedit(1M) for more information on setting disk group detach policies.
Note: This key is slightly different from the I/O fencing key that is specified using the -o groupreserve option to the vxdg import and init commands. The disk reservation key that is specified to clearhost also contains the node ID of the host encoded in the first byte.
See the vxdg(1M) manual page for more information about I/O fencing.
This operation cannot be applied to disks that are in imported disk groups.
Attributes can be specified to define the access characteristics of the disk device. The following attributes define the disk type:
- type=disk_type
- Specifies the access type for the disk device. See the description of the init operation and the DISK TYPES section for more details.
- format=format
- For auto-configured disks (type=auto), specifies one of the supported formats that is to be used with the disk. See the section Auto-Configured Disks for details.
The various disk types support additional attributes for the define operation. See the DISK TYPES and ATTRIBUTES sections for details.
The -f option may be specified to forcibly rewrite the AIX coexistence label and VxVM ID block. By default, these are not overwritten.
The vxdisk init operation creates a disk access record for a disk (if one does not already exist), and sets its state to online. Disks can be initialized when vxconfigd is in its disabled state, in which case the disk header is initialized, but the disk is not added to the list of known disks until vxconfigd is re-enabled.
Any attribute operands override default values assigned for various disk attributes. Some attributes that can be set are:
- type=disk_type
- Specifies the access type for the disk device. This type identifies the class of strategies that can be used to access the disk, and to manage its private and public regions.
For example, a disk type can indicate a networked disk or a volatile RAM disk that does not require the storage of any private data.
Disk types can also indicate a hard disk as separate partitions. For disks other than EFI or boot disks, the disk type defaults to auto with format cdsdisk. This may be overridden in the /etc/default/vxdisk file.
See the description of the init operation and the DISK TYPES section for more details.
- format=format
- For auto-configured disks (type=auto), specifies one of the supported formats that is to be used with the disk. See the section Auto-Configured Disks for details.
Note: If a format is not specified, and the target disk already has a valid auto format, this is assumed to be the desired format.
The various disk types support additional attributes for the init operation. See the DISK TYPES and ATTRIBUTES sections for details.
The combined -o coordinator -f options are used to forcibly remove the coordinator flag from a disk. This flag indicates that the disk is a member of the coordinator disk group used with the I/O fencing feature of Veritas Cluster Server (VCS). Caution: Only use these options if a disk is no longer to be used as a coordinator disk.
If one or more disk arguments are specified, a full description of the contents of the disk header and of the table of contents for each named disk is displayed.
If no disk arguments are specified, a one-line summary for all disk access records known to the system is displayed.
If no disk arguments are specified, but a disk group is specified with -g, information is displayed about only those disks that have been added to the specified disk group.
The -b option can be used to display length and offset values in 512-byte units, regardless of platform. If this option is not specified, values are displayed in units of sectors, the size of which can vary between different platforms.
If the -e option is specified, an additional 2 column is displayed. First column shows the OS-based disk access name. This option is useful if you have enabled enclosure-based naming. Second column shows the Device specific extended attributes. This attributes are specific to device, like type of hardware mirroring on the disk, type of dynamic provisioning on disk , etc.
If the -s option is specified, important information from the disk header is displayed. With the -s option, the output format is the same whether or not accessname arguments are specified. The information printed with -s includes the disk ID, the host ID (if the disk is or was imported), and the disk group ID and disk group name (if the disk is a member of a disk group).
The -c option has the same effect as the -s option except that the output fields are delimited by colon (:) characters.
The -p option lists the discovered properties of a disk, including the disk ID, vendor ID, unique disk identifier (UDID), array port ID, array port worldwide number (WWN), name of the array support library (ASL) that claimed the device, array type, and array name.
If the -x attr option is used with -p, then the specified attributes are printed in a horizontal format. There can be multiple -x attributes specified in one vxdisk -p list command. For example, vxdisk -x vid -x pid -p list displays, device name and its vid and pid in a horizontal format.
If the -q option is specified, no header is printed that describes output fields. This option has no effect with the long formats that are generated for the -s option or for accessname arguments.
The -v option causes all disk tags and their values to be listed for a specified disk argument under the "Annotations:" heading. If this option is not specified, no disk tags are displayed.
When -o alldgs is specified without the -s and -g options, a one line summary shows all associations between disks and disk groups. The disk group column shows imported disk groups as normal and shows all other disk groups in parentheses.
Auto-configured disks are shown with their type (auto) qualified by their format. For example, auto:cdsdisk indicates an auto-configured disk that is formatted as a CDS disk. See the Auto-Configured Disks section for more details.
The -o thin option lists the information about thin disks. The attributes shown are the physically allocated storage size on the LUN, allocation unit size, and the type of the disk. The type of the disk is thin provision disk or the thin provision reclaimable disk.
You can use the -o listreserve option to discover if I/O fencing has been enabled for a disk group. If I/O fencing is enabled, the command also displays the current reservations and registered keys for the disks in the disk group. See the vxdg(1M) manual page for more information about I/O fencing.
If the udid_mismatch flag is set on a disk, this indicates that the current unique disk identifier (UDID) that is known to the device discovery layer (DDL) does not match the UDID that is stored in the disk's private region. This usually means that the disk has been copied from another disk. For example, a disk may be copied by creating a hardware snapshot or clone, by using dd or some other command to replicate the disk, or by building a new logical unit (also known as a LUN or virtual disk device) from the space that was previously used by a deleted LUN. Such duplicated disks are usually prevented from being imported to avoid the duplicate disk ID condition.
If udid_mismatch is set on a disk, and other disks with the same disk identifier are found in the disk group being imported, the disk can only be imported into a disk group by specifying the -o useclonedev=on option to the vxdg import command.
If the clone_disk flag is set on a disk, this indicates that the disk was imported into a disk group when the udid_mismatch indicator was set. The vxdisk set clone=on command can also be used to set the flag.
If the keepmeta flag is set on a disk, this indicates that the disk should be used to contain the configuration copies database and the kernel log copies when the disk is added to a disk group.
The -o tag option can be used to list only those devices that match a specified tag name and optional tag value. A "~" character placed before a tag name or tag value inverts the selection.
A disk with a duplicated UDID can be imported along with its disk group if the -o useclonedev=on option is specified to the vxdg import command. If multiple clones of a disk exist, one of these cloned disks can be imported provided that the same tag name and optional tag value have been set on all the disks, and that the tag name and optional tag value are also specified to the vxdg import command.
Note: If the vxdisk list command is run on a cluster node, the output shows the local state of the disk on that node, and not the cluster state of the disk.
Take a disk offline if the disk is not currently accessible, and if accessing the disk has a negative impact on the system. For example, disk drivers on a some operating systems can cause system panics or hangs if an attempt is made to access disks that are not accessible. In other operating systems, attempts to access inaccessible drives may take several seconds or minutes before returning a failure.
Using -l filename option, disk access names can be specified through a file. Each line in the file should contain one disk access name.
If -a is specified, re-online all online disks that are not currently in an imported disk group. This can be used to force VxVM to re-scan all disk headers, or to adapt to changes in the way a disk is partitioned.
Using -l filename option, disk access names can be specified through a file. Each line in the file should contain one disk access name.
If a disk media name rather than a disk access name is specified, the disk group must also be specified using the -g option.
If you specify the new size by using the length attribute, its value must be entered as the number of sectors. Standard VxVM units cannot be used because the specified length must exactly match the disk size as reported by SCSI commands.
If you do not specify a new size after growing a LUN, all the additional usable space on the device is claimed.
If you shrink a LUN, you must specify the new length explicitly, as this cannot be obtained by querying the device. To avoid data loss, you should also follow the advice that is given in the following precautionary notices.
Note: This facility is provided to support dynamic LUN expansion by updating disk headers and other VxVM structures to match a new LUN size. It does not resize the LUN itself. LUN resizing can be achieved by using the mechanism that is provided by the disk storage vendor.
Note: Any volumes on the device should only be grown after the device itself has first been grown. Otherwise, storage other than the device may be used to grow the volumes, or the volume resize may fail if no free storage is available.
Note: Resizing should only be performed on devices that preserve data. Consult the array documentation to verify that data preservation is supported and has been qualified. The operation also requires that only storage at the end of the LUN is affected. Data at the beginning of the LUN must not be altered. No attempt is made to verify the validity of pre-existing data on the LUN.
Note: Although it is possible to resize LUNs that are online but not part of any disk group, this operation is primarily intended for use with devices that are in an imported disk group. The operation should be performed on the host where the disk group is imported (or on the master node for a cluster-shared disk group). It is not possible to resize LUNs that are in the boot disk group (aliased as bootdg), in a deported disk group, or that are offline, uninitialized, being reinitialized, or in an error state.
Caution: Do not perform this operation when replacing a physical disk with a disk of a different size as data is not preserved.
Caution: Before reducing the size of a device, any volumes on the device should first be reduced in size or moved off the device. By default, the resize fails if any subdisks would be disabled as a result of their being removed in whole or in part during a shrink operation.
If the device that is being resized has the only valid configuration copy for a disk group, the -f option may be specified to forcibly resize the device.
Caution: Resizing a device that contains the only valid configuration copy for a disk group can result in data loss if a system crash occurs during the resize.
Caution: Resizing a virtual disk device is a non-transactional operation outside the control of VxVM. This means that the resize command may have to be re-issued following a system crash. In addition, a system crash may leave the private region on the device in an unusable state. If this occurs, the disk must be reinitialized, reattached to the disk group, and its data resynchronized or recovered from a backup.
Note: A Storage Foundation license is required to use the vxdisk resize command.
Note: The rmregion functionality is currently unimplemented for any of the existing disk types.
By default, VxVM performs a full scan of the device tree when performing device discovery. To discover only newly added disks that are not already known to VxVM, specify the -f option.
The following scandisks operations are also supported:
- scandisks [!]ctlr=controller_list
- Discovers devices that are connected to the logical controllers specified as a comma-separated list. If a ! is prepended to ctlr, all devices are discovered except those that are connected to the specified controllers.
- scandisks [!]device=device_list
- Discovers and configures the devices that are specified as a comma-separated list. If a ! is prepended to device, all devices except those listed are discovered.
- scandisks fabric
- Discovers fabric devices.
- scandisks new
- Discovers new disks (that is, disks not known to VxVM).
- scandisks [!]pctlr=physical_controller_list
- Discovers devices that are connected to the physical controllers specified as a list of items separated by + characters. If a ! is prepended to pctlr, all devices are discovered except those that are connected to the specified physical controllers.
A list of physical controllers can be obtained by running the vxdmpadm listctlr all command.
Only one scandisks operation may be specified at a time. For example, a command such as vxdisk scandisks new fabric results in an error.
The -f option must be specified if the tag name is already set on the disk.
The earlier command syntax is supported only for backward compatibility. The earlier command syntax is:
vxdisk [-g diskgroup]] settag {disk name[=value] [name[=value]\.\.\.]
The new command syntax is:
vxdisk [-g diskgroup]] settag name[=value] disk1 [disk2\.\.\. encl:encl_name1 encl:encl_name2]
Note: The tag names site, udid and vdid are reserved for use by VxVM. The udid and vdid tags cannot be used.
Use the tag name site to identify to which site in a Remote Mirror configuration the specified disk or enclosure belongs.
If the udid_mismatch flag is not set on a disk, you must specify the -f option to forcibly update the UDID value for the disk.
The default type is auto with format set to cdsdisk for disks other than boot or EFI disks. If required, the default can be overridden in the /etc/default/vxdisk file. If an EFI disk is initialized, the default format is sliced.
nopriv devices are most useful for defining special devices (such as volatile RAM disks) that you wish to use with VxVM, but that cannot store private regions. A RAM disk cannot store a meaningful private region, because data written to a RAM disk may not survive a reboot.
Initializing a nopriv device with vxdisk init creates a disk access record internally to VxVM's configuration, but no information is written to disk. The disk ID for nopriv devices is stored in the private structure of the disk access record.
Attributes that can be used with the define operation for nopriv disks are diskid, publen, puboffset and volatile.
Attributes that can be used with the init operation for nopriv disks are publen, puboffset and volatile.
Attributes that can be defined with vxdisk define are listed in the ATTRIBUTES section.
From release 4.0 of VxVM, auto-configured disks are of type auto that can take one of the following formats:
Note: As the CDS format is applied to the entire disk and is unsuitable for boot disks, attributes that relate to slices or to booting are not applicable.
Auto-configured devices can be disabled and re-enabled using the offline and online operations. However, the offline state is not stored persistently. If you need to persistently offline a device at a particular address, convert the address to use an explicit device record. To do this, remove the auto-configured device, and use vxdisk define to create an explicitly configured device.
Attributes that may be defined for auto-configured disks are listed in the ATTRIBUTES section.
The default format for auto-configured disks may be overridden by a suitable entry in the /etc/default/vxdisk file. See the DEFAULTS FILE section for details. A value specified on the command line takes precedence over both the value in the defaults file and the inbuilt value.
Note: If a format is not specified, and the target disk already has a valid auto format, this is assumed to be the desired format.
\"
This flag is usually set automatically to on for a disk that is detected as being a duplicate, or when the -o updateid option is specified to the vxdg import command and the udid_mismatch flag has been set on the disk being imported.
If set to always, a configuration copy and a log copy are written to the specified disk when it is added to a disk group irrespective of the standard placement policy.
VxVM automatically enables and disables the configuration copy. It maintains a level of redundancy in configuration copies that allows the configuration to be recovered from the loss of multiple disks.
See the description of the nconfig parameter on the vxdg(1M) manual page for more information.
VxVM automatically enables and disables the configuration copy. It maintains a level of redundancy in configuration copies that allows the configuration to be recovered from the loss of multiple disks.
See the description of the nlog parameter on the vxdg(1M) manual page for more information.
The default value of privlen may also be overridden by a suitable entry in the /etc/default/vxdisk file. See the DEFAULTS FILE section for details. A value specified on the command line takes precedence over both the value in the defaults file and the inbuilt value.
For nopriv disks, the usable length of the device. This is required if there is no system-defined procedure for determining the disk length; otherwise, a suitable default is computed.
For nopriv disks, the offset within the device for the start of the usable region. The default value of this offset defaults to 1. This can be changed if it is necessary to skip over some region that is reserved for use by the operating system. If an offset is specified, the default disk length is adjusted accordingly.
The following attributes may be specified in the defaults file:
Within disk groups, disk group configuration and log copies are critical data structures. At least one complete configuration copy and log copy must be readable and usable, or the disk group is unusable and must be reinitialized.
All disk group association information is stored in the disk header within private regions. This information consists of a disk group name, disk group unique ID, and a host ID. When the system boots, VxVM scans for disks that are stamped with the system's host ID. Each represented disk group is imported automatically. Disks with a non-matching host ID are not imported automatically, and cannot be used until the host ID is cleared with the clearimport operation.
vxdisk does not create partitions on the disk. Any partitions that are required must already be present on the disk.
To ensure that the disk partition table and the disk format are in agreement, it is recommended that you use the vxdisksetup -i command to initialize disks in preference to the vxdisk init command.
The default private region size increased from 1MB to 32MB in release 5.0.
Last updated: 17 Jul 2008
Copyright ©2009 Symantec Corporation
All rights reserved.