Operating System - HP-UX
1840286 Members
3968 Online
110162 Solutions
New Discussion

Re: How do I determine Available Disk space?

 
SOLVED
Go to solution
Donald O'Brien
Advisor

How do I determine Available Disk space?

I have been used to running other UNIX Flavors, but now I have to upgrade several E55s & D250s to HPUX 11.00 from HPUX 10.20.

As usually, one of the prerequisites is to make sure there is enough free diskspace. uhm, err. How do I do this HPUX? I have been able via SAM to see the total size of the disk on one system (a 2GB & 4GB disk in it). And I can see how much space is used via each filesystem on those disks. But is there a command that I can run which will just give me a quick summery of each disk.

ex. XXX MB total diskspace
XXX MB used
XXX MB Free

Sorry for such a newbie question.

Thanks again,

Donald O'Brien
12 REPLIES 12
Rodney Hills
Honored Contributor

Re: How do I determine Available Disk space?

Donald,

Either "bdf" or "df" are the common utilities.

"du" is good for getting file space utilization on per directory basis.

-- Rod Hills
There be dragons...
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How do I determine Available Disk space?

Probably about as easy as it gets is 'vgdisplay -v vg00'. You need to repeat for each volume group defined.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: How do I determine Available Disk space?

By the way, I should really mention that you don't care about how much used/free space there is because you REALLY don't want to upgrade; you want to do a cold install. The 10.20 to 11x upgrade has a very low (approaches zero) success rate.
If it ain't broke, I can fix that.
Craig Rants
Honored Contributor

Re: How do I determine Available Disk space?

To add to Clay's comments
vgdisplay vgXX | grep -i Free
vgdisplay vgXX | grep -i Size

take the results of column two and multiply ie.

2409 free PE x 4 PE size = approx 9GB Free.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
James R. Ferguson
Acclaimed Contributor

Re: How do I determine Available Disk space?

Hi Donald:

There are several ways to ascertain disk space:

# bdf #...shows utilization at the mounted filesystem level

# pvdisplay [-v] /dev/dsk/cXtYzZ ...with the '-v' option you will see the logical volume mappings

# vgisplay [-v] /dev/vgXX

Note that an 'extent' is often 4MB in size, although on large disks (e.g >= 36GB) this increases to 8MB or larger. The 'pvdisplay' output includes the extent size.

Regards!

...JRF...

Sajid_1
Honored Contributor

Re: How do I determine Available Disk space?

I would not suggest you to upgrade the OS, but do a cold install (fresh installation) of 11.0. You don't have to worry about the free space, but determine that the root disk has enough totall space on it. A 4GB disk will be good to go for a normal procedure.

To answer your question, these are the commands you should use:
# bdf
# sam - disk devices
# vgdisplay -v vg_name
# lvdisplay -v lv_name

In the last two commands, find the total PE, free PE and multiply it with the PE size to get the disk space details
learn unix ..
James R. Ferguson
Acclaimed Contributor

Re: How do I determine Available Disk space?

Hi (again) Donald:

Another useful tool is Ignite's 'print_manifest'. In reality, because you already routinely create Ignite recovery tapes (at least, I hope you do), you have the 'print_manifest" gratuitously.

Whenever you run 'make_tape_recovery' a new manifest is created. This document gives a quick, but very good LVM summary of your disk configuration:

# /var/opt/ignite/recovery/latest/manifest

Regards!

...JRF...
Donald O'Brien
Advisor

Re: How do I determine Available Disk space?

Thanks to everyone for the quick replies.

I luckily have a "test" system to try this out on first before going head deep into the 40+ system that I need to upgrade. I will try both "cold" and "upgrade". I'll keep my fingers crossed on the upgrade, but will expect to have to do a "cold-install".

For some reason, Ignite is not on the 10.20 installation of these machines. I'll see if I can get my hands a 10.20 CD and install it for backup purposes before going to 11.00.

I was looking for the vgdisplay command, so thanks for all that replied.

Donald O'Brien

(now if I could only go back and correct those terrible typos in the orginal post :D )
James R. Ferguson
Acclaimed Contributor

Re: How do I determine Available Disk space?

Hi Donald:

While Ignite can be obtained from a current Application CDROM, it is better (and just as easy) to download a current version.

Software and documentation can be obtained here:

http://www.software.hp.com/products/IUX/download.html

Use 'swinstall' to install the tar depot from the download. No reboot is required and man pages will be installed.

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: How do I determine Available Disk space?

To get Ignite/UX, it is usually better to download the latest greatest version from HP.

The link is:

http://software.hp.com/products/IUX/
Mladen Despic
Honored Contributor

Re: How do I determine Available Disk space?

Donald,

Try the attached script.

Mladen
Donald O'Brien
Advisor

Re: How do I determine Available Disk space?

Slick Script. Thanks yet again.

I have downloaded Ignite and will install it.

Donald O'Brien