- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script to find the space of all VG
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
Forums
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
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
тАО03-31-2006 05:41 AM
тАО03-31-2006 05:41 AM
Do anybody having script...
1.to extract and display the physical free disk connected to system but unallocated to any VG.
2.to calculate and display the disk space available/allocated/free in Gb for all the VGs in the system.
Thanks in advance.
GK
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 05:49 AM
тАО03-31-2006 05:49 AM
Re: script to find the space of all VG
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 06:30 AM
тАО03-31-2006 06:30 AM
Re: script to find the space of all VG
Insofar as calculating the free disk connected to a system, this is potentially misleading. If a disk isn't recorded in '/etc/lvmtab' it may merely mean that is has not been 'vgimported' but otherwise has valid data that should not be destroyed.
As for calculating the available, allocated and free counts in all volume groups, you can use parse the output of:
# vgdisplay -v
For each 'VG Name' you will have a 'PE Size' whose value (in MBytes) can be multiplied by the VG's "Alloc PE" and "Free PE' to obtain the per-VG space. Repeat for all volume groups and sum to yield an overall summary of disk space.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 07:18 AM
тАО03-31-2006 07:18 AM
Re: script to find the space of all VG
do
vgdisplay $vg | awk '/VG Name/{VG=$3}/Free PE/{FREE=$3}END{print VG, FREE}'
done
this shall work to know HOW much free space you have..
You can modify this to get space in MB or likewise..
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 07:24 AM
тАО03-31-2006 07:24 AM
SolutionThe only way to know this is a very disciplined documentation process as new disks and LUN's are added or removed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 07:34 AM
тАО03-31-2006 07:34 AM
Re: script to find the space of all VG
scripting surely can acheive this..
Every environment is different, so you need to let people details know like what enviornment you have..
One good approach - which is semi manual, here I am assuming you have alternate paths allocated to your VG's
vgdisplay -v | grep -i dsk 2> /dev/null 1> /tmp/disks_in_use
symcfg list - shall tell what EMC frames are local to host ..
sympd -sid
sympd -sid
Once you have All R1/RAID 5 etc meta list, you compare with one used in VG..
grep has great functionality which can help in it..
Good luck
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 08:05 AM
тАО03-31-2006 08:05 AM
Re: script to find the space of all VG
Hope it helps.