Operating System - HP-UX
1821587 Members
4946 Online
109633 Solutions
New Discussion юеВ

How to "recover" unused disk space

 
daihard
Occasional Advisor

How to "recover" unused disk space

Hi.

I have a HP-UX 11.23 workstation with a 36GB hard disk. It is all under /dev/vg00. SAM shows that vg00 does have 36 GB.

However, if I check the file system (ie by running "df -k"), it shows only a total of 9GB on the disk.

----------------------------------------------
# df -lk
/home (/dev/vg00/lvol5 ) : 24456 total allocated Kb
34 % allocation used
/opt (/dev/vg00/lvol6 ) : 2438016 total allocated Kb
83 % allocation used
/tmp (/dev/vg00/lvol4 ) : 203344 total allocated Kb
4 % allocation used
/usr (/dev/vg00/lvol7 ) : 3667440 total allocated Kb
62 % allocation used
/var (/dev/vg00/lvol8 ) : 1559392 total allocated Kb
44 % allocation used
/stand (/dev/vg00/lvol1 ) : 269032 total allocated Kb
14 % allocation used
/ (/dev/vg00/lvol3 ) : 407968 total allocated Kb
47 % allocation used
----------------------------------------------

Apparently, there's about 25GB disk space on the drive unused.

My question is, is there a way to recoup it and add it to an existing partition? I wouldn't mind re-installing the OS if there's no other way, but I'd like to ask for your expert opinions first.

Thanks!
Dai
9 REPLIES 9
SKR_1
Trusted Contributor

Re: How to "recover" unused disk space

Paste the output of
1. vgdisplay -v vg00
2. ioscan -fnC disk
3. uname -a

Have you taken the reboot of machine?


Thanks

SKR
Pedro Cirne
Esteemed Contributor

Re: How to "recover" unused disk space

Hi,

You can only shrink filesystem/lvolvs if you have OnLineJFS installed.

If you want to resize all filesystems without OnlineJFS one option is to make a "make_tape_recovery", boot from the tape, choose "Advanced Mode" and then you can resize the partitions.

Pedro
Torsten.
Acclaimed Contributor

Re: How to "recover" unused disk space

Unless you have 25GB of swap you should have plenty of free space.

# vgdisplay -v vg00

will tell you.

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!   
daihard
Occasional Advisor

Re: How to "recover" unused disk space

Thanks for the quick replies, guys. Here's the information requested:

# vgdisplay -v vg00
--- 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 1
Act PV 1
Max PE per PV 4350
VGDA 2
PE Size (Mbytes) 8
Total PE 4340
Alloc PE 1182
Free PE 3158
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 304
Current LE 38
Allocated PE 38
Used PV 1

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 128
Allocated PE 128
Used PV 1

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 400
Current LE 50
Allocated PE 50
Used PV 1

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 200
Current LE 25
Allocated PE 25
Used PV 1

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 24
Current LE 3
Allocated PE 3
Used PV 1

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 2384
Current LE 298
Allocated PE 298
Used PV 1

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 3592
Current LE 449
Allocated PE 449
Used PV 1

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 1528
Current LE 191
Allocated PE 191
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c2t6d0
PV Status available
Total PE 4340
Free PE 3158
Autoswitch On


# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 0 10/0/14/0.0.0 sdisk CLAIMED DEVICE HL-DT-STDVD-ROM GDR8160B
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 10/0/15/0.6.0 sdisk CLAIMED DEVICE HP 36.4GST336706LC
/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0


# uname -a
HP-UX hpux23 B.11.23 U 9000/785 2008033668 unlimited-user license


The output of vgdisplay seems to tell me that there is in fact unallocated space...

Thanks,
Dai
Torsten.
Acclaimed Contributor

Re: How to "recover" unused disk space

Yes, there is:

PE Size (Mbytes) 8
Total PE 4340
Alloc PE 1182
Free PE 3158

Free PE * PE Size
3158 * 8MB = 25GB free

Check with "bdf" if one of your LVOLs needs some space in future.

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!   
daihard
Occasional Advisor

Re: How to "recover" unused disk space

Hello Torsten.

# bdf -l
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 409600 193088 214880 47% /
/dev/vg00/lvol1 298928 37968 231064 14% /stand
/dev/vg00/lvol8 1564672 689312 870080 44% /var
/dev/vg00/lvol7 3678208 2291232 1376208 62% /usr
/dev/vg00/lvol4 204800 8504 194840 4% /tmp
/dev/vg00/lvol6 2441216 2026536 411480 83% /opt
/dev/vg00/lvol5 24576 8488 15968 35% /home


This is what our system looks like. Seems to me that /usr, /var and /opt all need some more space. We do not need /home because we use NIS which sets the users home directories on an NFS drive.

What do you think?

Thanks again!
Dai
Torsten.
Acclaimed Contributor

Re: How to "recover" unused disk space

If you stay with your setup, currently you are fine.
But if you want to install software or large patch bundles (probably needed) consider to assign some more space to them.

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!   
Michael Steele_2
Honored Contributor

Re: How to "recover" unused disk space

Hi Dai:

/opt @ 83% is the only file system I'm concerned about right now.

Try this command to see if you have online JFS, and if you do, then you can increase without unmounting.

fsadm -F vxfs -D -E /opt

Support Fatherhood - Stop Family Law
Tim Nelson
Honored Contributor

Re: How to "recover" unused disk space

BTW, unless you answer yes to OnlineJFS maintenance of vg00 filesystems ( /, /usr, /var, /opt ) typically needs to be done with the server in single user mode.

And even more typically needs to be done using an Ignite system recovery.