Home
Up

Volume Manager

Command Example Description Comments
vxdg vxdg -g disk_group free | tail +2 | awk '{ printf "%-10s%.0f mb\n", $1 ,$5 /2048}' put a | sort +1n to sort on size List free space on each individual disk
vxunreloc /usr/lib/vxvm/bin/vxunreloc -g errin2_ <disk_name> Use after a relocation of a failed disk Use after a vxrelocate
vxassist vxassist -g rootdg move <volume-name> !<from-disk> <to-disk> Moving a subdisk  
vxreattach /etc/vx/bin/vxreattach -rb
vxedit set failing=off <disk1> <disk2>
  Use after a controller failure etc
vxresize /usr/lib/vxvm/bin/vxresize -bx -F ufs -g rootdg dsk1 +5000m data2m Add 5gb to a filesystem Needs to be of type fsgen
vxdisk vxdisk -f init c3t1d0s2 loglen=965 How to initialise disk with larger log area If you replace a disk, and get

ERROR: Disk log too small for disk group configuration

vxassist vxprint -Agts will show the start and size of each plex on that disk.
vxdisk list <disk name> will show the length of the public reigon
Available size =
(length of public region) - (disk offset of last plex on that disk) - (size of last plex on d
All figures in 512byte sectors
Alternatively maxsize !!
How to create a volume that will fill the left space on a disk
vxdctl vxdctl hostid newhostname   Change Veritas hostname
vxdctl, vxconfigd vxdctl stop vxconfigd -m enable Use as a kill -HUP 'veritas'
When you've added hot-swap disks and done a drvconfig etc.
Symptom, format sees the disk, but vxdisk list doesn't.
How to bring a disk under Veritas control without rebooting
vxdg vxdg -g rootdg free   how much space left in a volume group
vxdiskadd vxdiskadd c0t3d0
vxdiskadd c0t3d0 c0t4d0
vxdiskadd c0
Never add the slice add an extra disk(s) to Veritas control
vxedit vxedit -g disk_group rename diska diskb   Rename a disk in Veritas
vxedit, vxvol umount volume
vxvol stop volume
vxedit -rf rm volume
  Remove a veritas volume
vxmksdpart boot sliced disk single user
vxconfig & vxprint to determine the subdisk of the volume to recover, sub-disk from the disk booted from.
/etc/vx/bin/vxmksdpart subdisk slice
fsck slice
mount it
Forceload of vx drivers in /etc/system needed To recover a partition from a Veritas mirror converted to slices
vxplex vxplex -o rm dis plex-name   to destroy one side of a mirror
vxprint vxprint -g disk_group -st | awk '{ printf "%-15s%-30s\n" , $4 ,$3 }'   Prints out what sub disk are on what physical disks
vxprint vxprint -g disk_group -st | awk '{ print $4 }' | sort -n | uniq -c | sort -n   List out how many sub disks are on each disk

Filesystem

 

Command Example Description Comments
vxmkcdev vxmkcdev -h 16k -s 400M blobdata.dbf   Create a Veritas quick I/O file
vxdump vxdump 0bf 512 - /dev/vx/dsk/rootdg/vol1 I vxrestore -rbf 512 -   Move a Veritas filesystem

Cluster

 

Command Example Description Comments
hastart hastart -force -force will force Veritas to use the local configuration Start a machine in a Vertias Cluster
hastop hastop -sys hostname -evacuate will move all Service groups Stops had on a system in a cluster
hastop hastop -all (-force)   Stops had on all system in a cluster
haconf haconf -makerw   Makes Veritas configuration read/write
haconf haconf -dump Dump regularlly Saves Veritas configuration
haconf haconf -dump -makero Always try and leave config read only Saves Veritas configuration and makes read-only
hastatus hastus Gives a tail -f syle output Summarises the status of the cluster
hastatus hastus -sum   Summarises the status of the cluster
hagent hagent -start agent_name -sys hostname   Stop and start an agent
hauser hauser -display also add, modify, delete etc. Show, add and delete users
hasys hasys -list   List systems in the cluster
hasys hasys -display hostname   Detailed information about a system in the cluster
hatype hatype -list also add, modify, delete etc List resource types
hares hasres -dep [resourcename]   Resource dependancies
hares hasres -display [resource]   Detailed information about a resource
hares hasres -add resource resource_type service_group also modify/delete and online/offline etc Add resources
hares hasres -probe resource -sys hostname CHECK THIS Causes a resources agent to immediately monitor the resource on a particular system
hares hasres -clear resource [-sys hostname]   Clear a faulted resource
hares hasres -link parent child Also unlink Specify a dependancy between two resources
hagrp hagrp -list   List all service groups
hagrp hagrp -resources [service_group]   List a service groups resources
hagrp hagrp -dep [service_group]   List a service groups dependancies
hagrp hagrp -display [service_group]   Detailled information about a service group
hargp hagrp -online service_group -sys hostname Also offline Bring a service group online
hagrp hagrp -switch service_group -to hostname   Switch a service group to another machine
hagrp hagrp -freeze service_group [-persistant] If the persistant falg is used, the group will stay frozen across restart. If frozen with -persistant, then must unfreeze with -persistant Freeze a service group, disables online/offline effictively locking it to one machine
hagrp hagrp -enable service_group [-sys hostname] Also disable Enable a service group
hagrp hagrp -enableresources service_group Also disableresources Enable all the resources in a service group
hagrp hagrp -link parent_group child_group realtionship Complex to plan, think about pre-online scripts as alternatives Specify the dependancy between two service groups
lltconfig lltconfig -U|c -U = stop -c = start Stop and start llt
gabconfig /sbin/gabconfig -c -n seed seed should be the number of systems in the cluster, or at least more than half to prevent split brain Start gab (llt needs to be running)
llstat llstat   Is llt runing ?
llstat llstat -l   Information about each llt link
llstat llstat -c   llt configuration information
llstat llstat -nvv script this | grep DOWN and run from cron Very verbose status of llt
lltconfig lltconfig -a shows mac addresses and devices Show ports used by llt

© Andrew Marshallsay 2008