Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Veritas 1

Status
Not open for further replies.

kumsaga

MIS
Jun 21, 2002
22
US
how do I find out what is the total size of a Veritas Disk group ?
when I use vxassist -g maxsize it gives me only the free space left . I do not have a GUI .
thanks
Sagar
 
vxdg free List free space that can be used for allocating
subdisks. I want to find out what is the total disk space allocated for a given disk group.

Thanks
Sagar
 
This is the output i get from vxdg -g diskgroup free
DISK DEVICE TAG OFFSET LENGTH FLAGS
forddg01 c0t1d0s2 c0t1d0 16683834 994659 n
forddg02 c0t2d0s2 c0t2d0 6149520 2229120 n
forddg03 c2t1d0s2 c2t1d0 16683834 994659 n
forddg04 c3t3d0s2 c3t3d0 5944320 2434320 n

I want to find out total not just the free space .
 
Listed below are a few examples of how it is possible to use the vxprint and vxdisk commands to find the amount of VxVM disk space:

1.) To find the total amount of VxVM disk space in a particular disk group:

# vxprint -g testdg1 -dF "%publen" | awk 'BEGIN {s = 0} {s += $1} END {print s}'

2.) To find the total amount of VxVM disk space for all disk groups:

# vxprint -AQqdF "%publen" | awk 'BEGIN {s = 0} {s += $1} END {print s}'

3.) To include the space on disks that were in a disk group that was deported, or space that was not associated with any disk groups but were already under VxVM or in other words, to find out the total space or capacity of all VxVM disks, use vxdisk:

# vxdisk -q list | awk '{ if ($5 == "online") print $1}' | xargs vxdisk list | grep "^public:" | awk -F'=' 'BEGIN {s=0} {s+=$NF} END {print s}'


I hope, it's now ok. ;-)
 
Sorry I forgot to thank you for the tip .It worked .
thanks for saving me
Kumar
 
you can create an alias and run this cmd, i find this pretty good to

alias freesum=_freesum
function _freesum {
for i in `vxdg list | grep -v "NAME" | awk '{print $1 $5}'`
do
echo "$i"
FREESPACE=`vxdg -g $i free | awk '{print $5}' | grep -v LENGTH | awk '{ n+=$0}; END{print n/2048}'`
echo $FREESPACE Mb free
done
}
 
vxassist -g diskgroup maxsize will give the free size in Mb.
 
yep i agree but if you have more than one dg this is pretty handy of a quick overview


visvid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top