- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Showing free space in volume group
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 05:41 AM
тАО05-06-2009 05:41 AM
I'm looking for a script/program to show the free space in a volume group.
vgdisplay will not do because it shows only the allocated space. I want to see what's really in use.
Counting all the free space for filesystems in vg00 is kind of awkward.
Thanks for any help.
Solved! Go to Solution.
- Tags:
- vgdisplay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 05:43 AM
тАО05-06-2009 05:43 AM
Re: Showing free space in volume group
vgdisplay
This shows free space in PE's not MB or anything.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 05:43 AM
тАО05-06-2009 05:43 AM
Re: Showing free space in volume group
If you want to know about free space in your certain file systems you should start with bdf or something similar.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 05:57 AM
тАО05-06-2009 05:57 AM
Re: Showing free space in volume group
When I make a vg of 100GB with an fs of 20GB, my free space in that vg is 70GB. But until I start with wrting to the fs, the free space is still 100GB in the vg.
So: vgdisplay doesn't help and BDF shows no totals for volume groups.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 06:10 AM
тАО05-06-2009 06:10 AM
Re: Showing free space in volume group
Example: You have a vg01 with let's say 1000 lvols, each file system has 1MB free - so your result would be 1000MB free. IMHO useless.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 06:22 AM
тАО05-06-2009 06:22 AM
Re: Showing free space in volume group
Another example.
My vg00 is 70GB. Vgdisplay says I have 10GB free. That wouldn't fit on a 40GB ignite tape. But those 60GB allocated are not really filled with data. Perhaps only 30GB is really used. That would fit a ignite tape.
(Please, don't send replies about ignite :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 06:29 AM
тАО05-06-2009 06:29 AM
Solutionyou'll find it in attachement.
you can add an specific vg in argument
# vgview vg00
/-------------------------------------------------------------------------------\
| vg00 |
|-------------------------------------------------------------------------------|
| TOTAL (Gbytes): 271.6875 |
| (Mbytes): 278208 |
| (Kbytes): 284884992 |
| (PE): 8694 |
| |
| USED (Gbytes): 107.21875 |
| (Mbytes): 109792 |
| (Kbytes): 112427008 |
| (PE): 3431 |
| |
| FREE (Gbytes): 164.46875 |
| (Mbytes): 168416 |
| (Kbytes): 172457984 |
| (PE): 5263 |
|-------------------------------------------------------------------------------|
| - LV Name : /dev/vg00/lvol1 |
| - MountPoint : /stand |
| SIZE (Gb): 1 |
| (Mb): 1024 |
| (Kb): 1048576 |
| Free LE : 32 |
| LE Size (Mb): 32 |
| Free LE (Gb): 1 |
| (Mb): 1024 |
| (Kb): 1048576 |
| |
| - LV Name : /dev/vg00/lvol2 |
| - MountPoint : |
| SIZE (Gb): 11.96875 |
| (Mb): 12256 |
| (Kb): 12550144 |
| Free LE : 383 |
| LE Size (Mb): 32 |
| Free LE (Gb): 11.96875 |
| (Mb): 12256 |
| (Kb): 12550144 |
|{..SNIP..} |
\-------------------------------------------------------------------------------/
pour augmenter un FS:
lvextend -L
fsadm -F vxfs -v -b
pour reduire un FS - pour le faire a chaud, necessite une license JFS
fsadm -F vxfs -v -b
lvreduce -L
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 06:34 AM
тАО05-06-2009 06:34 AM
Re: Showing free space in volume group
the script i posted above does not take care of mirrors.
If you have it, divide the result.
Regards,
Cedrick Gaillard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 06:40 AM
тАО05-06-2009 06:40 AM
Re: Showing free space in volume group
read vg #interactively input vg name here
free=0
bdf | grep "${vg}" | while read line;do
f=`echo $line | awk {'print $4'}`
(( free=$free+$f ))
done
echo "You have " $free " kilobytes in this vg"
to find the space used, replace $4 with $3 on the third line, between the awk brackets.
hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-06-2009 09:33 AM
тАО05-06-2009 09:33 AM
Re: Showing free space in volume group
vgdisplay will not report anything about filesystems. When you use Ignite, you are backing up filesystems, not volume group space, so vgdisplay is meaningless for Ignite tape space. bdf will tell you what space is actually used (and therefore backed up with Ignite). Since bdf is in Kbytes and there isn't an option to sum total the filesystem information, I wrote a wrapper script called bdfmegs. To see all the space actually used in vg00, run this script like this:
$ bdfmegs -s -c 3 -V vg00
File-System Mbytes Used Avail %Used Mounted on
/dev/vg00/lvol4 4096 12 3832 1% /tmp
/dev/vg00/lvol1 291 52 210 20% /stand
/dev/vg00/lvol3 2504 543 1960 22% /
/dev/vg00/lvol5 5000 3013 1862 62% /home
/dev/vg00/lvol8 8192 3191 4983 40% /var
/dev/vg00/sybe2 4000 3341 617 85% /sybe2
/dev/vg00/lvol7 9600 4050 5507 43% /usr
/dev/vg00/lvol6 8800 6305 2475 72% /opt
-- sum totals - 41.5g 20.0g 20.9g --- sum totals ---
-s is the option to produce a sum total
-c 3 sorts column 3 (Used)
-V vg00 selects only vg00 volumes
Here is the usage information (bdfmegs -h):
Usage: bdfmegs [ -cghlNPpqstuVv ] [
where:
-c # = Sort on column #
-g = show gigabytes, otherwise megabytes
-h = Usage (return code=0, Usage to stdout)
-l = local (no NFS)
-N
Repeat -N or use commas: -N vg10,vg24
-p ## = highlight % -ge ##
-P ## = show only % -ge ##
-q = suppress header line and no char enhancements
-s = summarize total, used and available
-t
-u = usage (return code=0, Usage to stdout)
-v = verbose (type, version, largefiles)
(version info read permission for mountpoint)
-V
Repeat -V or use commas: -V vg00,vg01
File(s) or dirpath(s) may be specified to reduce the output of bdfmegs:
bdfmegs -vg /usr/contrib/bin /var/tmp
If bdfmegs is run as bdfgigs (ie, a link), then -g is default.
(bdfmegs ver 5.1_Apr2009)
Bill Hassell, sysadmin