Previous  |  Next  >  
Product: Volume Manager Guides   
Manual: Volume Manager 4.1 Administrator's Guide   

Appendix: Commands Summary

This appendix summarizes the usage and purpose of important commonly used commands in VERITAS Volume Manager (VxVM). References are included to longer descriptions in the remainder of this book.

Most commands (excepting daemons, library commands and supporting scripts) are linked to the /usr/sbin directory from the /opt/VRTS/bin directory. It is recommended that you add the following directories to your PATH environment variable:

  • If you are using the Bourne or Korn shell (sh or ksh), use the commands:

  •    $ PATH=$PATH:/usr/sbin:/opt/VRTS/bin:/opt/VRTSvxfs/sbin:\
       /opt/VRTSdbed/bin:/opt/VRTSdb2ed/bin:/opt/VRTSsybed/bin:\
       /opt/VRTSob/bin
       MANPATH=/usr/share/man:/opt/VRTS/man:$MANPATH
       $ export PATH MANPATH
  • If you are using a C shell (csh or tcsh), use the commands:

  •    % set path = ( $path /usr/sbin /opt/VRTSvxfs/sbin \
       /opt/VRTSdbed/bin /opt/VRTSdb2ed/bin /opt/VRTSsybed/bin \
       /opt/VRTSob/bin /opt/VRTS/bin )
       setenv MANPATH /usr/share/man:/opt/VRTS/man:$MANPATH
    Note   Note    If you have not installed database software, you can omit /opt/VRTSdbed/bin, /opt/VRTSdb2ed/bin and /opt/VRTSsybed/bin. Similarly, /opt/VRTSvxfs/bin is only required to access some VxFS commands.

VxVM library commands and supporting scripts are located under the /usr/lib/vxvm directory hierarchy. You can include these directories in your path if you need to use them on a regular basis.

For detailed information about an individual command, refer to the appropriate manual page in the 1M section. A list of manual pages is provided in Online Manual Pages. Commands and scripts that are provided to support other commands and scripts, and which are not intended for general use, are not located in /opt/VRTS/bin and do not have manual pages.

The following tables summarize the commonly used commands:

Obtaining Information About Objects in VxVM

Command Description

vxdctl license

List licensed features of VxVM.

vxdisk [-g diskgroup] list [diskname]

Lists disks under control of VxVM. See Displaying Disk Information.

Example:

# vxdisk -g mydg list

vxdg list [diskgroup]

Lists information about disk groups. See Displaying Disk Group Information.

Example:

# vxdg list mydg

vxdg -s list

Lists information about shared disk groups. See Listing Shared Disk Groups.

Example:

# vxdg -s list

vxinfo [-g diskgroup] [volume ...]

Displays information about the accessibility and usability of volumes. See "Listing Unstartable Volumes" in the VERITAS Volume Manager Troubleshooting Guide.

Example:

# vxinfo -g mydg myvol1 myvol2

vxprint -hrt [-g diskgroup] [object]

Prints single-line information about objects in VxVM. See Displaying Volume Information.

Example:

# vxprint -g mydg myvol1 myvol2

vxprint -st [-g diskgroup] [subdisk]

Displays information about subdisks. See Displaying Subdisk Information.

Example:

# vxprint -st -g mydg

vxprint -pt [-g diskgroup] [plex]

Displays information about plexes. See Displaying Plex Information.

Example:

# vxprint -pt -g mydg

Administering Disks

Command Description

vxdiskadm

Administers disks in VxVM using a menu-based interface.

vxdiskadd [devicename ...]

Adds a disk specified by device name. See Using vxdiskadd to Place a Disk Under Control of VxVM.

Example:

# vxdiskadd c0t1d0

vxedit [-g diskgroup] rename olddisk \ newdisk

Renames a disk under control of VxVM. See Renaming a Disk.

Example:

# vxedit -g mydg rename mydg03 \ mydg02

vxedit [-g diskgroup] set \ reserve=on|off diskname

Sets aside/does not set aside a disk from use in a disk group. See Reserving Disks.

Examples:

# vxedit -g mydg set reserve=on \ mydg02

# vxedit -g mydg set reserve=off \ mydg02

