You are on page 1of 4

VERITAS COMMANDS

Creating a diskgroup (need to have one disk)

* vxdg init grpname grpname01=c1t1d0

Adding a disk to an existing diskgroup

* vxdg -g grpname adddisk grpname02=c#t#d#

Destroying a diskgroup (must be imported - 3.x only)

* vxdg destroy diskgroup

Deporting a diskgroup

* vxdg deport grpname

Importing Diskgroup with new name

* vxdg -n newname import dgname

Deporting Diskgroup to new machine, giving new name

* vxdg -h hostname -n newname deport oldname

Creating Volumes

Simple/Concatination

* vxassist -g grpname make newvol 50m

Stripe

* vxassist -g grpname make newvol 200m layout=stripe disk01 disk02 disk03

RAID5

* vxassist -g grpname make newvol 200m layout=raid5,nolog disk01 disk02 disk03


* vxassist addlog volname

Mirror

* vxassist -g grpname make volname 200m layout=mirror disk01 disk02


* vxassist -g grpname make volname 200m layout=mirror,log

Modifying Volumes

Mirroring an existing volume

* vxassist -g grpname mirror volname

Mirroring all volumes in a diskgroup


* /etc/vx/bin/vxmirror -g grpname -a

Resizing a volume

* vxassist -g grpname growto volname size


* vxassist -g grpname growby volname size
* vxassist -g grpname shrinkto volname size
* vxassist -g grpname shrinkby volname size

Changing the Read Policy

* vxvol rdpol round volname


* vxvol rdpol prefer volname plexname

Removing a Volume

* vxvol stop volname [To stop single volume]


* vxvol -g grpname stopall [To stop all volumes in a group]
* vxedit -rm volname (removes only volume, leaves plex(s))
* vxedit -rf rm volname (recursively removes plex(s) and subdisks)
* vxassist remove volume volname

Removing a Mirror or Log from a Volume

* vxplex -o rm dis plexname

Moving Subdisks

* vxsd mv old_subdisk new_subdisk

Splitting Subdisks

* vxsd -s size split subdiskname newsd1 newsd2

Joining Subdisks

* vxsd join subdisk1 subdisk2 newsubdisk

Detach and Attach Plex

* vxmend off plexame (takes plex offline)


* vxplex det plexname
* vxvol start volname (if volume is not ENABLED)
* vxmend fix clean plexname (if it is not startable)
* vxplex att volname plexname (if plex is not ENABLED)
* vxplex att volname plexname (if volume is ENABLED)
* vxmend on plexname (if volume is not ENABLED)

Moving Plexes

* vxplex mv orig_plex new_plex

Volume ReLayout

Add column to a volume


* vxassist relayout volname ncol=+1

Remove a column

* vxassist relayout volname ncol=-1

Relayout to defined number of columns

* vxassist relayout volname ncol=5

Changing stripe-width

* vxassist relayout volname stwidth=new-width

Changing stripe-width and Column

* vxassist relayout volname stwidth=new-width ncol=5

RAID5 to striped-mirror

* vxassist relayout volname layout=stripe-mirror

Any layout to RAID5

* vxassist relayout volname layout=raid5

Stripe to concatination

* vxassist relayout volname layout=nostripe

Reversing a Relayout

* vxrelayout reverse volname


* vxrelayout -f -g grpname reverse volname

Check status on Relayout Operation

* vxrelayout status volname

Disk Drive Operations

Remove Disk From DiskGroup

* vxdg -g grpname rmdisk disk01

Remove Disk from Volmgr control

* vxdisk rm c1t1d0s2

Move Disks to New System

* drvconfig

* vxdctl enable
* vxdg import grpname
* vxrecover -g dgname -sb
* vxdg -C import dgname
* vxdg -f import dgname (if some disks in group failed)

Commandline equivalent to 'vxdiskadm option #4'

* vxdg -g dgname -k rmdisk disk15

Commandline equivalent to 'vxdiskadm option #5'

* /etc/vx/bin/vxdisksetup -i c#t#d#
* vxdg -g dgname -k adddisk disk15=c#t#d#s2
* vxrecover -g dgname -b disk15

You might also like