gibbsie.org Knowledge Base

Veritas Cluster Service (VCS) – BASH Functions

Aug 3rd 2008
No Comments
respond
trackback

BASH function for checking Veritas Cluster Service volume status using Veritas VxVM filesystem.

function vcs_volstat () {
  test $# -eq 1 || {
   echo "Usage: vcs_volstat volume";
   return 1
};
DISK_GROUP=`vxprint $1 | head -1 | sed -e "s/^Disk group:\ //"`;
vxassist -g ${DISK_GROUP} maxgrow ${1} | awk '{print $1,$2,$3,$4,$5,$6,$7/2048"MB to",$9/2048"MB.\nCurrently is",$9/2048-$7/2048"MB"}'
}

Example usage of the above function is as below. The above script has been copied into a file called ‘vcs_volstat’ and the file has had the execute permission for the owner set. The script is called with the name of the volume as its primary argument.
# ./vcs_volstat dr_oradmp_vol
Volume dr_oradmp_vol can be extended by 69623MB to 172023MB.
Currently is 102400MB


This post is tagged , , , ,

No Comments

Leave a Reply