Seeing space in use - Veritas Volume Manager

This is a discussion on Seeing space in use - Veritas Volume Manager ; Is there a way to see how much space is in use in a volume group. What I need to do is go onto several servers and find out if there is any space not being utilized on the servers ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Seeing space in use

  1. Seeing space in use

    Is there a way to see how much space is in use in a volume group. What I
    need to do is go onto several servers and find out if there is any space not
    being utilized on the servers by vm (ie. space not allocated from a disk).
    For example:

    1 9GB disk with 3 volumes of 2GB (6GB total) setup on it. How would I be
    able to find out that the other 3GB is not in use?

    I know how to do it with the GUI, but I need to do this from the command
    line.

    Thanks in advance and I will post a summary.

    Lawrence Randall



  2. Summary - Seeing space in use

    Thanks to Doug Hensel for pointing me to a great resource page (. With the
    page I was able to generate a script to get the information. The url
    information for anyone who needs it is:

    http://www.cuddletech.com/veritas/

    specifically,

    http://www.cuddletech.com/veritas/vxcheatsheet.txt



    The script is fairly straight forward and works with VM 3.1 under both Sol7
    and Sol8. Attached is the code for anyone else who might need it.



    #!/bin/ksh

    ################################################## #####################
    #

    # Written by Lawrence Randall on June 5, 2001. This script is used to
    compute the amount of free space available in Veritas Disk Groups

    disk_groups=`/usr/sbin/vxdg list | grep enabled | grep -v root | awk '{print
    $1}'`



    for list in $disk_groups

    do


    let total_space=0


    /usr/sbin/vxprint -d -g $list | awk '{print $5}' | grep -v
    LENGTH | while read line


    do

    let total_space=$total_space+$line

    done


    let space_used=0


    /usr/sbin/vxprint -f -g $list | grep "v " | grep -v
    root | awk '{print $5}' | while read line


    do

    let space_used=$space_used+$line

    done


    let total_space=$total_space/2

    let total_space=$total_space/1048576

    let space_used=$space_used/2

    let space_used=$space_used/1048576

    let available=$total_space-$space_used


    echo

    echo "Information for Disk group: $list"

    echo
    "-------------------------------------------------------"

    echo

    echo "Total Disk Space Utilized on System for Disk Group
    $list: $total_space GB"

    echo "Space Currently Allocated for Disk Group $list:
    $space_used GB"

    echo "Total Space Available for use on system for Disk Group
    $list: $available GB."

    echo
    "-------------------------------------------------------"

    echo

    echo

    done



    "Lawrence Randall" wrote in message
    news:3b1bc89f$1@hronntp01....
    > Is there a way to see how much space is in use in a volume group. What I
    > need to do is go onto several servers and find out if there is any space

    not
    > being utilized on the servers by vm (ie. space not allocated from a disk).
    > For example:
    >
    > 1 9GB disk with 3 volumes of 2GB (6GB total) setup on it. How would I be
    > able to find out that the other 3GB is not in use?
    >
    > I know how to do it with the GUI, but I need to do this from the command
    > line.
    >
    > Thanks in advance and I will post a summary.
    >
    > Lawrence Randall
    >
    >




+ Reply to Thread