vxedit [-g diskgroup] set \ nohotuse=on|off diskname

Does not/does allow free space on a disk to be used for hot-relocation. See Excluding a Disk from Hot-Relocation Use and Making a Disk Available for Hot-Relocation Use.

Examples:

# vxedit -g mydg set nohotuse=on \ mydg03

# vxedit -g mydg set nohotuse=off \ mydg03

vxedit [-g diskgroup] set \ spare=on|off diskname

Adds/removes a disk from the pool of hot-relocation spares. See Marking a Disk as a Hot-Relocation Spare and Removing a Disk from Use as a Hot-Relocation Spare.

Examples:

# vxedit -g mydg set spare=on \ mydg04

# vxedit -g mydg set spare=off \ mydg04

vxdisk offline devicename

Takes a disk offline. See Taking a Disk Offline.

Example:

# vxdisk offline c0t1d0

vxdg -g diskgroup rmdisk diskname

Removes a disk from its disk group. See Removing a Disk from a Disk Group.

Example:

# vxdg -g mydg rmdisk c0t2d0

vxdiskunsetup devicename

Removes a disk from control of VxVM. See Removing a Disk from a Disk Group.

Example:

# vxdiskunsetup c0t3d0

Creating and Administering Disk Groups

Command Description

vxdg [-s] init diskgroup [diskname=]devicename

Creates a disk group using a pre-initialized disk. See Creating a Disk Group and Creating a Shared Disk Group.

Example:

# vxdg init mydg mydg01=c0t1d0

vxsplitlines -g diskgroup

Reports conflicting configuration information. See Handling Conflicting Configuration Copies in a Disk Group.

Example:

# vxsplitlines -g mydg

vxdg [-n newname] deport diskgroup

Deports a disk group and optionally renames it. See Deporting a Disk Group.

Example:

# vxdg -n newdg deport mydg

vxdg [-n newname] import diskgroup

Imports a disk group and optionally renames it. See Importing a Disk Group.

Example:

# vxdg -n newdg import mydg

vxdg [-n newname] -s import diskgroup

Imports a disk group as shared by a cluster, and optionally renames it. See Importing Disk Groups as Shared.

Example:

# vxdg -n newsdg -s import mysdg

vxdg [-o expand] listmove sourcedg \ targetdg object ...

Lists the objects potentially affected by moving a disk group. See Listing Objects Potentially Affected by a Move.

Example:

# vxdg -o expand listmove mydg \ newdg myvol1

vxdg [-o expand] move sourcedg \ targetdg object ...

Moves objects between disk groups. See Moving Objects Between Disk Groups.

Example:

# vxdg -o expand move mydg newdg \ myvol1

vxdg [-o expand] split sourcedg \ targetdg object ...

Splits a disk group and moves the specified objects into the target disk group. See Splitting Disk Groups.

Example:

# vxdg -o expand split mydg newdg \ myvol2 myvol3

vxdg join sourcedg targetdg

Joins two disk groups. See Joining Disk Groups.

Example:

# vxdg join newdg mydg

vxdg -g diskgroup set \ activation=ew|ro|sr|sw|off

Sets the activation mode of a shared disk group in a cluster. See Changing the Activation Mode on a Shared Disk Group.

Example:

# vxdg -g mysdg set activation=sw

vxrecover -g diskgroup -sb

Starts all volumes in an imported disk group. See Moving Disk Groups Between Systems for an example of its use.

Example:

# vxrecover -g mydg -sb

vxdg destroy diskgroup

Destroys a disk group and releases its disks. See Destroying a Disk Group.

Example:

# vxdg destroy mydg

Creating and Administering Subdisks

Command Description

vxmake [-g diskgroup] sd subdisk \ diskname,offset,length

Creates a subdisk. See Creating Subdisks.

Example:

# vxmake -g mydg sd mydg02-01 \ mydg02,0,8000

vxsd [-g diskgroup] assoc plex \ subdisk...

Associates subdisks with an existing plex. See Associating Subdisks with Plexes.

Example:

# vxsd -g mydg assoc home-1 \ mydg02-01 mydg02-00 mydg02-01

