vxdiskadm(1M)
vxdiskadm - administrate disks
Synopsis
vxdiskadm
Description
The vxdiskadm script presents a menu of possible operations to the user. Based on the operations selected, the script guides the user through the necessary steps, and prompts for data that must be user-supplied for completion of the operation. This script is intended primarily for users who understand only a limited set of concepts, and also for users who wish to use a simple method for doing common operations.
The vxdiskadm script is interactive in nature. It is intended to lead the user through the various possible courses of action that might be taken. Courses of action that do not involve a clear single alternative require prompts to be answered by the user, with defaults supplied as appropriate. Help is made available at every prompt. Entering ? in response to a prompt displays a context-sensitive help message.
For the disk adding and encapsulation operations, one or more disks may be specified with a disk-address-pattern-list. The basic form of a disk address is c#b#t#d#. Any leading portion of this address may be specified to indicate that all disks that match that leading portion should be used. For example, c2b0t0 may be used to specify all disks on controller 2, busid 0, target 0. More than one disk address or address pattern may be specified on the command line. The word all may be used to specify all disks on the system. Disk address names relate directly to device node names in the /dev/dsk and /dev/rdsk directories.
The files /etc/vx/cntrls.exclude and /etc/vx/disks.exclude may be used to exclude disks or controllers from use by vxdiskadm. Each line of cntrls.exclude specifies the address of a controller to exclude, e.g. c2. Each line of disks.exclude specifies a disk to exclude, e.g. c0b0t3d0.
The vxdiskadm script presents the following list of operations:
- Add or initialize one or more disks
- This menu option prompts for one or more disk device addresses. The user is prompted for a disk
group (which defaults to rootdg). The user is also given the alternative of initializing the
disk but leaving it unallocated to a disk group. If a disk group is specified, the user is then
asked to name the disk. A default disk name of the form disk## is chosen for the root disk
group. If the disk is to be added to a disk group other than rootdg, the name will be of the
form diskgroup##, such that the name will be unique within all imported disk groups. Also
if a disk group is specified for the disks, the user is prompted for whether the disks should
be designated as spares for the disk group. The disks are then checked to ensure that there
is no information already on them. If there is, the user is given the option of encapsulating
the disks.
- Encapsulate one or more disks
- This operation prompts for one or more disk addresses. It then calls vxencap to encapsulate
partitions on the named disk.
- Remove a disk
- This operation prompts for a disk, by disk media name. The disk is checked to ensure that no
subdisks reside on the disk. If the disk is in use, then the operation fails with a
recommendation to first move all volumes off the disk. If this disk is the last disk in a disk
group, the user is prompted for whether the disk group should be removed from the system,
as well.
- The operation proceeds by calling vxdg rmdisk to remove the disk from its disk group. If this is the
last disk in its disk group, then vxdg deport is used, instead, to remove the disk group from
use.
- Remove a disk for replacement
- This operation prompts for a disk, by disk media name. The disk is checked for volumes that would
lose all mirrors as a result of the operation. If such volumes exist, those volumes are listed
and the user is prompted to ensure that the operation should proceed.
- The operation proceeds by calling vxdg -k rmdisk to dissociate the media record from the physical
disk. If some formatted disks are available that have disk headers but no disk group, then
the user is prompted for whether one of these disks should be used as a replacement.
- Replace a failed or removed disk
- This operation prompts for a disk media name. The named media record must be dissociated from
a disk. If the media record is not in the removed state, then unused disks are scanned for
matching disk IDs. If a disk with a matching disk ID is found, the user is prompted for
whether that disk should be reattached.
- If a matching disk is not used, the user is prompted for a new disk, by device address. If the named
replacement disk has a valid disk header, but is not allocated to a disk group, the user is
prompted for whether the disk should be reinitialized. If the named replacement disk is
listed as allocated to a disk group or to another host, then the user is prompted to ensure that
the operation should proceed.
- If the device is to be initialized, vxdisksetup is called to partition it and to create the disk header.
- Given an initialized disk, the operation proceeds by replacing the disk in a disk group with vxdg -k
adddisk.
- Mirror volumes on a disk
- This menu option prompts for a disk, by media name. It then prompts for a destination disk within
the same disk group, also by media name. Specifying no destination disks indicates that any
disk is suitable. The operation proceeds by calling vxmirror to mirror the volumes.
- Mirroring volumes from the boot disk will produce a disk that can be used as an alternate boot disk.
This will be done by calling the vxrootmir command.
- Move volumes from a disk
- This menu option prompts for a disk, by media name. It then prompts for a possible list of
destination disks, also by disk media name. Specifying no destination disks indicates that
any disk is suitable. The operation proceeds by calling vxevac to move subdisks off the
disk.
- Enable access to (import) a disk group
- This menu option prompts for a disk, by device address. The operation proceeds by calling vxdg
import to import the disk group stored on that disk.
- Disable access to (deport) a disk group
- This menu option prompts for a disk group name. The prompt display lists alternate disk groups and
the disks (media name and access name) that they contain. The operation proceeds by
calling vxdg deport.
- Enable (online) a disk device
- This option prompts for a disk device. The prompt display allows for a display of disks on the
system. The operation only functions for disks currently in an offline state. It then
proceeds to make the disk accessible.
- Disable (offline) a disk device
- This option prompts for a disk device. The prompt display allows for a display of disks on the
system. The operation only functions for disks currently in an online state but not part of
any disk group. It then proceeds to mark the disk as offline such that the Volume Manager
makes no further attempt at accessing the disk.
- Mark a disk as a spare for a disk group
- This option sets up a disk to be used as a spare device for its disk group. A spare disk can be used to
automatically replace a disk that has failed. No space can be used on a disk that is marked
as a spare.
- Turn off the spare flag for a disk
- This option removes a disk from those that can be used as a spare and returns its space to the general
pool of available space.
References
vxdg(1M),
vxdisk(1M),
vxdiskadd(1M),
vxdisksetup(1M),
vxencap(1M),
vxevac(1M),
vxintro(1M),
vxmirror(1M),
vxrootmir(1M)
© 1997 The Santa Cruz Operation, Inc. All rights reserved.