You are on page 1of 6

Veritas Commands

Examples:
(To see if we have any free space in a disk group)

vxdg free
(how much is in the oracle group?)

/usr/sbin/vxassist -g disk-group-name maxsize


(add a new volume named bobvol with a size of 5g)

vxassist -g oracle make bobvol 5g


(prepare a volume to be mounted)

/usr/lib/fs/vxfs/mkfs /dev/vx/rdsk/disk-group-name /volumename


(mount the volume named bobvol)

mount -f vxfs /dev/vx/dsk/disk-group-name /bobvol /mount-pointname


(increase volume named bobvol by 1576800 clusters)

/usr/lib/vxvm/bin/vxresize -x -F vxfs -g disk-group-name bobvol +1576800


(increase volume named bobvol by 5g)

/usr/lib/vxvm/bin/vxresize -x -F vxfs -g disk-group-name bobvol +5g


(decrease volume named bobvol by 5g)

/usr/lib/vxvm/bin/vxresize -s -F vxfs -g disk-group-name bobvol -5g


(create new 2gb raw chunk)

/usr/sbin/vxassist -g disk-group-name -U gen make newchunkname 2000m


(change owner:group and chmod on a raw chunk to informix:informix and 660)

vxedit -g disk-group-name -v set user=informix group=informix mode=660 volumename


(Note: make if you have both SAN and local disks in a disk group, specify the disk to use for disk space increases. We do not want to mix the two types of storage.)

VxVM
Obj/Cmd Description Device Name =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=packages Volume Manager v2.5.2 packages VRTSvxvm VRTSvxva VRTSvmdev VRTSvmdoc VRTSvmman Upgrade Upgrade VxVM/VxFS in VCS Cluster Upgrade to 3.1 physdisk Device name or Disk Access name c0t0d0s0 VMdisk Physical disk under Volume Manager control disk01 subdisk Portion of a VMdisk disk01-01 plex Consists of 1ormore sdisks on 1or more disks vol01-01 volume Virtual disk of between 1 & 32 plexes vol01 OS devpath Operating System location of a device /dev/rdsk/c0t0d0s0 VM devpath Volume Manager location of a device /dev/vx/dmp/c0t0d0s0 UNENCAP Un-encapsulate ROOT Disk Un-encapsulate VXDCTL Stop/Start VXVM STOP/START VMdisk Remove FAILING FLAG when you know disk is good FAIL DiskGrp Remove FAILED FLAG when you know disk is good FAILED

Obj/Cmd

Description Command / File CLI Command =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=PhysDisk ..adddisk... PhysDisk PhysDisk PhysDisk disk06=c0t6d0s2 PhysDisk disk01 Vmdisk VMdisk Vmdisk VMdisk disk06 VMdisk disk06 VMdisk DiskGrp newdisk01=c0t6d0s2 DiskGrp DiskGrp DiskGrp privlen=1m Identifying a physdisk to VM control # vxdisksetup -i c0t6d0 & vxdg

Bringing up properties of a physdisk # Determining amount of freespace on a Vmdisk # vxdg free Adding a disk to a disk group # vxdg -g rootdg adddisk Bringing up properties of a vmdisk Remove a VMdisk from a diskgroup Replacing a disk Moving data from a failed disk to good disk Adding VMdisk to hot relocation pool # vxdisk list disk01 or # vxprint -l # vxdg -g rootdg rmdisk disk06 # # # vxedit -g rootdg set spare=on

Removing VMdisk from a hot relocation pool # vxedit -g rootdg set spare=off List all spares available to a disk group Initializing a disk group Deporting a disk group (disables access) Importing a disk group (enables access) Increase Private Length if need more than 500 volumes in a Disk Group # vxdg spare # vxdg init newdg # vxdg deport newdg # vxdg import newdg # vxdisksetup -i cXtXdX

DiskGrp Rename a Disk Group on deport olddgname DiskGrp Rename a Disk Group on import olddgname DiskGrp Copy diskgroup config info to all disk in DG nconfig=all diskgroup vxdg vxdg vxdg vxdg vxdg Remove disk from diskgroup Remove diskgroup Join DiskGroups (requires FlashSnap lic) Move items from a diskgroup to another Split DiskGroup

# vxdg -n newdgname deport # vxdg -n newdgname import # vxedit -g diskgroup set # vxdg -g dg rmdisk diskname # vxdg destroy dg # vxdg join dg1 dg2 # vxdg -o expand dg1 dg2 objects... # vxdg -o expand dg1 dg2 objects..