vxsd [-g diskgroup] assoc plex \ subdisk1:0 ... subdiskM:N-1

Adds subdisks to the ends of the columns in a striped or RAID-5 volume. See Associating Subdisks with Plexes.

Example:

# vxsd -g mydg assoc vol01-01 \ mydg10-01:0 mydg11-01:1 mydg12-01:2

vxsd [-g diskgroup] mv oldsubdisk \ newsubdisk ...

Replaces a subdisk. See Moving Subdisks.

Example:

# vxsd -g mydg mv mydg01-01 \ mydg02-01

vxsd [-g diskgroup] -s size split \ subdisk sd1 sd2

Splits a subdisk in two. See Splitting Subdisks.

Example:

# vxsd -g mydg -s 1000m split \ mydg03-02 mydg03-02 mydg03-03

vxsd [-g diskgroup] join sd1 sd2 ... \ subdisk

Joins two or more subdisks. See Joining Subdisks.

Example:

# vxsd -g mydg join mydg03-02 \ mydg03-03 mydg03-02

vxassist [-g diskgroup] move \

volume !olddisk newdisk

Relocates subdisks in a volume between disks. See Moving and Unrelocating Subdisks Using vxassist.

Example:

# vxassist -g mydg move myvol !mydg02 mydg05

vxunreloc [-g diskgroup] original_disk

Relocates subdisks to their original disks. See Moving and Unrelocating Subdisks Using vxunreloc.

Example:

# vxunreloc -g mydg mydg01

vxsd [-g diskgroup] dis subdisk

Dissociates a subdisk from a plex. See Dissociating Subdisks from Plexes.

Example:

# vxsd -g mydg dis mydg02-01

vxedit [-g diskgroup] rm subdisk

Removes a subdisk. See Removing Subdisks.

Example:

# vxedit -g mydg rm mydg02-01

vxsd [-g diskgroup] -o rm dis subdisk

Dissociates and removes a subdisk from a plex. See Dissociating Subdisks from Plexes.

Example:

# vxsd -g mydg -o rm dis mydg02-01

Creating and Administering Plexes

Command Description

vxmake [-g diskgroup] plex plex \ sd=subdisk1[,subdisk2,...]

Creates a concatenated plex. See Creating Plexes.

Example:

# vxmake -g mydg plex vol01-02 \ sd=mydg02-01,mydg02-02

vxmake [-g diskgroup] plex plex \ layout=stripe|raid5 stwidth=W \ ncolumn=N sd=subdisk1[,subdisk2,...]

Creates a striped or RAID-5 plex. See Creating a Striped Plex.

Example:

# vxmake -g mydg plex pl-01 \ layout=stripe stwidth=32 \
ncolumn=2 sd=mydg01-01,mydg02-01

vxplex [-g diskgroup] att volume plex

Attaches a plex to an existing volume. See Attaching and Associating Plexes and Reattaching Plexes.

Example:

# vxplex -g mydg att vol01 vol01-02

vxplex [-g diskgroup] det plex

Detaches a plex. See Detaching Plexes.

Example:

# vxplex -g mydg det vol01-02

vxmend [-g diskgroup] off plex

Takes a plex offline for maintenance. See Taking Plexes Offline.

Example:

# vxmend -g mydg off vol02-02

vxmend [-g diskgroup] on plex

Re-enables a plex for use. See Reattaching Plexes.

Example:

# vxmend -g mydg on vol02-02

vxplex [-g diskgroup] mv oldplex newplex

Replaces a plex. See Moving Plexes.

Example:

# vxplex -g mydg mv vol02-02 \ vol02-03

vxplex [-g diskgroup] cp volume newplex

Copies a volume onto a plex. See Copying Plexes.

Example:

# vxplex -g mydg cp vol02 vol03-01

vxmend [-g diskgroup] fix clean plex

Sets the state of a plex in an unstartable volume to CLEAN. See Reattaching Plexes.

Example:

# vxmend -g mydg fix clean vol02-02

vxplex [-g diskgroup] -o rm dis plex

Dissociates and removes a plex from a volume. See Dissociating and Removing Plexes.

Example:

# vxplex -g mydg -o rm dis vol03-01

Creating Volumes

