Operating System - HP-UX
1748288 Members
3475 Online
108761 Solutions
New Discussion юеВ

How to find free space in a disk with HP-UX OS

 
Gathatharan K
Occasional Contributor

How to find free space in a disk with HP-UX OS

Hi
How to find free space in a disk with HP-UX OS

Please help me out

Thanks
Gatha
5 REPLIES 5
vjta
Regular Advisor

Re: How to find free space in a disk with HP-UX OS

Hi Gatha

diskinfo is the command to see the disk details.

if that disk is part of vg then try vgdisplay
& in this u will get PV imformation by finding difference in Free PE & Allocated PE.

Thanks & regards
vjta
Vijeta Bhedi
Gokul Chandola
Trusted Contributor

Re: How to find free space in a disk with HP-UX OS

Hi,
Check total Space of Volumes e.g vg00,vg01 and compare it to your file system space with the help of #bdf command.

The difference is availble free space and you can create files systems with the help of GUI tools called SAM(command sam) as per your requirement.

Regards,
Gokul Chandola
There is always some scope for improvment.
Pete Randall
Outstanding Contributor

Re: How to find free space in a disk with HP-UX OS

Since you say "a disk with HP-UX OS", I'm guessing that you are referring to the disk on which your OS is installed - your root disk. Use vgdisplay -v:

# vgdisplay -v
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4384
VGDA 4
PE Size (Mbytes) 16
Total PE 8748
Alloc PE 1066
Free PE 7682
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


The key information is the Free PE number, which tells you how many PEs on the disk are not allocated to logical volumes and are, therefore, available for use.

That being said, I would caution against putting user data on your root disk if at all possible. Backup and recovery are much simpler if the OS and the user data are kept completely separate.


Pete

Pete
sujit kumar singh
Honored Contributor

Re: How to find free space in a disk with HP-UX OS

hi

there can be two things:
1)you want to know the present free space available in the VG currently.

#vgdisplay

note the PE Size and Free PE.
Multiplay them and you shall get the free Space expressed in MB in the VG.

#vgdisplay -v

note the PE size and Free PE PV Wise;and Multiply PE Size for the Free PE in a disk.
This will tell in a more detailed manner as of which PV in this VG is having how mich of space.


2)There can be PVs that are not assigned to VGs that is the new added disks.

For these sort of disks not being used by any VG, you can get the Size of the disks using diskinfo
#diskinfo /dev/rdsk/cxtydz


the disks that are present in the system bit are not being used in any VG can be looked by in comapring the O/ps of

#strings /etc/lvmtab
This will show the list of VG and the Constitutent Disks.
and
#ioscan -fnCdisk
this shall show all the disks present in the system whether or not they are being used in the VG.


Regards
Sujit

Frank de Vries
Respected Contributor

Re: How to find free space in a disk with HP-UX OS

You find free space with vgdisplay (as shown above).

Do your planning and once you have decided
where you need more space then
in order to use that space,
you need to extend the appropriate logical volume:

For example:
lvextend -L 1000 /dev/vg00/lvol8
(where 1000 is size in mb)

Then you need to extend the filesystem too:
fsadm -b $(expr 1024 \* 1000 ) /var

Look before you leap