VxVm cheat sheet

These are the commonly used commands used for Semantec’s Veritas Volume Manager. The compilation is most accurate and have been compiled from live server use. Hope, you find this cheatsheet most helpful.

Disk Commands

Operation Command Example
Initialise Disks vxdisksetup vxdisksetup -i c0t0d0
Un-Initialise Disks vxdiskunsetup vxdiskunsetup -C c0t0d0
List Disks vxdisk list
List Disk Header vxdisk list vxdisk list disk1
List Disk Private Region vxprivutil list vxprivutil list /dev/rdsk/c0t0d0s2
Reserve a disk vxedit vxedit -g my-dg set reserve=on my-disk


Disk Group Commands


Operation Command Example
Create disk group vxdg init vxdg init my-dg disk01=c4t4d4
Remove Disk Group vxdg destroy vxdg destroy my-dg
Add disk vxdg adddisk vxdg -g my-dg adddisk disk02=c1t5d0
Remove disk vxdg rmdisk vxdg -g my-dg rmdisk disk02
Import Disk group vxdg import vxdg import otherdg
Deport Disk group vxdg deport vxdg deport my-dg
List Disk Groups vxdg list
List Free Space vxdg free vxdg -g my-dg free
List Total Free Space vxassist vxassist -g my-dg maxsize layout=concat


Plex Commands


Operation Command Example
Create a plex vxmake vxmake -g my-dg plex my-plex sd=my-sd
Associate a plex vxplex vxplex -g my-dg att my-vol my-plex
Dis-associate a plex vxplex vxplex -g my-dg dis my-plex
Attach a plex vxplex vxplex -g my-dg att my-vol my-plex
Detach a plex vxplex vxplex -g my-dg det my-plex
List Plexes vxprint vxprint -lp
Remove a plex vxedit vxedit -g my-dg rm my-plex


Subdisk commands


Operation Command Example
Create subdisk vxmake sd vxmake -g my-dg my-sd disk1,1,5000
Remove Subdisk vxedit rm vxedit -g my-dg rm -my-sd
Display subdisk info vxprint -st
Associate subdisk to plex vxsd assoc vxsd -g my-dg assoc my-plex my-sd
Disassociate subdisk vxsd dis vxsd -g my-dg dis my-sd


Volume Commands


Operation Command Example
Create a volume vxassist vxassist -g my-dg make my-vol 1Gvxassist make my-vol 1G layout=stripe
Delete a volume vxedit vxedit -g my-dg -r rm my-vol
Display volume info vxprint vxprint -g my-dg -vt
Display volume info vxinfo vxinfo -g my-dg my-vol
Resize a volume vxassist vxassist -g my-dg growto my-vol 2Gvxassist -g my-dg growby my-vol 600M
Start a volume vxvol vxvol -g my-dg start my-vol
Stop a volume vxvol vxvol -g my-dg stop my-vol
Initialise a volume vxvol vxvol -g my-dg init active my-vol
Recover a volume vxrecover vxrecover -g my-dg my-vol
Mirror a volume vxassist vxassist -g my-dg mirror my-vol
Add log to a volume vxassist vxassist -g my-dg addlog my-vol
Snapshot a volume vxassist vxassist -g my-dg snapstart my-volvxassist -g my-dg snapshot my-vol my-snap
Change volume layout vxassist vxassist -g my-dg relayout my-vol layout=stripe
Convert Volume type vxassist vxassist -g my-dg convert my-vol layout=stripe-mirror


Summary of plex states


State Description Comments
CLEAN Plex is up to date the volume is shutdown When the volume is started other plexes can sync from this
ACTIVE The plex is active Plex is working in the volume
STALE Plex needs to be resynced Plex must be synced with other plexes to make it active
EMPTY No data on the plex or veritas does not know what state the data is in All plexes are this state at creation time may be for
OFFLINE The pex is not currently participating in the volume When brought back on line the plex goes into a stale state
IOFAIL The plex is detached from the volume The only way to fix this is to replace the failed disk but veritas can still read the private region on the disk
NODEVICE No disk access recorded The disk can not be read at all
REMOVED Disk device for the plex is removed The disk has been manually removed


Changing state of plexes


From To How
Any EMPTY vxmend fix empty plex name
Any OFFLINE vxmend fix off
OFFLINE STALE vxmend fix on
STALE CLEAN vxmend fix clean
CLEAN STALE vxmend fix stale
STALE ACTIVE vxmend fix active
Normal State Changes
EMPTY CLEAN vxvol init clean
CLEAN ACTIVE vxvol start
STALE ACTIVE vxplex att
ACTIVE CLEAN vxvol stop
ACTIVE STALE vxplex det
IOFAIL or NODEV REMOVED vxdiskadm (option 4)
REMOVED STALE vxdiskadm (option 5)
ACTIVE STALE vxplex det