Command Description

vxassist [-g diskgroup] maxsize \ layout=layout [attributes]

Displays the maximum size of volume that can be created. See Discovering the Maximum Size of a Volume.

Example:

# vxassist -g mydg maxsize \ layout=raid5 nlog=2

vxassist -b [-g diskgroup] make \ volume length [layout=layout ] [attributes]

Creates a volume. See Creating a Volume on Any Disk and Creating a Volume on Specific Disks.

Example:

# vxassist -b -g mydg make myvol \ 20g layout=concat mydg01 mydg02

vxassist -b [-g diskgroup] make \ volume length layout=mirror \ [nmirror=N] [attributes]

Creates a mirrored volume. See Creating a Mirrored Volume.

Example:

# vxassist -b -g mydg make mymvol \ 20g layout=mirror nmirror=2

vxassist -b [-g diskgroup] make \ volume length layout=layout \ exclusive=on [attributes]

Creates a volume that may be opened exclusively by a single node in a cluster. See Creating Volumes with Exclusive Open Access by a Node.

Example:

# vxassist -b -g mysdg make \ mysmvol 20g layout=mirror \ exclusive=on

vxassist -b [-g diskgroup] make \ volume length layout={stripe|raid5} \ [stripeunit=W] [ncol=N] [attributes]

Creates a striped or RAID-5 volume. See Creating a Striped Volume and Creating a RAID-5 Volume.

Example:

# vxassist -b -g mydg make mysvol \ 20g layout=stripe stripeunit=32 ncol=4

vxassist -b [-g diskgroup] make \ volume length layout=mirror \ mirror=ctlr [attributes]

Creates a volume with mirrored data plexes on separate controllers. See Mirroring across Targets, Controllers or Enclosures.

Example:

# vxassist -b -g mydg make mymcvol \ 20g layout=mirror mirror=ctlr

vxmake -b [-g diskgroup] -Uusage_type \ vol volume [len=length] plex=plex,...

Creates a volume from existing plexes. See Creating a Volume Using vxmake.

Example:

# vxmake -g mydg -Uraid5 vol r5vol \ plex=raidplex,raidlog1,raidlog2

vxvol [-g diskgroup] start volume

Initializes and starts a volume for use. See Initializing and Starting a Volume and Starting a Volume.

Example:

# vxvol -g mydg start r5vol

vxvol [-g diskgroup] init zero volume

Initializes and zeros out a volume for use. See Initializing and Starting a Volume.

Example:

# vxvol -g mydg init zero myvol

Administering Volumes

Command Description

vxassist [-g diskgroup] mirror volume \ [attributes]

Adds a mirror to a volume. See Adding a Mirror to a Volume.

Example:

# vxassist -g mydg mirror myvol \ mydg10

vxassist [-g diskgroup] remove mirror \ volume [attributes]

Removes a mirror from a volume. See Removing a Mirror.

Example:

# vxassist -g mydg remove \ mirror myvol !mydg11

vxassist [-g diskgroup] {growto|growby}\ volume length

Grows a volume to a specified size or by a specified amount. See Resizing Volumes using vxassist.

Example:

# vxassist -g mydg growby myvol \ 10g

vxassist [-g diskgroup] \

{shrinkto|shrinkby} volume length

Shrinks a volume to a specified size or by a specified amount. See Resizing Volumes using vxassist.

Example:

# vxassist -g mydg shrinkto myvol \ 20g

vxresize -b -F xvfs [-g diskgroup] \ volume length diskname ...

Resizes a volume and the underlying VERITAS File System. See Resizing Volumes using vxresize.

Example:

# vxassist -b -F vxfs -g mydg \ myvol 20g mydg10 mydg11

vxsnap [-g diskgroup] prepare volume \

[drl=on|sequential|off]

Prepares a volume for instant snapshots and for DRL logging. See Preparing a Volume for DRL and Instant Snapshots.

Example:

# vxsnap -g mydg prepare myvol \ drl=on

vxsnap [-g diskgroup] make \ source=volume/newvol=snapvol\ [/nmirror=number]

Takes a full-sized instant snapshot of a volume by breaking off plexes of the original volume. See Creating Instant Snapshots.