DMP Reconfiguring DMP # vxdctl enable (1 of vxdctl's many functions) DMP Disabling DMP before install # touch /kernel/drv/ap DMP Disabling/Enabling DMP after install DMP DMP Enable DMP automatic link restore # /usr/sbin/vxdmpadm start restore DMP Disable DMP automatic link restore # /usr/sbin/vxdmpadm stop restore DMP List all disk controllers # /usr/sbin/vxdmpadm listctlr all DMP DMP restore daemon status # echo "dmp_enable_restore_daemon/X" | adb -k 0 DMP restore daemon is disabled and is not running 1 DMP restore daemon is enabled but not started 2 DMP restore daemon is enabled and running 3 DMP restore daemon has ioctl dmp_stop_restore_daemon in progress DMP Check if DMP restore daemon is running DMP Restore DMP Check DMP DB details DMP DMP Disk/LUN Inquiry Command /dev/rdsk/c?t?d?s2 DMP GetSubPaths ctlr=/sbus@6,0/fcaw@1,0 DMP dmpnodename=c3t3d99s2 DMP Get DMP Debug output for Veritas Support PATH Volume Manager PATH variable {PATH}:/opt/VRTSvxva/bin MANPATH Volume Manager MANPATH variable {MANPATH}:/opt/VRTSvxvm/man .vxva_pref Visual Administrator user prefs exclude Exclude disks from VM control exclude Exclude controllers from VM control vxserial Install Veritas licenses vxserial Verify Veritas licenses vxva Visual Administrator - Real mode (root) vxva Visual Administrator - Demo mode (non-root) vxva log Volume Manager log file viewer vxva Reset vxva demo mode configuration vxconfigd Volume Manager configuration daemon vxiod Volume Manager I/O daemon (kernel thread) vxiod Set 64 vxiod kernel threads (default is 10) vxiod Increase threads /etc/init.d/vxvm-startup2 Number of threads = 10+number of cpu's - 1 # /etc/vx/diag.d/vxdmpdbprint # /etc/vx/diag.d/vxdmpinq # vxdmpadm getsubpaths # vxdmpadm getsubpaths # vxdmpdebug # setenv PATH $ # setenv MANPATH $ $HOME/.vxva_pref /etc/vx/disks.exclude /etc/vx/cntrls.exclude # vxserial -c # vxserial -p # vxva & $ vxva -t & # vxvalog2txt log_file # vxva_setup # vxiod # vxiod set 64 # vxiod set 13

vxdctl vxdctl

Check status of volume manager daemon Enable volume daemon

# vxdctl mode # vxdctl enable # vxassist -g rootdg -U fsgen -p # vxassist -g rootdg -U fsgen -p # vxassist -g rootdg -p maxsize # vxprint -m -g rootdg vol01| # vxassist -g rootdg -U fsgen make # mkfs /dev/vx/rdsk/rootdg/vol01

FS/ Calculate maxsize for volume maxsize layout=nolog FS/ Calculate maxsize for Stripped volume maxsize layout=stripe,nolog nstripe=2 stripeunit=128 (disk1 disk2) FS/ Calculate maxsize for RAID5 volume layout=raid5,log FS/ Display properties of an object disk01|vol01-01 FS/Create Create a filesystem on a simple volume vol01 (size) (size> FS/Create (size) FS/Create vol02 (size)

Create a Volume on second disk in disk group # vxassist -g -U fsgen make vol01 Create a filesystem on a striped volume # vxassist -g rootdg -U fsgen make # mkfs /dev/vx/rdsk/rootdg/vol02

(size) FS/Create Create a filesystem on a RAID 5 volume (size) layout=raid5,log nstripe=2 stripeunit=32 disk03 disk04 disk05 FS/Create Create a RAID 5 volume with NOLOG vol01 2g layout=raid5,nolog ncolumn=5 alloc="c2t20d109 c2t20d111 c2t20d105 c2t20d106 FS/Create Create a RAID 5 volume with LOG vol02 500m layout=raid5,log ncolumn=5 alloc="c2t20d105 c2t20d106 c2t20d107 c2t20d108 FS/Create Create a striped volume using 2 disks (size) layout=stripe,nolog nstripe=2 stripeunit=128 disk1 disk2 FS/Create Create a Mirrored Volume vol01 (size) layout=mirror FS/Create Create a Mirrored Volume Mirror To) vxdiskadd vxvol vxvol len=61440 vol Encapsulate disks under VM control Perform operations on volumes Change the size of a volume to 30mb

