Varitas CLI
Varitas CLI
Solaris
May, 1999
P/N 100-001124
© 1998 -1999 VERITAS® Software Corporation. All rights reserved.
TRADEMARKS
VERITAS, VxVM, VxVA, VxFS, and FirstWatch are registered trademarks of VERITAS Software Corporation in the United
States and other countries.
VERITAS Volume Manager, VERITAS File System, VERITAS NetBackup, VERITAS HSM, VERITAS Media Librarian, CVM,
VERITAS Quick I/O, VxSmartSync, and the VERITAS logo are trademarks of VERITAS Software Corporation.
Other products mentioned in this document are trademarks or registered trademarks of their respective holders.
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1. The Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Using the vxassist Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Displaying Disk Configuration Information . . . . . . . . . . . . . . . . . . . . . . . 3
Displaying Disk Listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Displaying Volume Manager Object Listings . . . . . . . . . . . . . . . . . . . 3
Displaying Free Space in a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . 5
Creating Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Volume Manager Task Monitor Operations. . . . . . . . . . . . . . . . . . . . . . . . 7
Task Monitor Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
The vxtask Utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2. Disk Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Adding a Disk to Volume Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
iii
Designating a Disk as a Hot-Relocation Spare . . . . . . . . . . . . . . . . . . . . . 15
Removing a Disk as a Hot-Relocation Spare. . . . . . . . . . . . . . . . . . . . 15
Renaming a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Reserving Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Adding a Disk to a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Taking a Disk Offline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Mirroring a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Removing a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Displaying Disk Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Displaying Multipaths Under a VM Disk . . . . . . . . . . . . . . . . . . . . . . 23
Displaying Multipathing Information . . . . . . . . . . . . . . . . . . . . . . . . . 23
Creating a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Upgrading a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Disk Group Upgrade Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Listing the Disk Group Version . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Creating Disk Groups of a Specific Version . . . . . . . . . . . . . . . . . . . . 29
Upgrading a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Renaming a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Destroying a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Moving a Disk Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Displaying Disk Group Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3. Volume Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Creating a Volume. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Creating a Concatenated Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Creating a Concatenated Volume on Any Disk . . . . . . . . . . . . . . 38
Creating a Concatenated Volume on a Specific Disk . . . . . . . . . 38
Contents v
Removing a Mirror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Moving Subdisks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Splitting Subdisks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Joining Subdisks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Displaying Volume Configuration Information . . . . . . . . . . . . . . . . . . . . 54
Performing Online Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4. Volume Administration Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Volume Administration Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Volume Manager Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Using vxassist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Advantages of the vxassist Command. . . . . . . . . . . . . . . . . . . 62
How vxassist Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
vxassist Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Volume Configuration Daemon vxdctl. . . . . . . . . . . . . . . . . . . . . . . 65
Creating Volume Manager Objects With vxmake . . . . . . . . . . . . . . . 65
Performing Plex Tasks With vxplex . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Performing Subdisk Tasks With vxsd . . . . . . . . . . . . . . . . . . . . . . . . . 67
Correcting Problems With vxmend . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Printing Configuration Information With vxprint . . . . . . . . . . . . . 68
Printing Volume Statistics With vxstat . . . . . . . . . . . . . . . . . . . . . . 68
Tracing Volume Tasks With vxtrace . . . . . . . . . . . . . . . . . . . . . . . . . 69
Performing Volume Tasks With vxvol . . . . . . . . . . . . . . . . . . . . . . . . 69
Subdisk Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Creating Subdisks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Removing Subdisks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Displaying Subdisk Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Contents vii
When to Use Relayout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
How to Use Relayout on the Command Line . . . . . . . . . . . . . . . . . . . 94
Using Command vxassist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Changing the Number of Columns . . . . . . . . . . . . . . . . . . . . . . . . 96
Changing the Stripe-Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Changing the Stripe-Width and Column . . . . . . . . . . . . . . . . . . . 97
Changing the Layouts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Starting, Stopping, and Reversing a Relayout . . . . . . . . . . . . . . . . . . 98
Finding the Status of a Relayout Operation . . . . . . . . . . . . . . . . . . . . 99
Transformation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Converting a Plex in a Mirrored Volume to a RAID-5 Plex . . . . 100
Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5. Menu Interface Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Starting vxdiskadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
The vxdiskadm Main Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
The vxdiskadm Main Menu Description . . . . . . . . . . . . . . . . . . . . . . 103
Disk Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Bringing Physical Disks Under Volume Manager Control . . . . . . . . 107
Placing a Disk Under Volume Manager Control . . . . . . . . . . . . . 109
Placing Multiple Disks Under Volume Manager Control . . . . . 112
Encapsulating a Disk for Volume Manager Use . . . . . . . . . . . . . 117
Adding a Disk for Future Use. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Reinitializing a Disk for Volume Manager Use . . . . . . . . . . . . . . . . . 121
Adding a VM Disk to the Hot-Relocation Pool . . . . . . . . . . . . . . . . . 124
Removing a VM Disk From the Hot-Relocation Pool . . . . . . . . . . . . 125
Contents ix
x VERITAS Volume Manager Command Line Interface Administrator’s Guide
Preface
Audience
This guide is intended for system administrators responsible for configuring
and maintaining systems using the VERITAS Volume Manager.
Scope
This guide describes how to perform a variety of Volume Manager tasks using
the Volume Manager command line interface and the Volume Manager
Support Operations menu interface (vxdiskadm). The chapters in this guide
focus on frequently-used Volume Manager tasks.
You can use one or more of the following interfaces to perform Volume
Manager tasks:
• command line interface—a set of Volume Manager commands (including an
automated command—vxassist)
xi
• a menu-driven interface (vxdiskadm)
• Volume Manager Storage Administrator—a graphical user interface
This guide describes how to use the command line interface and vxassist
interfaces to perform similar Volume Manager tasks. The Storage
Administrator interface is described in the VERITAS Volume Manager Storage
Administrator Administrator’s Guide.
Organization
This guide provides information on how to use the command line interface to
the Volume Manager.
Related Documents
The following documents provide related information:
• The VERITAS Volume Manager Getting Started Guide provides administrators
with an overview of the Volume Manager and its features. It also provides
general information about Volume Manager setup.
Conventions
The following table describes the typographic conventions used in this guide.
Preface xiii
xiv VERITAS Volume Manager Command Line Interface Administrator’s Guide
The Command Line Interface 1
Introduction
This chapter provides information about the VERITAS Volume Manager
command line interface (CLI). The Volume Manager command set (for
example, vxassist) ranges from commands requiring minimal user input to
commands requiring detailed user input. Many of the Volume Manager
commands require an understanding of Volume Manager concepts. Volume
Manager concepts are described in the VERITAS Volume Manager Getting
Started Guide. Most Volume Manager commands require superuser or access
privileges.
Refer to the chapters that follow for information on using Volume Manager
commands to perform common tasks. The vxintro(1M) manual page also
contains introductory information relating to Volume Manager tasks.
1
1
Note: Your system may use a device name that differs from the examples. See
Chapter 1, “Understanding Volume Manager,” in the VERITAS Volume Manager
Getting Started Guide, for more information on device names.
The first argument after any vxassist keyword is always a volume name.
Follow the volume name with a set of attributes. Use these attributes to specify
where to allocate space and whether you want mirroring or striping to be used.
You can select the disks on which the volumes are to be created by specifying
the disk names at the end of the command line. For example, to create a 30
megabyte striped volume on three specific disks (disk03, disk04, and
disk05), enter:
vxdisk list
The output of vxdisk list lists the device name, the type of disk, the disk
name, the disk group to which the disk belongs, and status of the disk. This is
an example of vxdisk list output:
DEVICE TYPE DISK GROUP STATUS
c0t0d0s2 sliced disk01 rootdg online
c0t1d0s2 sliced disk02 rootdg online
c0t2d0s2 sliced disk03 rootdg online
vxprint -ht
To see the free space in the default disk group, rootdg, enter:
Creating Volumes
Volumes are created to take advantage of the Volume Manager concept of
virtual disks. Once a volume exists, a file system can be placed on the volume
to organize the disk space with files and directories. Also, applications such as
databases can be used to organize data on volumes.
You can use the Task Monitor option with the following utilities:
where:
For example, to execute a vxrecover command and track all resulting tasks as
a group, you can specify a task tag to the vxrecover command as follows:
The vxrecover command creates a task to track all recovery jobs. To establish
the task tag grouping, vxrecover specifies the tag to all utilities that it calls.
Additionally, to establish a parent-child task relationship to any tasks those
utilities execute, vxrecover passes its own task ID to those utilities.
For more information about the utilities, see their respective manual pages.
Every task is given a unique task identifier. This is a numeric identifier for the
task that can be specified to the vxtask utility to specifically identify a single
task. For most utilities, the tag is specified with the -t tag option.
Operations
The vxtask utility supports the following operations:
pause
resume
abort These three operations request that the specified task change its state.
pause puts a running task in the paused state, causing it to suspend
operation. resume causes a paused task to continue operation.
abort causes the specified task to cease operation. In most cases, the
operations “back out” as if an I/O error occurred, reversing to the
extent possible what had been done so far.
Output
There are two output formats printed by vxtask: a short, one-line summary
format per task, and a long task listing. The short listing provides the most
used task information for quick perusal.
Examples
To list all tasks currently running on the system:
vxtask list
To trace all tasks in the diskgroup foodg that are currently paused, as well as
any tasks with the tag sysstart:
vxtask -p list
Introduction
This chapter provides instructions on performing the following disk and disk
group tasks using the command line interface:
• Adding a Disk to Volume Manager
• Designating a Disk as a Hot-Relocation Spare
• Removing a Disk as a Hot-Relocation Spare
• Renaming a Disk
• Reserving Disks
• Adding a Disk to a Disk Group
• Taking a Disk Offline
• Mirroring a Disk
• Removing a Disk
• Displaying Disk Information
• Displaying Multipaths Under a VM Disk
• Displaying Multipathing Information
• Creating a Disk Group
• Upgrading a Disk Group
• Disk Group Upgrade Command
• Creating Disk Groups of a Specific Version
11
2
• Renaming a Disk Group
• Destroying a Disk Group
• Moving a Disk Group
• Displaying Disk Group Information
Note: Your system may use a device name that differs from the examples. See
Chapter 1, “Understanding Volume Manager,” in the VERITAS Volume Manager
Getting Started Guide, for more information on device names.
vxdiskadd devname
vxdiskadd c1t0d0
Notice that the s2 suffix is not used in this example.
2. To continue with the task, enter y (or press Return) at the following prompt:
c1t0d0
3. At the following prompt, specify the disk group to which the disk should be
added or press Return to accept rootdg: (See “Adding a Disk to a Disk
Group” for more information.)
You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations. To create a new disk group,
select a disk group name that does not yet exist. To leave the
disk available for future use, specify a disk group name of
“none”.
Which disk group [<group>,none,list,q,?] (default: rootdg)
4. At the following prompt, either press Return to accept the default disk
name or enter a disk name:
Use a default disk name for the disk? [y,n,q,?] (default: y)
Disk Tasks 13
2
to have been initialized for the Volume Manager. If there is
data on the disk that should NOT be destroyed you should
encapsulate the existing disk partitions as volumes instead of
adding the disk as a new disk Output format: [Device_Name]
c1t0d0
Encapsulate this device? [y,n,q,?] (default: y) y
You can use the vxdisk list command to confirm that this disk is now a
spare; disk01 should be listed with a spare flag.
Any VM disk in this disk group can now use this disk as a spare in the event
of a failure. If a disk fails, hot-relocation automatically occurs (if possible). You
are notified of the failure and relocation through electronic mail. After
successful relocation, you may want to replace the failed disk.
vxdisk list
The output of this command lists any spare disks with the spare flag.
Disk Tasks 15
2
For example, to make disk disk01 available for normal use, enter:
Renaming a Disk
If you do not specify a Volume Manager name for a disk, the Volume Manager
gives the disk a default name when you add the disk to Volume Manager
control. The Volume Manager name is used by the Volume Manager to identify
the location of the disk or the disk type. You can change the disk name to
reflect a change of ownership or use, enter:
vxdisk list
Note: By default, Volume Manager names subdisk objects after the VM disk
on which they are located. Renaming a VM disk does not automatically rename
the subdisks on that disk.
Reserving Disks
By default, vxassist allocates space from any disk that has free space. You
can reserve a set of disks for special purposes, such as to avoid general use of
a particularly slow or a particularly fast disk.
After you enter this command, vxassist does not allocate space from the
selected disk unless that disk is specifically mentioned on the vxassist
command line. For example, if disk disk03 is reserved, the command:
does not use disk03, even if there is no free space on any other disk.
vxdiskadd devname
vxdiskadd c1t1d0
vxdiskadd displays the following message:
Add or initialize disks
Menu: VolumeManager/Disk/AddDisks
Here is the disk selected. Output format: [Device_Name]
c1t1d0
Continue operation? [y,n,q,?] (default: y) y
Disk Tasks 17
2
2. At the following prompt, specify the disk group to which the disk should be
added or press Return to accept rootdg:
You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations. To create a new disk group,
select a disk group name that does not yet exist. To leave the
disk available for future use, specify a disk group name of
“none”.
Which disk group [<group>,none,list,q,?] (default: rootdg)
3. At the following prompt, either press Return to accept the default disk
name or enter a disk name:
Use a default disk name for the disk? [y,n,q,?] (default: y)
4. When vxdiskadd asks whether this disk should become a hot-relocation
spare, enter n (or press Return):
Add disk as a spare disk for rootdg? [y,n,q,?] (default: n) n
5. To continue with the task, enter y (or press Return) at the following prompt:
The selected disks will be added to the disk group rootdg with
default disk names.
c1t1d0
Continue with operation? [y,n,q,?] (default: y) y
6. The following prompt indicates that this disk has been previously
initialized for future Volume Manager use; enter y to confirm that you now
want to use this disk:
The following disk device appears to have been initialized
already. The disk is currently available as a replacement disk.
Output format: [Device_Name]
c1t1d0
Use this device? [y,n,q,?] (default: y) y
7. To reinitialize the disk, enter y (or press Return) at the following prompt:
The following disk you selected for use appears to already have
been initialized for the Volume Manager. If you are certain
the disk has already been initialized for the Volume Manager,
To confirm that the disk has been added to the disk group, enter:
vxdisk list
To take a physical disk offline, first remove the disk from its disk group (See
“Removing a Disk” for more information). Then place the disk in an “offline”
state with this command:
Disk Tasks 19
2
vxdisk offline c1t1d0s2
Note: The device name is used here because the disk is no longer in a disk
group and so does not have an administrative name.
Mirroring a Disk
Mirroring the root disk mirrors the root volume and other areas needed for
booting onto another disk.
To mirror your boot (root) disk onto another disk, use either the steps outlined
here or vxdiskadm (see Chapter 5, “Menu Interface Tasks”). This makes it
possible to recover from failure of your boot disk by replacing it with the
mirror of the boot disk.
Before mirroring your boot disk, the EEPROM variable use-nvramrc? must be
set to true if you want to take advantage of the Volume Manager boot disk
aliases to identify the mirror of the boot disk if a replacement is needed. If this
variable is set to false, you will need to determine which disks are bootable
yourself. You can set this variable to true as follows:
eeprom use-nvramrc?=true
2. Use the vxdiskadd command to add the selected disk as a new disk (if it is
not already added).
/etc/vx/bin/vxrootmir alternate_disk
where alternate_disk is the disk name assigned to the other disk.
vxrootmir creates a mirror for rootvol (the volume for the root file
system on an alternate disk).
The alternate boot disk is configured to enable booting from it if the
primary boot disk fails.
If you do not have space for a copy of some of these file systems on your
alternate boot disk, you can mirror them to other disks. You can also span or
stripe these other volumes across other disks attached to your system.
To list all volumes on your primary boot disk, use the command:
vxprint -t -v -e\
’[Link].sd_disk="boot_disk"’
To mirror all of the concatenated volumes on this disk to your alternate boot
disk, use the command:
Removing a Disk
You can remove a disk from a system and move it to another system if the disk
is failing or has failed. Before removing the disk from the current system, you
must:
1. Remove the disk from its disk group with this command:
Disk Tasks 21
2
For example, to remove disk01 from rootdg, enter:
2. Remove the disk from Volume Manager control with this command:
vxdisk rm devname
For example, to remove c1t0d0 from Volume Manager control, enter:
vxdisk rm c1t0d0s2
You can display information on all disks that are defined to the Volume
Manager with this command:
vxdisk list
You can see the multipathing information for a particular metadevice with the
command:
Disk Tasks 23
2
logs count=1 len=120
Defined regions
config priv 000017-000247[000231]:copy=01 offset=000000 enabled
config priv 000249-000812[000564]:copy=01 offset=000231 enabled
log priv 000813-000932[000120]:copy=01 offset=000000 enabled
Multipathing information:
numpaths: 2
c2t0d0s2 state=enabled type=primary
c1t0d0s2 state=disabled type=secondary
The output shows two paths to a physical device represented by the
metadevice c2t0d0s2. The path c2t0d0s2 is active (state=enabled) and
the other path c1t0d0s2 is in a failed state (state=disabled).
This type information will not be present for disks on active/active type disk
arrays because there is no concept of primary and secondary paths to disks on
these disk arrays. For example, StorEdge A5000 and Sparc Storage Array (SSA)
disk arrays.
The vxdisk list command returns the following display for disk01:
Device c2t0d0s2
devicetag c2t0d0
type sliced
hostid aparajita
disk name=disk01 id=[Link]
group name=rootdg id=[Link]
flags online ready autoconfig autoimport imported
pubpaths block=/dev/vx/dmp/c2t0d0s4 char=/dev/vx/rdmp/c2t0d0s4
privpaths block=/dev/vx/dmp/c2t0d0s3 char=/dev/vx/rdmp/c2t0d0s3
version 2.1
iosize min=512 (bytes) max=2048 (blocks)
public slice=4 offset=0 len=1043840
private slice=3 offset=1 len=1119
update time=861801175 seqno=0.48
headers 0 248
Note: The Volume Manager supports a default disk group, rootdg, in which
all volumes are created if no further specification is given. All commands
default to rootdg as well.
A disk group must always contain at least one disk. A disk that does not
belong to any disk group must be available when you create a disk group.
To create the disk group newdg associated with a disk, follow these steps:
vxdiskadd c1t1d0
Disk Tasks 25
2
2. At the following prompt, press Return to continue:
Add or initialize disks
Menu: VolumeManager/Disk/AddDisks
c1t1d0
3. At the following prompt, specify the disk group to which the disk should be
added (newdg, in this case):
You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations. To create a new disk group,
select a disk group name that does not yet exist. To leave the
disk available for future use, specify a disk group name of
“none”.
Which disk group [<group>,none,list,q,?] (default: rootdg) newdg
4. When vxdiskadd confirms that no active disk group currently exists with
the same name and prompts for confirmation that you want to create this
new disk group. Enter y to continue:
There is no active disk group named newdg.
Create a new group named newdg? [y,n,q,?] (default: y) y
5. At the following prompt, either press Return to accept the default disk
name or enter a disk name:
Use a default disk name for the disk? [y,n,q,?] (default: y)
7. To continue with the task, enter y (or press Return) at the following prompt:
A new disk group will be created named newdg and the selected
disks will be added to the disk group with default disk names.
Creating a new disk group named newdg containing the disk device
c1t1d0 with the name newdg01.
8. To verify that the disk group was created, use this command:
vxdisk list
The Volume Manager 3.0 disk group upgrade feature separates the two
operations of importing a disk group and upgrading its version. You can
import a disk group of down-level version and use it without upgrading it.
When you want to use new features, the disk group can be upgraded. The
upgrade is an explicit operation (as opposed to earlier VxVM versions, where
the upgrade was performed when the disk group was imported). Once the
upgrade occurs, the disk group becomes incompatible with earlier releases of
VxVM that do not support the new version.
Disk Tasks 27
2
Before the imported disk group is upgraded, no changes are made to the disk
group to prevent its use on the release that it was imported from until the
administrator explicitly upgrades it to the current release.
Until completion of the upgrade, the disk group can be used “as is” provided
there is no attempt to use the features of the current version. Attempts to use a
feature of the current version that is not a feature of the version the disk group
was imported from results in an error message similar to this:
vxvm:vxedit: ERROR: Disk group version doesn’t support feature
To use any of the new features, the administrator needs to execute a command
to explicitly upgrade the disk group to a version that supports those features.
All disk groups have a version number associated with them. Volume Manager
releases support a specific set of disk group versions. Volume Manager can
import and perform operations on a disk group of that version. The operations
are limited by what features and operations the disk group version supports.
Table 2-1 summarizes the VxVM releases that introduce and support specific
disk group versions:
Note: With the exception of VxVM 3.0, all VxVM releases perform the
upgrade of supported disk group versions when they are imported.
You can determine the disk group version by using the vxprint(1M)
command with the -l format option.
Disk Tasks 29
2
group on a system running VxVM Release 3.0 that can be imported by a
system running VxVM Release 2.5, the disk group must be created with a
version of 50 or less.
To create such a disk group, the -T <version> option can be specified to the
vxdg init command. Option <version> should be the disk group version
desired for the disk group. For example, to create a disk group that can be
imported by a system running VxVM 2.5, the command:
creates the disk group newdg with a disk group version of 40. This disk group
can be imported by VxVM Release 2.5. Note that while the disk group can be
imported on the VxVM 2.5 system, attempts to use VxVM 3.0 features fail with
the error message:
vxvm:vxedit: ERROR: Disk group version doesn’t support feature
Every system running the Volume Manager must have a single rootdg disk
group. rootdg can only be moved across systems if it is renamed.
You can use the following steps to temporarily move the rootdg disk group
from one host to another (for repair work on the root volume, for example) and
then move it back:
1. On the original host, identify the disk group ID of the root disk group to be
imported with this command:
vxdisk -s list
2. On the importing host, import and rename the rootdg disk group with this
command:
3. After the necessary work has been done on the imported rootdg, deport it
back to its original host with this command:
where hostname is the name of the system whose rootdg is being returned (the
name of the system can be confirmed with the command uname -n). This
command removes the imported rootdg from the importing host and returns
locks to its original host. The original host then autoimports its rootdg on its
next reboot.
The vxdg deport command can still be used to make disks inaccessible. The
Volume Manager prevents disks in a deported disk group from being used in
other disk groups.
Disk Tasks 31
2
Moving a Disk Group
A disk group can be moved between systems, along with its Volume Manager
objects (except for rootdg). This relocates the disk group configuration to a
new system.
1. Unmount and stop all volumes in the disk group on the first system.
2. Deport (disable local access to) the disk group to be moved with this
command:
3. Import (enable local access to) the disk group and its disks from the second
system with this command:
4. After the disk group is imported, start all volumes in the disk group with
this command:
vxdg list
The Volume Manager returns the following listing of current disk groups:
NAME STATE ID
rootdg enabled [Link]
newdg enabled [Link]
You can display more detailed information on a specific disk group (such as
rootdg) with this command:
If you need to verify the disk group ID and name associated with a specific
disk (to import the disk group, for example), use this command:
This command provides output that includes the following information for the
specified disk:
dgname: rootdg
dgid: [Link]
Disk Tasks 33
2
Introduction
This chapter describes how to create and maintain a system configuration
under Volume Manager control. It includes information about creating,
removing, and maintaining Volume Manager objects (volumes, plexes, and
subdisks). Online backup information is also included.
35
3
• Mirroring a Volume
• Creating a Volume with Dirty Region Logging Enabled
• Mirroring an Existing Volume
• Mirroring All Volumes
• Adding a RAID-5 Log
• Adding a DRL Log
• Removing a DRL Log
• Removing a RAID-5 Log
• Stopping a Volume
• Starting a Volume
• Listing Unstartable Volumes
• Preparing a Volume to Restore From Backup
• Recovering a Volume
• Removing a Mirror
• Moving Subdisks
• Splitting Subdisks
• Joining Subdisks
• Displaying Volume Configuration Information
• Performing Online Backup
Creating a Volume
Volumes are created to take advantage of the Volume Manager concept of
virtual disks. A file system can be placed on the volume to organize the disk
space with files and directories. Also, applications such as databases can be
used to organize data on volumes.
The vxassist command provides the simplest way to create new volumes.
You can create a volume by using vxassist. The command takes the
following form:
where make is the keyword for volume creation, volume_name is a name you
give to the volume, and length specifies the number of sectors (by default) in
the volume. The length can be specified in kilobytes, megabytes, or gigabytes
by using a suffix character of k, m, or g, respectively. Refer to the vxintro(1M)
manual page for more information on specifying units of length when creating
volumes. Additional attributes can be specified, as appropriate.
By default, vxassist creates volumes in the rootdg disk group. Another disk
group can be specified by including -g diskgroup in the vxassist command
line.
Creating a volume in the disk group rootdg creates two device node files that
can be used to access the volume:
• /dev/vx/dsk/volume_name (the block device node for the volume)
• /dev/vx/rdsk/volume_name (the raw device node for the volume)
For volumes in rootdg and disk groups other than rootdg, these names
include the disk group name, as follows:
• /dev/vx/dsk/diskgroup_name/volume_name
• /dev/vx/rdsk/diskgroup_name/volume_name
Volume Tasks 37
3
Creating a Concatenated Volume
By default, vxassist creates a concatenated volume that uses one or more
sections of disk space. On a fragmented disk, this allows you to put together a
volume larger than any individual section of free disk space available.
where volume_name is the name of the volume and length specifies the length of
the volume in sectors (unless another unit of size is specified with a suffix
character).
When you resize a volume, you can specify the length of a new volume in
sectors, kilobytes, megabytes, or gigabytes. The unit of measure is added as a
suffix to the length (s, m, k, or g). If no unit is specified, sectors are assumed.
You can use this command to create the volume voldefault with a length of
10 megabytes:
This creates a striped volume with the default stripe unit size on the default
number of disks.
You can indicate the disks on which the volumes are to be created by
specifying the disk names at the end of the command line. For example, to
create a 30 megabyte striped volume on three specific disks (disk03, disk04,
and disk05), use this command:
disk05
Volume Tasks 39
3
To create the RAID-5 volume volraid, use this command:
This creates a RAID-5 volume with the default stripe unit size on the default
number of disks. It also creates a RAID-5 log by default.
Resizing a Volume
Resizing a volume changes the volume size. This can be done by using either
vxassist, vxvol, or vxresize.
If the volume is not large enough for the amount of data that needs to be
stored in it, you need to extend the length of the volume. If a volume is
increased in size, vxassist automatically finds available disk space.
When you resize a volume, you can specify the length of a new volume in
sectors, kilobytes, megabytes, or gigabytes. The unit of measure is added as a
suffix to the length (s, m, k, or g). If no unit is specified, sectors are assumed.
CAUTION ! Do not shrink a volume below the size of the file system. If you
have a VxFS file system, you can shrink the file system and then shrink the
volume. If you do not shrink the file system first, you risk unrecoverable data
loss.
Make sure you do not shrink the volume below the current size of the file
system or database using the volume. This command can be safely used on
empty volumes.
Volume Tasks 41
3
vxassist shrinkby volcat 300
For example, to change the length to 100000 sectors, use this command:
Note: The vxvol set len command cannot increase the size of a volume
unless the needed space is available in the plexes of the volume. When the size
of a volume is reduced using the vxvol set len command, the freed space is
not released into the free space pool.
The read policy can be changed from round to prefer (or the reverse), or to a
different preferred plex. The vxvol rdpol command sets the read policy for a
volume.
For example, the command to set the read policy for volume vol01 to a round-
robin read is:
For example, the command to set the policy for vol01 to read preferentially
from the plex vol01-02 is:
If your volume is larger than you need it to be, you can shrink the size of the
volume.
Removing a Volume
Once a volume is no longer necessary (it is inactive and archived, for example),
you can remove the volume and free up the disk space for other uses.
umount /dev/vx/dsk/volume_name
Volume Tasks 43
3
4. Make sure that the volume is stopped with the command:
After following these steps, remove the volume with this command:
vxedit rm volume_name
or
The -r option indicates recursive removal, which means the removal of all
plexes associated with the volume and all subdisks associated with those
plexes. The -f option forces removal, and is necessary if the volume is
enabled.
You can also remove an entire volume with the vxassist command. Use the
keywords remove and volume and provide the volume name on the
command line as shown in this example:
Volume Manager objects that are associated with other objects are not
removable by vxedit. This means that vxedit cannot remove:
• a subdisk that is associated with a plex
• a plex that is associated with a volume
For detailed information about how to use vxedit, refer to the vxedit(1M)
manual page.
Mirroring a Volume
A mirror is a copy of a volume. The mirror copy is not stored on the same
disk(s) as the original copy of the volume. Mirroring a volume ensures that the
data in that volume is not lost if one of your disks fails.
vxassist creates one log plex for each log subdisk, by default. See the
VERITAS Volume Manager Getting Started Guide for more information on DRL.
For example:
Another way to mirror an existing volume is by first creating a plex and then
associating it with a volume, using these commands:
Volume Tasks 45
3
vxmake plex plex_name sd=subdisk_name ...
/etc/vx/bin/vxmirror -g diskgroup -a
You can also configure the Volume Manager to create mirrored volumes by
default. To do this, enter the command:
/etc/vx/bin/vxmirror -d yes
If you make this change, you can still make unmirrored volumes by specifying
nmirror=1 as an attribute to the vxassist command. For example, to create
an unmirrored 20-megabyte volume named nomirror, use the command:
To create a log for the RAID-5 volume volraid, use this command:
When vxassist is used to add a log subdisk to a volume, a log plex is also
created to contain the log subdisk by default.
Once created, the plex containing a log subdisk can be treated as a regular plex.
Data subdisks can be added to the log plex. The log plex and log subdisk can
be removed using the same procedures used to remove ordinary plexes and
subdisks.
Dissociate and remove the log from its volume in one operation with this
command:
where volume_name is the name of the RAID-5 volume. This results in output
that lists a plex with the STATE field of LOG.
To disassociate and remove the log plex volraid-02 from volraid, use this
command:
Volume Tasks 47
3
vxplex -o rm dis volraid-02
You can also remove a RAID-5 log with the vxassist command as follows:
Stopping a Volume
Stopping a volume affects its availability to the user. Stopping a volume makes
it unavailable.
vxvol stopall
To assist in choosing the revival source plex, list the unstarted volume and
display its plexes.
The vxmend command can change the state of an OFFLINE plex of a DISABLED
volume to STALE. Then a vxvol start on the volume revives the plex. To put
a plex named vol01-02 in the STALE state, use this command:
vxmend on vol01-02
Starting a Volume
Starting a volume affects its availability to the user. Starting a volume changes
its state and makes it available for use.
vxrecover -s
If all mirrors of the volume become STALE, you can place the volume in
maintenance mode. Then you can view the plexes while the volume is
DETACHED and determine which plex to use for reviving the others. To place a
volume in maintenance mode, use this command:
Volume Tasks 49
3
vxvol maint volume_name
To assist in choosing the revival source plex, list the unstarted volume and
display its plexes.
The vxmend command can change the state of an OFFLINE plex of a DISABLED
volume to STALE. Then a vxvol start on the volume revives the plex. To put
a plex named vol01-02 in the STALE state, use this command:
vxmend on vol01-02
vxinfo [volume_name]
You can back up a volume with vxassist by using the following procedure:
3. Create a snapshot volume that reflects the original volume at the time of the
snapshot.
The online backup procedure is completed by running the vxassist
snapshot command on the volume with the snapshot mirror. This task
detaches the finished snapshot mirror, creates a new normal volume, and
attaches the snapshot mirror to it. The snapshot then becomes a read-only
volume. This step should only take a few minutes.
Create a snapshot volume with this command:
vxassist snapshot volume_name new_volume_name
To create a snapshot volume of voldef, use this command:
vxassist snapshot voldef snapvol
The snapshot volume can now be used by backup utilities while the
original volume continues to be available for applications and users.
You can back up the snapshot volume by whatever means you prefer. To avoid
wasting space, you should remove the snapshot volume when your backup is
complete, The snapshot volume occupies as much space as the original
volume.
Recovering a Volume
A system crash or an I/O error can corrupt one or more plexes of a volume
and leave no plex CLEAN or ACTIVE. You can mark one of the plexes CLEAN
and instruct the system to use that plex as the source for reviving the others.
Volume Tasks 51
3
vxmend fix clean plex_name
For example, the command to place the plex named vol01-02 in the CLEAN
state is:
For information about how to use vxmend, refer to the vxmend(1M) manual
page. For more information on recovery, refer to the VERITAS Volume Manager
Administrator’s Reference Guide, Chapter 1, “Recovery.”
Removing a Mirror
When a mirror is no longer needed, you can remove it. Examples of tasks that
require removal of a mirror are:
• to provide free disk space
• reduce the number of mirrors in a volume to increase the length of another
mirror and its associated volume. The plexes and subdisks are removed,
then the resulting space can be added to other volumes
• remove a temporary mirror created to backup a volume and is no longer
required
• change the layout of a mirror from concatenated to striped, or back
Note: The last valid plex associated with a volume cannot be removed.
A mirror can be dissociated and removed from the associated volume with this
command:
Note: You can first dissociate the plex and subdisks, then remove them with
the commands:
vxplex dis plex_name
vxedit -r rm plex_name
Together, these commands accomplish the same as vxplex -o rm dis.
Moving Subdisks
Moving a subdisk copies the disk space contents of a subdisk onto another
subdisk. If the subdisk being moved is associated with a plex, then the data
stored on the original subdisk is copied to the new subdisk. The old subdisk is
dissociated from the plex, and the new subdisk is associated with the plex. The
association is at the same offset within the plex as the source subdisk. To move
a subdisk, use this command:
For the subdisk move task to work correctly, these conditions must be met:
• The subdisks involved must be the same size.
• The subdisk being moved must be part of an active plex on an active
(ENABLED) volume.
• The new subdisk must not be associated with any other plex.
Splitting Subdisks
Splitting a subdisk divides an existing subdisk into two subdisks. To split a
subdisk, use this command:
where:
• subdisk_name is the name of the original subdisk
• newsd1 is the name of the first of the two subdisks to be created
Volume Tasks 53
3
• newsd2 is the name of the second subdisk to be created
The –s option is required to specify the size of the first of the two subdisks to
be created. The second subdisk occupies the remaining space used by the
original subdisk.
If the original subdisk is associated with a plex before the task, upon
completion of the split, both of the resulting subdisks are associated with the
same plex.
To split the original subdisk into more than two subdisks, repeat the previous
command as many times as necessary on the resulting subdisks.
Joining Subdisks
Joining subdisks combines two or more existing subdisks into one subdisk. To
join subdisks, the subdisks must be contiguous on the same disk. If the selected
subdisks are associated, they must be associated with the same plex, and be
contiguous in that plex. To join a subdisk, use this command:
You can display the volume, plex, and subdisk record information for all
volumes in the system with this command:
vxprint -ht
You can display volume-related information for a specific volume with this
command:
vxprint -t volume_name
vxprint -t voldef
Volume Tasks 55
3
large enough to store the complete contents of the volume. The plex can be
larger than necessary, but if a plex that is too small is used, an incomplete copy
results.
Note: You can use the vxassist command to create a snapshot of a RAID-
5 volume by using the recommended approach to volume backup described in
this section.
The vxassist snapstart step creates a write-only backup plex which gets
attached to and synchronized with the volume. When synchronized with the
volume, the backup plex is ready to be used as a snapshot mirror. The end of
the update procedure is indicated by the new snapshot mirror changing its
state to SNAPDONE. This change can be tracked by the vxassist snapwait
task, which waits until at least one of the mirrors changes its state to
SNAPDONE. If the attach process fails, the snapshot mirror is removed and its
space is released.
3. Create a snapshot volume that reflects the original volume with this
command:
4. Use fsck (or some utility appropriate for the application running on the
volume) to clean the temporary volume’s contents. For example, you can
use this command:
fsck -y /dev/vx/rdsk/temp_volume_name
Volume Tasks 57
3
Introduction
This chapter describes how to maintain a system configuration under Volume
Manager control by using concepts and procedures that are normally “hidden”
from the casual user. Some procedures are managed automatically by higher
level commands such as vxassist.
59
4
Volume Administration Tasks
Volume Manager can be used to perform system and configuration
management tasks on its objects: disks, disk groups, subdisks, plexes, and
volumes. Volumes contain two types of objects:
• subdisk—a region of a physical disk
• plex—a series of subdisks linked together in an address space
Disks and disk groups must be initialized and defined to the Volume Manager
before volumes can be created. Volumes can be created in either of the
following ways:
• Automatically—you can create and manipulate volumes by using the
vxassist command. vxassist creates required plexes and subdisks by
using only the basic attributes of the desired volume as input. vxassist
can also modify existing volumes. It automatically modifies any underlying
or associated objects. vxassist uses default values for many volume
attributes, unless you provide specific values.
• Manually—you can create volumes by first creating the volume subdisks,
then the plexes, then the volume itself (a bottom-up approach). This
approach often requires detailed user input and an understanding of
Volume Manager concepts. Creating volumes manually is useful for
manipulating volumes with specific, non-default attributes. The manual
approach does not use the vxassist command.
Note: This section focuses on how to create and modify volumes using the
manual “bottom-up” approach. However, it can be more convenient to use the
automated vxassist approach to volume management.
Many of the concepts and procedures in this section are normally “hidden”
from the casual user. Some procedures are managed automatically by higher
level commands such as vxassist. Some of the commands and procedures
described are not normally performed by system administrators.
Before you create volumes, you should determine which volume layout best
suits your system needs. See the VERITAS Volume Manager Administrator’s
Reference Guide and the VERITAS Volume Manager Getting Started Guide for more
information about volume layouts.
Using vxassist
You can use the vxassist command to do volume management. vxassist is
an automated one-step interface to Volume Manager Tasks. Unlike some
Volume Manager commands, vxassist does not require a thorough
understanding of Volume Manager concepts.
vxassist can do tasks that would otherwise require the use of several other
Volume Manager commands. vxassist automatically performs all underlying
and related tasks that would otherwise be done by the user (in the form of
other commands).
vxassist obtains most of the information it needs from sources other than
your input. vxassist obtains information about the existing objects and their
layouts from the objects themselves.
For tasks requiring new disk space, vxassist seeks out available disk space
and allocates it in the configuration that conforms to the layout specifications
and that offers the best use of free space.
where keyword selects the task to perform. The first argument after a vxassist
keyword is a volume name, which is followed by a set of attributes. For details
on available vxassist keywords and attributes, refer to the vxassist(1M)
manual page.
vxassist Defaults
vxassist uses a set of tunable parameters that can be specified in the defaults
files or at the command line. The tunable parameters default to reasonable
values if they are not listed on the command line. Tunables listed on the
command line override those specified elsewhere. Here are the tunable
parameters:
• Internal defaults—The built-in defaults are used when the value for a
particular tunable is not specified elsewhere (on the command line or in a
defaults file).
• System-wide defaults file—The system-wide defaults file contains default
values that you can alter. These values are used for tunables that are not
specified on the command line or in an alternate defaults file.
• Alternate defaults file—A non-standard defaults file, specified with the
command vxassist -d alt_defaults_file.
• Command line—The tunable values specified on the command line
override any values specified internally or in defaults files.
Defaults File
The default behavior of vxassist is controlled by the tunables specified in the
/etc/default/vxassist file. The format of the defaults file is a list of
attribute=value pairs separated by new lines. These attribute=value pairs are the
same as those specified as options on the vxassist command line (refer to the
vxassist(1M) manual page for details).
# by default:
# create unmirrored, unstriped volumes
# allow allocations to span drives
# with RAID-5 create a log, with mirroring don’t create a log
# align allocations on cylinder boundaries
layout=nomirror,nostripe,span,nocontig,raid5log,noregionlog,
diskalign
# use 64K as the default stripe unit size for regular volumes
stripe_stwid=64k
# use 16K as the default stripe unit size for RAID-5 volumes
raid5_stwid=16k
Some vxdctl tasks involve modifications to the volboot file that indicates
the location of some root configuration copies.
For detailed information about how to use vxdctl, refer to the vxdctl(1M)
manual page.
where:
• the first operand (keyword) determines the kind of object to be created
• the second operand is the name given to that object
• additional operands specify attributes for the object
A description file is a file that contains plain text that describes the objects to be
created with vxmake. A description file can contain several commands, and
can be edited to perform a list of tasks. The description file is read from
standard input, unless the -d description_file option specifies a filename. The
following is a sample description file:
This description file specifies a volume with two plexes. The first plex has five
subdisks on physical disks. The second plex is preferred and has one subdisk
on a volatile memory disk.
For detailed information about how to use vxmake, refer to the vxmake(1M)
manual page.
For detailed information about how to use vxplex, refer to the vxplex(1M)
manual page.
Note: Some vxsd tasks can take a large amount of time to complete.
vxmend is used primarily to escape from a state that was accidentally reached.
The offline and online functions can be performed with disk-related
commands.
For detailed information about how to use vxmend, refer to the vxmend(1M)
manual page.
For detailed information about how to use vxprint, refer to the vxprint(1M)
manual page.
For detailed information about how to use vxstat, refer to the vxstat(1M)
manual page and the VERITAS Volume Manager Administrator’s Reference Guide,
Chapter 2, “VxVM Performance Monitoring.”
If no operands are given, then either all error trace data or all I/O trace data on
all virtual disk devices are reported. With error trace data, you can select all
accumulated error trace data, wait for new error trace data, or both (the
default). Selection can be limited to a specific disk group, to specific Volume
Manager kernel I/O object types, or to particular named objects or devices.
For detailed information about how to use vxtrace, refer to the vxtrace(1M)
manual page and the VERITAS Volume Manager Administrator’s Reference Guide,
Chapter 2, “VxVM Performance Monitoring.”
For detailed information about how to use vxvol, refer to “Changing the
Volume Read Policy” in Chapter 3, and the vxvol(1M) manual page.
Subdisk Tasks
Subdisks are low-level building blocks in a Volume Manager configuration.
The following sections describe tasks that you can perform on subdisks.
Subdisk tasks include:
• creating a subdisk
• removing a subdisk
• displaying subdisk information
• associating a subdisk
• associating log subdisks
• dissociating a subdisk
• changing a subdisk
• moving a subdisk
• splitting a subdisk
• joining subdisks
Creating Subdisks
You can use the vxmake command to create Volume Manager objects, such as
subdisks. When you create a subdisk, you must specify the:
• name of the subdisk
• length of the subdisk
• starting point (offset) of the subdisk within the disk
• disk media name
For example, the command to create a subdisk named disk02-01 that starts at
the beginning of disk disk02 and has a length of 8000 sectors is shown here:
Note: To preserve (encapsulate) any data that exists on the disk, a plex and
volume must be created to cover that data.
If you intend to use the new subdisk to build a volume, you must associate the
subdisk with a plex (see “Associating a Subdisk”). Subdisks for all plex layouts
(concatenated, striped, RAID-5) are created the same way.
Removing Subdisks
To remove a subdisk, use this command:
vxedit rm subdisk_name
For example, you can use this command to remove a subdisk named disk02-
01:
vxedit rm disk02-01
vxprint -st
You can display complete information about a particular subdisk by using this
command:
vxprint -l disk02-01
Associating Subdisks
Associating a subdisk with a plex places the amount of disk space defined by
the subdisk at a specific offset within the plex. The entire area that the subdisk
fills must not be occupied by any portion of another subdisk. There are several
ways that subdisks can be associated with plexes, depending on the overall
state of the configuration.
If you have already created all the subdisks needed for a particular plex,
associate subdisks at plex creation by using the command:
For example, the following command creates the plex home-1 and associates
subdisks disk02-01, disk02-00, and disk02-02 with plex home-1. This is
done during the plex creation process:
Subdisks are associated in order starting at offset 0. If you use this type of
command, you do not have to specify the multiple commands needed to create
the plex and then associate each of the subdisks with that plex. In this example,
the subdisks are associated to the plex in the order they are listed (after sd=).
The disk space defined as disk02-01 is first, the disk space disk02-00 is
second, and disk02-02 is third.
For example, you can use this command to associate subdisks named disk02-
01, disk02-00, and disk02-02 with a plex named home-1:
If the plex is not empty, the new subdisks are added after any subdisks that are
already associated with the plex, unless the -l option is specified with the
command. The -l option associates subdisks at a specific offset within the
plex.
The -l option is needed when you have created a sparse plex (that is, a plex
with a gap between its subdisks) for a particular volume, and want to make
this plex complete. To make the plex complete, you need to create a subdisk of
a size that fits the hole in the sparse plex exactly. Then you associate the
subdisk with the plex by specifying the offset of the beginning of the hole in
the plex. Use this command:
Note: The subdisk must be exactly the right size because Volume Manager
does not allow for the space defined by two subdisks to overlap within a single
plex.
For striped subdisks, you can specify a column number and column offset for
the subdisk:
If only one number is specified with the -l option for striped plexes, the
number is interpreted as a column number and the subdisk is associated at the
end of the column.
Note: Only one log subdisk can be associated with a plex. Because this log
subdisk is frequently written, care should be taken to position it on a disk that
is not heavily used. Placing a log subdisk on a heavily-used disk can degrade
system performance.
where subdisk is the name to be used as a log subdisk. The plex must be
associated with a mirrored volume before DRL takes effect.
For example, you can use this command to associate a subdisk named
disk02-01 with a plex named vol01-02 (which is already associated with
volume vol01):
Note: You can also use the following command to add a log subdisk to an
existing volume:
vxassist addlog volume_name disk
This command automatically creates a log subdisk within a log plex for the
specified volume.
Dissociating Subdisks
To break an established connection between a subdisk and the plex to which it
belongs, the subdisk is dissociated from the plex. A subdisk is dissociated when
the subdisk is removed or used in another plex. To dissociate a subdisk, use
this command:
For example, you can dissociate a subdisk named disk02-01 from the plex
with which it is currently associated, by using this command:
For example, here is the command to change the comment field of a subdisk
named disk02-01:
Note: Entering data in the putil0 field prevents the subdisk from being used
as part of a plex, if it is not already part of a plex.
Plex Tasks
Plexes are logical groupings of subdisks that create an area of disk space
independent of physical disk size or other restrictions. Replication (mirroring)
of disk data is done by creating multiple plexes for a single volume. Each plex
Creating Plexes
The vxmake command creates Volume Manager objects, such as plexes. When
you create a plex, you identify subdisks and associate them to the plex that you
want to create.
If you intend to use a plex to build a volume, you must associate the plex with
the volume (see “Associating Plexes,” for more information.
Associating Plexes
A plex becomes a participating plex for a volume by associating the plex with
the volume. To associate a plex with an existing volume, use this command:
If the volume has not been created, a plex (or multiple plexes) can be
associated with the volume to be created as part of the volume create
command:
Note: You can also use the following command on an existing volume to add
and associate a plex: vxassist mirror volume_name
A plex can be dissociated and removed from the associated volume with this
command:
Note: You can first dissociate the plex and subdisks, then remove them with
the commands:
vxplex dis plex_name
vxedit -r rm plex_name
Together, these commands accomplish the same as vxplex -o rm dis.
1. Optionally stop user activity for a short time to improve the consistency of
the backup.
8. Reassociate the backup plex with its original volume to regain redundancy
of the volume:
vxedit rm tempvol
To display detailed information about all plexes in the system, use this
command:
vxprint -lp
vxprint -l plex_name
The –t option prints a single line of information about the plex. To list free
plexes, use this command:
vxprint -pt
CAUTION ! Change plex attributes with extreme care, and only if necessary.
The vxedit command changes the attributes of plexes and other volume
Manager objects. To change plex attributes, use this command:
The comment field and the putil and tutil fields are used by Volume
Manager commands after plex creation. putil attributes are maintained on
reboot; tutil fields are temporary and are not retained on reboot.
Both putil and tutil have three functions and are numbered according to
those functions. These fields can be modified as needed. Volume Manager uses
the utility fields marked putil0 and tutil0. Other VERITAS products use
those marked putil1 and tutil1. Fields marked putil2 and tutil2 are
user fields. Table 1 lists the functions of the putil and tutil fields.
The command:
To prevent a particular plex from being associated with a volume, set the
putil0 field to a non-null string, as specified in this command:
If a disk has a head crash, you should put all plexes that have associated
subdisks on the affected disk OFFLINE. For example, if plexes vol01-02 and
vol02-02 had subdisks on a drive to be repaired, use this command:
This command places vol01-02 and vol02-02 in the OFFLINE state, and
they remain in that state until changed.
Detaching Plexes
To temporarily detach one plex in a mirrored volume, use this command:
For example, the command to temporarily detach a plex named vol01-02 and
place it in maintenance mode is:
This command temporarily detaches the plex, but maintains the association
between the plex and its volume. However, the plex is not used for I/O. A plex
detached with the preceding command is recovered at system reboot. The plex
state is set to STALE, so that if a vxvol start command is run on the
appropriate volume (for example, on system reboot), the contents of the plex is
recovered and made ACTIVE.
Attaching Plexes
When the disk has been repaired or replaced and is again ready for use, the
plexes must be put back online (plex state set to ACTIVE).
For example, the command for a plex named vol01-02 on a volume named
vol01 is:
This command starts to recover the contents of the plex and, after the revive is
complete, sets the plex utility state to ACTIVE.
vxmend on plex_name
vxmend on vol01-02
Moving Plexes
Moving a plex copies the data content from the original plex onto a new plex.
The command to move data from one plex to another is:
Copying Plexes
This task copies the contents of a volume onto a specified plex. The volume to
be copied cannot be enabled. The plex cannot be associated with any other
volume. To copy a plex, use this command:
Volume Tasks
A volume is a collection of up to 32 plexes. A volume appears as a block device
in the /dev/vx/dsk directory and a character device in the /dev/vx/rdsk
directory. A volume can be used as a partition device.
Note: This section provides information on general volume tasks. For details
on tasks specific to RAID-5 volumes, refer to “Performing Online Backup.” in
“Volume Tasks.”
Creating Volumes
Volumes can be created with the vxassist or vxmake commands. The easiest
way to create volumes is by using the vxassist command.
You can specify the length of a new volume in sectors, kilobytes, megabytes, or
gigabytes. The unit of size is added as a suffix to the length (s, m, k, or g). If no
unit is specified, sectors are assumed.
vxassist Command
You can use the vxassist command to create volumes with default settings
or with user-specified attributes. vxassist automatically creates and attempts
to enable new volumes. If the volume fails to be enabled, vxassist attempts
to remove it and releases the space used to allocate that volume.
For example, the following command creates a volume named voldef with a
length of 10 megabytes on any available disk(s):
You can specify additional parameters to vxassist to reflect the new volume
attributes. Refer to the vxassist(1M) manual page for details.
The following example shows how to create a volume named volzebra that is
striped across disk03 and disk04, has the fsgen usage type, and is 10
megabytes long:
vxmake Command
For detailed information about how to use vxmake, and an example of the
vxmake description files, refer to “Creating Volume Manager Objects With
vxmake” in this chapter or the vxmake(1M) manual page.
To create a volume with an attached plex using vxmake, use this command:
If you do not specify a length, the volume length is equal to the length of the
plex to which it is attached. You can select a length (less than or equal to the
length of the plex) by specifying a length with the len= parameter.
You can also create a volume without attaching a plex to it. You do this by
omitting the plex= parameter. In this case, you must specify a length. The
volume you create is not available for use until you attach a plex to it by using
vxplex att.
and
You can specify the usage type for a volume as either -Ufsgen or
use_type=fsgen. If you do not specify a length, or associated plexes are not
identified, the length is 0.
Instead of specifying parameters on the command line, you can use a vxmake
description file to create a volume, as well as associated subdisks and plexes,
by using this command:
vxmake -d description_file
Initializing Volumes
During normal system operation, volume and plex states are affected by
system failures, shutdowns, and possible I/O failures. When a volume is first
created, it is necessary to initialize the state of its plex(es) according the state of
the data on each plex.
Normally, if you have created the volume using vxassist or one of the other
higher-level interfaces, the state of the plexes is properly set. However, when
vxmake has been used to create a volume, the states of its plexes must be set
manually before the volume can be made available for use through the vxvol
start command. The command for setting the state of a volume plex is:
where the state variable determines what the initialization does and what
condition the volume and plexes have after the volume has been initialized.
The most common form of manual initialization is setting the state of the
volume to CLEAN. The following examples show how to do this for mirrored
and nonmirrored volumes. In the simplest case, in which a volume has been
created containing only one plex (mirror), the state of the plex is set to CLEAN.
This is because there is no need for any synchronization of the data on the disk.
Since there is only one plex in the volume, it is not necessary to specify the
plex_name argument.
Note: The rest of this initialization section applies only to mirrored volumes
(not RAID-5 volumes, which are discussed later).
For a newly-created mirror volume vol01, that has multiple plexes associated
with it, one of the plexes must be chosen to be synchronized with the other
plexes. For example, plex vol01-02 may have been created over disk space
that contained data that needed to be accessed after the volume is made
available. The following command synchronizes data with the other plexes
when the volume is started:
This command sets the state of vol01-02 to CLEAN and the remainder of the
plexes to STALE, so they are properly synchronized at the time the volume is
made available. You can avoid the initial synchronization of the volume to save
time, but only if you are certain that none of the plexes contain data that is the
final contents of the volume. In this case, you can temporarily initialize the
state of the volume so that the data can be loaded without having to perform a
synchronization first. The command to do this is:
This enables the volume and all its plexes, but leaves the plex utility states set
to EMPTY. After the entire contents of the volume have been restored, both
mirrors contain exactly the same data and do not need to be synchronized
using the vxvol start task. The volume (for example, home1) can be
initialized for use and started at the same time by using this command:
To determine the largest possible size for the volume to be created, use the
command:
For example, to determine the maximum size for a new RAID-5 volume on
available disks, enter:
This does not actually create the volume, but returns an output similar to this
example (in sectors, by default):
Maximum volume size: 376832 (184Mb)
If, however, a volume with the specified attributes cannot be created, an error
message is returned similar to this example:
vxvm:vxassist: ERROR: No volume can be created within the given
constraints
To determine how much an existing volume can grow, use the command:
does not actually resize the volume, but results in output similar to this
example:
Volume raidvol can be extended by 366592 to 1677312 (819Mb)
vxprint -vt
To limit the vxprint display to a single object, you can specify the object
name after the vxprint command.
vxprint -l volume_name
You can display detailed information for all volumes with this command:
vxprint -vl
To display the plexes for a volume named vol01, use this command:
This command displays the volume, its plexes, and the subdisks in those
plexes.
You can also display the plexes for vol01 with the command:
CAUTION ! Change volume attributes with extreme care and only if necessary.
There are two Volume Manager commands that set volume attributes:
• The vxedit command sets attributes that are not usage-type dependent.
• The vxvol command sets attributes that are usage-type dependent.
Note: Setting volume device permissions and ownership using the chgrp,
chown, and chmod commands does not work. It is necessary to use vxedit
set to modify these values.
For example, to change the owner of the group to susan and the permissions
to read/write for owner, group, and other:
Online Relayout
The vxassist command has been enhanced to include a new option named
Online Relayout. Relayout is used to change the configuration of a volume.
Relayout allows you to transform the storage characteristics of a volume
without interrupting data access to the volume.
Note that the data in the volume is always available during the transformation.
Since vxrelayout depends on vxassist to do the setup before a layout
transformation can be started, the vxassist command must be used to
initiate any layout transformation. The vxtask command can be used to
monitor the state of an ongoing transformation.
3. ncol specifies the number of columns in the new layout. The +/- operator
can be used to specify the number of columns to be added to or subtracted
from the original volume/plex.
5. tmpsize specifies the size of the scratch space (this is optional). vxassist
chooses the volume size as the tmpsize for volumes less than 50M. For
volumes greater than 50M, vxassist uses 50M. For volumes greater than
1G, the tmpsize is 1G. You can override the default values by specifying a
value for this parameter.
For example, if there is a stripe-mirror volume named vol, and you specify:
Note: vxassist also recognizes storage attributes that can be used in the
relayout operation. Refer to “Using vxassist” in this chapter for more
information on vxassist. For details on available vxassist keywords and
attributes, refer to the vxassist(1M) manual page.
The basic layouts are described in the VERITAS Volume Manager Getting Started
Guide.
To specify a volume so that the final volume has 5 columns, use this command:
RAID-5 to Mirroring
To change a RAID-5 volume to a stripe-mirrored volume, use this command:
The stripe-mirror and mirror-stripe layouts are treated the same by Relayout. If
you do not specify nmirror= number greater than 1, then Relayout generates a
stripe-mirror. If you specify nmirror=2(or greater), Relayout generates the
mirror-stripe layout that you specified.
In general, you can use the layout field to create any layout desired. This can
be used in combination with ncol and stwidth to exactly specify the final
volume characteristics.
Online Relayout can be applied only to disk groups with version 50 or above
(see the vxdg(1M) manual page) and only one disk group at a time.
The second operand is the name of the topmost volume to which the plex
undergoing relayout is attached. If there are multiple plexes in the volume, the
vxrelayout utility selects the appropriate plex using the supplied volume
name. It should be noted that there can only be one relayout operation
happening in a volume at any instant of time. A specific disk group can be
specified with -g diskgroup.
The rate of progress can be found by using the vxtask utility. The
characteristics of the storage transformation can be determined by using the
following command:
Transformation Details
You can use Online Relayout on one data plex in a volume or on the entire
volume. You cannot invoke multiple Relayout operations on multiple plexes in
a volume. There can only be one Relayout operation at a time in a volume.
Logs
A Relayout operation can render existing logs incompatible with the new
layout as a result of the transformation. For example, when a mirrored volume
with a DRL log is converted to a RAID-5 volume with RAID log, the DRL log
is removed and the RAID-5 log is used. If you specified that the RAID-5
volume should not have a log, then the DRL log is also removed.
Introduction
This chapter describes the menu-driven interface known as Volume Manager
Support Operations (or vxdiskadm). vxdiskadm is used to perform physical
and logical device administration.
101
5
• Replacing a Physical Disk
• Replacing a Failed or Removed Disk
• Volume Tasks
• Mirroring Volumes on a VM Disk
• Moving Volumes from a VM Disk
• Disk Group Tasks
• Adding a Disk to a Disk Group
• Creating a Disk Group
• Deporting a Disk Group
• Importing a Disk Group
• Exiting the Volume Manager Support Tasks
Starting vxdiskadm
To start vxdiskadm, enter:
vxdiskadm
vxdiskadm displays its main menu showing the tasks available to you.
3. Remove a disk.
You can remove a disk from a disk group. You are prompted for the
name of a disk to remove. You cannot remove a disk if any volumes use
storage on that disk. If any volumes are using storage on the disk, you
have the option of asking the Volume Manager to move that storage to
other disks in the disk group.
Note: You cannot remove the last disk in a disk group using this task. If you
wish to use all the remaining disks in a disk group for some purpose, you
should disable (deport) the disk group. You will then be able to reuse the disks.
rootdg cannot, however, be deported.
Note: Simply moving volumes off a disk, without also removing the disk,
does not prevent other volumes from being moved onto the disk by future
operations.
Note: Your system may use a device name that differs from the examples. See
Chapter 1, “Understanding Volume Manager,” in the VERITAS Volume Manager
Getting Started Guide, for more information on device names.
The device name (sometimes referred to as devname or disk access name) is the
location of the disk. The syntax of a device name is c#b#t#d#s#, where:
• c# is the number of the controller to which the disk drive is attached.
• b# is the corresponding bus number (if used on your system)
• t# is the number of the target disk on that controller.
• d# is the number of the disk.
• s# is the number of the disk slice.
Unless another disk group is specified, Volume Manager places new disks in
the default disk group, rootdg. Instructions on creating additional disk
groups are provided later in this chapter.
The sections that follow provide detailed examples of how to use vxdiskadm
to place disks under Volume Manager control in various ways and
circumstances.
1. Select menu item 1 (Add or initialize one or more disks) from the
vxdiskadm main menu.
2. At the following prompt, enter the disk device name of the disk to be added
to Volume Manager control (or enter list for a list of disks):
Use this operation to add one or more disks to a disk group. You
can add the selected disks to an existing disk group or to a new
disk group that will be created as a part of the operation. The
selected disks may also be added to a disk group as spares. The
selected disks may also be initialized without adding them to a
disk group leaving the disks available for use as replacement
disks.
More than one disk or pattern may be entered at the prompt. Here
are some disk selection examples:
3. To continue with the operation, enter y (or press Return) at the following
prompt:
Here is the disk selected. Output format: [Device_Name]
c1t2d0
Continue operation? [y,n,q,?] (default: y) y
4. At the following prompt, specify the disk group to which the disk should be
added or press Return to accept rootdg:
You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations. To create a new disk group,
select a disk group name that does not yet exist. To leave the
disk available for future use, specify a disk group name of
“none”.
Which disk group [<group>,none,list,q,?] (default: rootdg)
5. At the following prompt, either press Return to accept the default disk
name or enter a disk name:
Use a default disk name for the disk? [y,n,q,?] (default: y)
6. When vxdiskadm asks whether this disk should become a hot-relocation
spare, enter n (or press Return):
Add disk as a spare disk for rootdg? [y,n,q,?] (default: n) n
7. To continue with the operation, enter y (or press Return) at the following
prompt:
The selected disks will be added to the disk group rootdg with
default disk names.
c1t2d0
Continue with operation? [y,n,q,?] (default: y) y
Depending on the circumstances, all of the disks may not be processed the
same way. For example, some may be initialized, while others may be
encapsulated.
Place multiple disks under Volume Manager control at one time as follows:
1. Select menu item 1 (Add or initialize one or more disks) from the
vxdiskadm main menu.
2. At the following prompt, enter the pattern-list for the disks to be added to
Volume Manager control. In this case, enter c3 to indicate all disks on
controller 3:
Add or initialize disks
Menu: VolumeManager/Disk/AddDisks
Use this operation to add one or more disks to a disk group.
You can add the selected disks to an existing disk group or to
a new disk group that will be created as a part of the
operation. The selected disks may also be added to a disk
group as spares. The selected disks may also be initialized
without adding them to a disk group leaving the disks
available for use as replacement disks.
More than one disk or pattern may be entered at the prompt.
Here are some disk selection examples:
all: all disks
c3 c4t2: all disks on both controller 3 and
controller 4, target 2
c3t4d0: a single disk
Select disk devices to add:
[<pattern-list>,all,list,q,?] c3
where <pattern-list> can be a single disk, or a series of disks and/or
controllers (with optional targets). If <pattern-list> consists of multiple
items, those items must be separated by white space.
4. To add these disks to the default disk group, rootdg, enter y (or press
Return) at the following prompt:
5. To allow vxdiskadm to use default disk names for each of the disks, enter
y (or Press Return) at the following prompt:
Use default disk names for these disks? [y,n,q,?] (default: y) y
6. At the following prompt, enter n to indicate that these disks should not be
used as hot-relocation spares:
Add disks as spare disks for rootdg? [y,n,q,?] (default: n) n
7. To continue with the operation, enter y (or press Return) at the following
prompt:
The selected disks will be added to the disk group rootdg with
default disk names.
Note that this prompt allows you to indicate “yes” or “no” for all of these disks
(Y or N) or to select how to process each of these disks on an individual basis
(S).
If you are sure that you want to reinitialize all of these disks, enter Y at the
following prompt:
The following disks you selected for use appear to already have
been initialized for the Volume Manager. If you are certain the
disks already have been initialized for the Volume Manager, then
you do not need to reinitialize these disk devices.
Output format: [Device_Name]
The following disk device has a valid VTOC, but does not appear
to have been initialized for the Volume Manager. If there is
data on the disk that should NOT be destroyed you should
encapsulate the existing disk partitions as volumes instead of
adding the disk as a new disk. Output format: [Device_Name]
c3t0d0
Encapsulate this device? [y,n,q,?] (default: y) y
Note: Disk encapsulation requires that you reboot the system and may require
a few subsequent reboots. You will be prompted for these operations, as
necessary.
vxdiskadm now confirms those disks that are being initialized and added
to Volume Manager control with messages similar to the following:
Initializing device c3t1d0.
Initializing device c3t2d0.
Initializing device c3t3d0.
Adding disk device c3t1d0 to disk group rootdg with disk
name disk33.
In addition to the output displayed above, you may see prompts that give
you the option of performing surface analysis.
10. vxdiskadm then confirms any disks that have been selected for
encapsulation and prompts you for permission to proceed with the
encapsulation; enter y (or press Return) to continue encapsulation:
This will update the /etc/vfstab file so that volume devices are
used to mount the file systems on this disk device. You will
need to update any other references such as backup scripts,
databases, or manually created swap devices.
To reduce the chance of encapsulation failure, make sure that the disk:
• has a small amount of free space (at the beginning or end of the disk) that
does not belong to any partition
• has two free partitions
• has an s2 (or s0 on some systems) slice that represents the whole disk
On some systems, when encapsulating the boot (root) disk, the swap partition
should be tagged as swap so that it’s possible to dump to that partition later.
Note: Your system may use a device name that differs from the examples. See
Chapter 1, “Understanding Volume Manager,” in the VERITAS Volume Manager
Getting Started Guide, for more information on device names.
2. At the following prompt, enter the disk device name for the disks to be
encapsulated:
4. To add the disk to the default disk group, rootdg, press Return at the
following prompt:
You can choose to add this disk to an existing disk group or to
a new disk group. To create a new disk group, select a disk
group name that does not yet exist.
5. At the following prompt, either press Return to accept the default disk
name or enter a disk name:
Use a default disk name for the disk? [y,n,q,?] (default: y)
6. To continue with the operation, enter y (or press Return) at the following
prompt:
The selected disks will be encapsulated and added to the rootdg
disk group with default disk names.
c2t5d0
Continue with operation? [y,n,q,?] (default: y) y
Note that this type of “spare disk” should not be confused with a hot-
relocation spare disk.
If the disk you want to add has been used before, but not with Volume
Manager, you can do either of the following:
• Encapsulate the disk and preserve its information (see “Encapsulating a
Disk for Volume Manager Use”).
• Reinitialize the disk, allowing the Volume Manager to configure the disk for
Volume Manager. Note that reinitialization does not preserve data on the
disk. If you wish to have the disk reinitialized, make sure that the disk does
not contain data that should be preserved.
1. Select menu item 1 (Add or initialize one or more disks) from the
vxdiskadm main menu.
2. At the following prompt, enter the disk device name of the disk to be added
to Volume Manager control:
Add or initialize disks
Menu: VolumeManager/Disk/AddDisks
More than one disk or pattern may be entered at the prompt. Here
are some disk selection examples:
3. To continue with the operation, enter y (or press Return) at the following
prompt:
4. At the following prompt, specify the disk group to which the disk should be
added or press Return to accept rootdg:
You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations. To create a new disk group,
select a disk group name that does not yet exist. To leave the
disk available for future use, specify a disk group name of
“none”.
5. At the following prompt, either press Return to accept the default disk
name or enter a disk name:
Use a default disk name for the disk? [y,n,q,?] (default: y)
7. To continue with the operation, enter y (or press Return) at the following
prompt:
The selected disks will be added to the disk group rootdg with
default disk names.
c1t3d0
Continue with operation? [y,n,q,?] (default: y) y
8. The following prompt indicates that this disk has been previously
initialized for future Volume Manager use; enter y to confirm that you now
want to use this disk:
The following disk device appears to have been initialized
already. The disk is currently available as a replacement disk.
Output format: [Device_Name]
c1t3d0
Use this device? [y,n,q,?] (default: y) y
9. To reinitialize the disk, enter y (or press Return) at the following prompt:
The following disk you selected for use appears to already have
been initialized for the Volume Manager. If you are certain the
disk has already been initialized for the Volume Manager, then
you do not need to reinitialize the disk device.
Output format: [Device_Name]
c1t3d0
Reinitialize this device? [y,n,q,?] (default: y) y
1. Select menu item 12 (Mark a disk as a spare for a disk group) from
the vxdiskadm main menu.
To verify which disks are currently designated as spares, select the list menu
item from the vxdiskadm main menu. Disks that are spares are listed with the
spare flag.
1. Select menu item 13 (Turn off the spare flag on a disk) from the
vxdiskadm main menu.
2. At the following prompt, enter the name of a spare disk (such as disk01):
Turn off the spare flag on a disk
Menu: VolumeManager/Disk/UnmarkSpareDisk
2. At the following display, enter the address of the disk you want to see or
enter all for a list of all disks:
List disk information
Menu: VolumeManager/Disk/ListDisk
1. Select menu item 3 (Remove a disk) from the vxdiskadm main menu.
Note: You must disable the disk group before you can remove the last disk in
that group.
2. At the following prompt, enter the disk name of the disk to be removed:
Remove a disk
Menu: VolumeManager/Disk/RemoveDisk
3. If there are any volumes on the disk, the Volume Manager asks you whether
they should be evacuated from the disk. If you wish to keep the volumes,
answer y. Otherwise, answer n.
5. At the following prompt, indicate whether you want to remove other disks
(y) or return to the vxdiskadm main menu (n):
Remove another disk? [y,n,q,?] (default: n)
2. At the following prompt, enter the address of the disk you want to disable:
Disable (offline) a disk device
Menu: VolumeManager/Disk/OfflineDisk
Use this menu operation to disable all access to a disk device
by the Volume Manager. This operation can be applied only to
disks that are not currently in a disk group. Use this operation
if you intend to remove a disk from a system without rebooting.
NOTE: Many systems do not support disks that can be removed from
a system during normal operation. On such systems, the
offline operation is seldom useful.
2. At the following prompt, enter the device name of the disk to be enabled
(or enter list for a list of devices):
Enable (online) a disk device
Menu: VolumeManager/Disk/OnlineDisk
You can also use this operation to re-scan a disk that may have
been changed outside of the Volume Manager. For example, if a
disk is shared between two systems, the Volume Manager running
on the other system may have changed the disk. If so, you can
use this operation to re-scan the disk.
2. At the following prompt, enter the name of the disk to be replaced (or enter
list for a list of disks):
Remove a disk for replacement
Menu: VolumeManager/Disk/RemoveForReplace
initialized disks that are not part of a disk group, you will be
given the option of using one of these disks as a replacement.
Additional displays show any volumes associated with the disk you wish to
remove. You must decide whether to keep the data associated with the
volumes or to allow that data to be lost when the disk is replaced. Answer
any prompts accordingly.
3. At the following prompt, either select the device name of the replacement
disk (from the list provided) or press Return to choose the default disk:
The following devices are available as replacements:
c1t1d0
3. vxdiskadm displays the device names of the disk devices available for use
as replacement disks; enter the device name of the device of your choice or
press Return to select the default device:
Note: Your system may use a device name that differs from the examples. See
Chapter 1, “Understanding Volume Manager,” in the VERITAS Volume
Manaager Getting Started Guide, for more information on device names.
5. At the following prompt, indicate whether you want to replace another disk
(y) or return to the vxdiskadm main menu (n):
Replace another disk? [y,n,q,?] (default: n)
Note: This task only mirrors concatenated volumes. Volumes that are already
mirrored or that contain subdisks that reside on multiple disks are ignored.
To mirror volumes on a disk, make sure that the target disk has an equal or
greater amount of space as the originating disk and then do the following:
2. At the following prompt, enter the disk name of the disk that you wish to
mirror:
Mirroring volumes from the boot disk will produce a disk that
can be used as an alternate boot disk.
3. At the following prompt, enter the target disk name (this disk must be the
same size or larger than the originating disk):
You can choose to mirror volumes from disk disk02 onto any
available disk space, or you can choose to mirror onto a
specific disk. To mirror to a specific disk, select the name of
that disk. To mirror to any available disk space, select "any".
Note: Be sure to always specify the destination disk when you are creating an
alternate root disk. Otherwise, the Volume Manager selects a disk to be the
alternate root disk. However, your system may not be able to boot from that
disk.
1. Select menu item 7 (Move volumes from a disk) from the vxdiskadm
main menu.
2. At the following prompt, enter the disk name of the disk whose volumes
you wish to move:
Move volumes from a disk
Menu: VolumeManager/Disk/Evacuate
Use this menu operation to move any volumes that are using a
disk onto other disks. Use this menu immediately prior to
removing a disk, either permanently or for replacement. You can
specify a list of disks to move volumes onto, or you can move
the volumes to any available disk space in the same disk group.
After the following display, you can optionally specify a list of disks to
which the volume(s) should be moved.
You can now specify a list of disks to move onto. Specify a list
of disk media names (e.g., disk01) all on one line separated by
blanks. If you do not enter any disk media names, then the
volumes will be moved to any available space in the disk group.
As the volumes are moved from the disk, vxdiskadm displays the status of
the operation:
Move volume voltest ...
Move volume voltest-bk00 ...
When the volumes have all been moved, vxdiskadm displays the following
success message:
Evacuation of disk disk01 is complete.
4. At the following prompt, indicate whether you want to move volumes from
another disk (y) or return to the vxdiskadm main menu (n):
Move volumes from another disk? [y,n,q,?] (default: n)
Note: The Volume Manager supports a default disk group, rootdg, in which
all volumes are created if no further specification is given. All commands
default to rootdg as well.
A disk group can only be created along with a disk. A disk group must have at
least one disk associated with it.
1. Select menu item 1 (Add or initialize one or more disks) from the
vxdiskadm main menu.
2. At the following prompt, enter the disk device name of the disk to be added
to Volume Manager control:
3. To continue with the operation, enter y (or press Return) at the following
prompt:
Here is the disk selected. Output format: [Device_Name]
c1t2d0
Continue operation? [y,n,q,?] (default: y) y
4. At the following prompt, specify the disk group to which the disk should be
added (anotherdg, in this case):
You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations. To create a new disk group,
select a disk group name that does not yet exist. To leave the
disk available for future use, specify a disk group name of
“none”.
5. vxdiskadm confirms that no active disk group currently exists with the
same name and prompts for confirmation that you really want to create this
new disk group:
There is no active disk group named anotherdg.
Create a new group named anotherdg? [y,n,q,?] (default: y) y
8. To continue with the operation, enter y (or press Return) at the following
prompt:
A new disk group will be created named anotherdg and the
selected disks will be added to the disk group with default disk
names.
c1t2d0
Continue with operation? [y,n,q,?] (default: y) y
9. The following prompt appears if this disk was previously initialized for
future Volume Manager use; enter y to confirm that you now want to use
this disk:
The following disk device appears to have been initialized
already. The disk is currently available as a replacement disk.
Output format: [Device_Name]
c1t2d0
Use this device? [y,n,q,?] (default: y) y
If you are sure you want to reinitialize the disk, enter y (or press Return) at
the following prompt:
The following disk you selected for use appears to already have
been initialized for the Volume Manager. If you are certain the
disk has already been initialized for the Volume Manager, then
you do not need to reinitialize the disk device.
Output format: [Device_Name]
c1t2d0
Reinitialize this device? [y,n,q,?] (default: y) y
2. At the following prompt, enter the name of the disk group to be deported:
Remove access to (deport) a disk group
Menu: VolumeManager/Disk/DeportDiskGroup
You will be prompted for the name of a disk group. You will also
be asked if the disks should be disabled (offlined). For
removable disk devices on some systems, it is important to
disable all access to the disk before removing the disk.
3. At the following prompt, enter y if you intend to remove the disks in this
disk group:
The requested operation is to disable access to the removable
disk group named newdg. This disk group is stored on the
following disks:
newdg01 on device c1t1d0s2
5. At the following prompt, indicate whether you want to disable another disk
group (y) or return to the vxdiskadm main menu (n):
Disable another disk group? [y,n,q,?] (default: n)
3. At the following prompt, indicate whether you want to import another disk
group (y) or return to the vxdiskadm main menu (n):
Select another disk group? [y,n,q,?] (default: n)
143
a disk group, 105, 140 moving volumes from, 105
description file, 66 removing, 21, 104
device name, 107 replacing, 104, 130
reserving, 16
devname, 107
taking offline, 19
Dirty Region Logging, 46
reinitializing, 121
log subdisks, 74
removing, 127
disabling root disk, 20
a disk, 106, 128 VM
a disk group, 105, 140 creating a volume on, 38
disk access name, 107 displaying
disk groups disk group information, 32
adding a disk, 136 disk information, 22, 126
creating, 25, 136, 137 free disk space, 5
default, 25, 137 multipath information, 23
deporting, 140 volume configuration, 54
disabling, 140 displaying subdisks
displaying information, 32 vxprint, 71
enabling, 105
dissociating mirrors
importing, 32, 141
vxplex, 52, 78
initializing, 25, 137
DMP configuration, 65
moving, 32
renaming, 30 DRL, 46
disk information, displaying, 126
disk media name, 107 E
disks, 107 enabling
adding for future use, 121 a disk, 106, 129
boot disk, 20 a disk group, 105
disabling, 128 access to a disk group, 141
displaying information, 126 encapsulating a disk, 103
enabling, 129
encapsulating disks, 117
encapsulation, 103, 117
encapsulation, 103, 117
hot-relocation spares, 15, 124
mirroring volumes on, 133 exiting
moving volumes from, 135 vxdiskadm, 142
physical
adding, 12, 103 F
adding to disk group, 17
free space
bringing under VxVM control, 12
displaying, 5
disabling, 106
displaying information, 22
enabling, 106
listing information, 106
Index 145
permission, 92 S
plexes size
attach, 67 volumes
attaching, 82, 83 decreasing, 43
changing information, 80 increasing, 40
copying, 84
slice, 107
creating, 76
detach, 67 snapshot, 56, 57
detaching, 82 RAID-5, 56
displaying, 80 spanned volume
listing, 80 creating, 38
moving, 84 splitting subdisks
offline, 49, 50 vxsd, 53
online, 49, 50 starting
putil, 80 vxdiskadm, 102
striped volume
creating, 39
R
subdisks, 60
RAID-5 associating, 72, 73
snapshot, 56 changing information, 75
RAID-5 log, 46 creating, 70
RAID-5 volume displaying, 71
creating, 39 dissociating, 74
recovery joining, 54
volumes, 51 log, 73
reinitializing disks, 121 moving, 53
removing operations, 70
a disk, 104, 127 removing, 71
a DRL, 46 splitting, 53
a physical disk, 21
a RAID-5 log, 47 T
a volume, 43
tutil, 80
removing mirrors, 52
removing subdisks
vxedit, 71 U
replacing a disk, 104, 130 UNIX partition, 107
reserving disks for special purposes, 16 utility descriptions
root disk vxassist, 61
mirroring, 20 vxdctl, 65
vxedit, 44
vxmake, 65
vxmend, 68
Index 147
vxmend, 49, 50, 52, 68, 82, 83
vxplex, 46, 53, 67, 77, 78, 79, 82, 83, 84
copying mirrors, 85
description of, 67
dissociating mirrors, 52, 78
moving mirrors, 84
vxprint, 3, 54, 68, 71, 80, 90
description of, 68
displaying subdisks, 71
listing mirrors, 80
vxrecover
moving disk groups, 32
vxsd, 53, 67, 73, 74
associating log subdisks, 74
associating subdisks, 73
description of, 67
joining subdisks, 54
moving subdisks, 53
splitting subdisks, 53
vxstat, 68
description of, 68
vxtrace, 69
VxVM, 1
vxvol, 40, 42, 69, 83, 87, 88
description of, 69