Example:

# vxsnap -g mydg make \ source=myvol/newvol=mysnpvol\
/nmiror=2

vxsnap [-g diskgroup] make \ source=volume/snapvol=snapvol

Takes a full-sized instant snapshot of a volume using a prepared empty volume. See Creating a Volume for Use as a Full-Sized Instant Snapshot and Creating Instant Snapshots.

Example:

# vxsnap -g mydg make \ source=myvol/snapvol=snpvol

vxmake [-g diskgroup] cache \
cache_object cachevolname=volume \ [regionsize=size]

Creates a cache object for use by space-optimized instant snapshots. See Creating a Shared Cache Object. A cache volume must have already been created, as shown in this example:

# vxassist -g mydg make cvol 1g \ layout=mirror init=active \ mydg16 mydg17

# vxmake -g mydg cache cobj \ cachevolname=cvol

vxsnap [-g diskgroup] make \ source=volume/newvol=snapvol\ /cache=cache_object

Takes a space-optimized instant snapshot of a volume. See Creating Instant Snapshots.

Example:

# vxsnap -g mydg make \ source=myvol/newvol=mysosvol\
/cache=cobj

vxsnap [-g diskgroup] refresh snapshot

Refreshes a snapshot from its original volume. See Refreshing an Instant Snapshot (vxsnap refresh).

Example:

# vxsnap -g mydg refresh mysnpvol

vxsnap [-g diskgroup] dis snapshot

Turns a snapshot into an independent volume. See Dissociating an Instant Snapshot (vxsnap dis).

Example:

# vxsnap -g mydg dis mysnpvol

vxsnap [-g diskgroup] unprepare volume

Removes support for instant snapshots and DRL logging from a volume. See Removing Support for DRL and Instant Snapshots from a Volume.

Example:

# vxsnap -g mydg unprepare myvol

vxassist [-g diskgroup] relayout volume \ [layout=layout] [relayout_options]

Performs online relayout of a volume. See Performing Online Relayout.

Example:

# vxassist -g mydg relayout \ vol2 layout=stripe

vxassist [-g diskgroup] relayout volume \ layout=raid5 stripeunit=W ncol=N

Relays out a volume as a RAID-5 volume with stripe width W and N columns. See Performing Online Relayout.

Example:

# vxassist -g mydg relayout \ vol3 layout=raid5 \ stripeunit=16 ncol=4

vxrelayout [-g diskgroup] -o bg reverse \ volume

Reverses the direction of a paused volume relayout. See Controlling the Progress of a Relayout.

Example:

# vxrelayout -g mydg -o bg \ reverse vol3

vxassist [-g diskgroup] convert volume \ [layout=layout] [convert_options]

Converts between a layered volume and a non-layered volume layout. See Converting Between Layered and Non-Layered Volumes.

Example:

# vxassist -g mydg convert vol3 \ layout=stripe-mirror

vxassist [-g diskgroup] remove volume \ volume

Removes a volume. See Removing a Volume.

Example:

# vxassist -g mydg remove myvol

Monitoring and Controlling Tasks

Command Description

command [-g diskgroup] -t tasktag [options] [arguments]

Specifies a task tag to a VxVM command. See Specifying Task Tags.

Example:

# vxrecover -g mydg -t mytask -b \ mydg05

vxtask [-h] [-g diskgroup] list

Lists tasks running on a system. See vxtask Usage.

Example:

# vxtask -h -g mydg list

vxtask monitor task

Monitors the progress of a task. See vxtask Usage.

Example:

# vxtask monitor mytask

vxtask pause task

Suspends operation of a task. See vxtask Usage.

Example:

# vxtask pause mytask

vxtask -p [-g diskgroup] list

Lists all paused tasks. See vxtask Usage.

Example:

# vxtask -p -g mydg list

vxtask resume task

Resumes a paused task. See vxtask Usage.

Example:

# vxtask resume mytask

vxtask abort task

Cancels a task and attempts to reverse its effects. See vxtask Usage.

Example:

# vxtask abort mytask

 ^ Return to Top Previous  |  Next  >  
Product: Volume Manager Guides  
Manual: Volume Manager 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com