# vxassist -g rootdg make vol03 # vxassist -g DG1_acb-db4-p make stripeunit=32 # vxassist -g DG1_acb-db4-p make stripeunit=32

# vxassist -g dg -U fsgen make vol01 # vxassist -g dg -U fsgen make # vxmirror -g dg vol01 (Disk to # vxdiskadd c0t0d3 c6 c12 # vxvol stopall ; vxvol startall # vxvol -o force -g dg set # vxedit -g dg -v # vxedit -g dg -fr rm volumename # vxedit -g dg -v set user=user # vxplex -g dg dis plex # vxplex -g dg -o rm dis plex # vxedit -g dg -r rm plex # vxassist -g dg growto volume size

vxedit Rename volume rename oldname newname vxedit Remove volume from diskgroup vxedit Change ownership of a volume volume vxplex Remove Mirror vxplex Remove Mirror and delete plex vxassist Grow an existing Volume

vxassist Grow an existing Volume size vxassist Shrink an existing Volume length-change vxassist Shrink an existing Volume new-length vxassist Add Mirror to existing Volume layout=nostripe alloc=newdisk vxassist Add another STRIPE to a Volume ncol=+1 (VXVM Ver 3.0+) vxassist Change layout from stripe to concat layout=mirror-concat,nogrow,noshrink nmirror=1 layout=mirror-concat vxassist Move volume off Disk1 to Disk2 disk2 vxresize Resize a volume and filesystem (add 3g) as4-p apps +3g "alloc=c3t1d1s2" vxresize Resize volume & filesys in backgr. (-500mb) as4-p ora01 -500mb "alloc=c3t1d1s2"

# vxassist -g dg growby volume # vxassist -g dg shrinkby volume # vxassist -g dg shrinkto volume # vxassist -g dg mirror volume # vxassist -g dg relayout volume # vxassist -g dg relayout volume # vxassist -g dg convert volume # vxassist -g dg move vol !disk1 # vxresize -b -F vxfs -g DG1_acb# vxresize -bs -F vxfs -g DG1_acb-

NOTE: ERROR: if you see this error: fsadm: You don't have a license to run this program vxvm:vxresize: ERROR: Problem running fsadm command for volume ..., in diskgroup ... VERIFY you have a valid license and that /dev/vxportal -> /devices/pseudo/vxportal@0:0 LINK exists !!! If not, create it !!!! vxprint vxrecover vxmend Show all volumes Recover a failed volume Mend simple problems with a volume. # vxprint -htf | more # vxrecover -b # vxmend -g dg fix unstale plex # vxedit -g dg -v # vxedit -g dg -fr rm volumename # vxedit -g dg -v set user=user # vxplex -g dg dis plex # vxplex -g dg -o rm dis plex ; # vxmake -g dg -U fsgen vol # df -k -F vxfs # vxprint -v -g dg # /usr/lib/fs/ufs/mkfs -F ufs -M

vxedit Rename volume rename oldname newname vxedit Remove volume from diskgroup vxedit Change ownership of a volume volume vxplex Remove Mirror vxplex Remove Mirror and delete plex vxedit -g dg -r rm plex vxmake Re-Create a volume from a plex volumename plex=plex df Show all vxfs filesystems

mkfs To get sectors(S) to growto for mkfs mkfs grow filesystem on increased volume /mountpoint /dev/vx/rdsk/dg/volume /mountpoint S vxdctl INIT reboot INIT

Enable VXVM access to new/added disks/LUN # vxdctl enable Cannot initialise a disk If cannot initialize disk due to error saying # vi /etc/vx/reconfig.d/c# and

disk already in diskgroup" And can not see disk in vxdisk list SWAP Creating a secondary swap device (vxassist) swapvol2 (size) rootdisk SWAP Creating a secondary swap device (swap) /dev/vx/dsk/rootdg/swapvol2 SWAP Creating a secondary swap device (vfstab) swap - no -

# vxdctl enable # vxassist -g rootdg -U swap make # swap -a /dev/vx/dsk/rootdg/swapvol2 - -

** NOTE: Stripe unit size in sectors (1 sector = 512 bytes, i.e. 128 sectors=64K)

You might also like