- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- identify free disk
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
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
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
06-14-2005 07:28 AM
06-14-2005 07:28 AM
I want to create a new filesystem - I know the procedure for this however I want to discopver how much free disk is assigned to the server.
When I run ioscan I get lots of disk so is there a script or something I can use to identify what is free.
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 07:32 AM
06-14-2005 07:32 AM
Re: identify free disk
There are many scripts floating around doing what you are trying to accomplish, unfortunately, I can not remember the locations of any of them myself. But I have a BIG warning. If you are in a serviceguard environment and some of those disk you see in ioscan output were used by the clustered packages, what may seem to be a free disk on one node may actually beused on the other. This is a big CAUTION.
Otherwise, I am sure someone will let you know where you can find the garden variety of these scripts.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 07:47 AM
06-14-2005 07:47 AM
Re: identify free disk
If no MC/SG, what you can do is correlate the /dev/dsk values from the vgdisplay -v output with the ioscan -fnCdisk output.
Those disks not in vgdisplay output but in the ioscan output as CLAIMED will be unassigned disks to a system.
Again, no MC/SG (or any kind of clustering) in the environment!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 07:55 AM
06-14-2005 07:55 AM
SolutionIs it used by LVM?
Is it used by VxVM?
Is it used as swap?
It is used as a raw device by Oracle, Informix, etc?
It is used as a raw device by some other application?
As mentioned, if this is part of a ServiceGuard cluster you have to be extra careful.
You start with an ioscan to see what is visible but by far the most difficult to determine are those disks used as raw devices.
This really comes down to system documentation and then not trusting it either, you follow up with careful tests of your own (vgdisplay's, swapinfo, bdf's + looking at Oracle/Informix/etc.).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 08:10 AM
06-14-2005 08:10 AM
Re: identify free disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 08:20 AM
06-14-2005 08:20 AM
Re: identify free disk
ioscan -funC disk| grep -E -v "disk|Class|==="|awk '{print $1}'|sort
2) list used ones
vgdisplay -v |grep "PV Name" |awk '{print $3}'|sort
compare the output of each, u will know which one is not used
hope it helps
Basheer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 08:30 AM
06-14-2005 08:30 AM
Re: identify free disk
# works only for LVM disk structures
strings /etc/lvmtab >/tmp/disks.lst
for hwp in `ioscan -fknC disk | grep ^disk |awk {'print $3'}`
do
devdrv=`ioscan -fknH ${hwp} | tail -1`
blockdevice=`echo ${devdrv}|awk {'print $1'}`
rawdevice=`echo ${devdrv}|awk {'print $2'}`
diskid=`echo ${blockdevice}|cut -d/ -f4`
grep -q ${diskid} /tmp/disks.lst
r=${?}
if [ ${r} -eq 0 ]
then
echo "DISK "${diskid}" is already in use"
else
echo "DISK "${diskid}" is available"
fi
done
hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 09:02 AM
06-14-2005 09:02 AM
Re: identify free disk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 10:34 AM
06-14-2005 10:34 AM
Re: identify free disk
The system is clustered so I will go to our capacity team who will have the free disk info.
Lawrenzo