Operating System - HP-UX
1833325 Members
2868 Online
110051 Solutions
New Discussion

Re: Removing unwanted filesets - reason is space needed

 
SOLVED
Go to solution
Adrian Sobers2
Super Advisor

Removing unwanted filesets - reason is space needed

How do I remove unwanted filesets in HP-UX 11.00

Attached is the output from swlist

174 REPLIES 174
RAC_1
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

You can use swremove to remove the unwanted software from your system. For which FS, do you need the space?

The command cleanup will remove superceded patches from the system. Run it in preview mode and then remove the superceded patches.

Anil
There is no substitute to HARDWORK
Eric Antunes
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

As RAC said, you can use cleanup command (see manual):

#cleanup -p -c 2

Best Regards,

Eric Antunes

Each and every day is a good day to learn.
Prashant Zanwar_4
Respected Contributor

Re: Removing unwanted filesets - reason is space needed

Invoke swremove, select the unwanted filesets from the list. and proceed. Make sure these are unwanted only or you may loose functionality.

you can check for integirty of patches using /usr/contrib/bin/check_patches, it will show you corrupted patches/filesets. and you can select to remove.

cleanup -p -c 1 or 2

this can take care of supersaded patches.

Hope this helps
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Franky_1
Respected Contributor

Re: Removing unwanted filesets - reason is space needed

Hi,

you can use "cleanup" for removing unwanted filesets

eg

cleanup -c 2 (where 2 indicates to remove 2-times superseeded patches, 3 means 3-times ... and so on)

Regards

Franky
Don't worry be happy
ramkumar
Valued Contributor

Re: Removing unwanted filesets - reason is space needed

it is right . the clean up command check for the patch levels . and try to use the appropriate switches if you upgraded from 10.20 to 11 like cleanup -i

Prashant Zanwar_4
Respected Contributor

Re: Removing unwanted filesets - reason is space needed

YOu can also use

/opt/contrib/bin/freedisk -v 2>&1 | tee filename.

Freedisk analyses which filesets are not used for so many days.

And to remove then you can do


/opt/contrib/bin/freedisk -a 90 filesets thats have not been used for last 90 days will be removed.

Its a risk basically to something like this except you are very sure of doing it

Prashant




"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Adrian Sobers2
Super Advisor

Re: Removing unwanted filesets - reason is space needed

I did that and it said no 10.X patches present

I see software like netscape, netscape6, mozilla that we don't use under /opt. This machine will be used to host Oracle 8i that's all.

Any more suggestions also I'm checking my disk and filesystem info in SAM here is what is reads:

vg00 4MB of 4092 available
vg02 1016 of 6096 available
vg03 0 of 4092 available
vg04 0 of 8680 available
vg05 96 of 17344 available
vg06 3544 of 10712 available

Attached is the output from the bdf command

Any more suggestions? I need to free as much space as possible to install some OS patches, and prepare for upgrading Oracle 8 to 8i.
Kent Ostby
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

Adrian --

What filesystems are you trying to create space in ?

Doing a :

find -xdev -size +1000000c

will give you a list of files greater then 1 megabyte.

I find that removing filesets is very rarely the answer to getting more space although the cleanup command mentioned above can be useful and is safe.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Adrian Sobers2
Super Advisor

Re: Removing unwanted filesets - reason is space needed

I'm trying to free space under:

/var -> /dev/vg00/lvol7 (73% used)

/opt -> /dev/vg00/lvol6 (88% used)


Prashant Zanwar_4
Respected Contributor

Re: Removing unwanted filesets - reason is space needed

swremove is best to use then. That will remove required products for you like you mentioned netscape and other.
And also cleanup -p -c 1 or 2 shall do the patch cleanup.
Under /var you can check what logs/files you can truncate/compress/delete, regular ones and otherwise too.
use du -sxk | sort -n and find out what is large and needs to be removed/truncated.

Hope this helps
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Robert-Jan Goossens_1
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

Hi,

If you have some space left on your disks inside vg00 you could extend your /var + /opt filesystems.

Otherwise you need add disks or move a filesystem ( /opt ) to an other volume group.

Check if you have free extends with

# lvdisplay -v vg00

Regards,
Robert-Jan
H.Merijn Brand (procura
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

Remove internationalization. You don't need it anyway. For me that would be something like

# swlist -l product -l subproduct | perl -ne '/\b[a-zA-Z]{2}_[a-zA-Z]{2}\b/ and print'
PHCO_16489 1.0 S-Chinese zh_CN.utf8 locale src and binary
PHCO_16490 1.0 T-Chinese zh_TW.utf8 locale src and binary
PHCO_16491 1.0 Hong Kong zh_HK.utf8 locale src and binary
PHCO_16492 1.0 Japanese ja_JP.utf8 locale src and binary
PHCO_16493 1.0 Korean ko_KR.utf8 locale src and binary
PHCO_18124 1.0 French fr_CA, fr_FR.utf8 locale src, binary
PHCO_18125 1.0 German de_DE.utf8 locale src and binary
PHCO_18126 1.0 Italian it_IT.utf8 locale src and binary
PHCO_18127 1.0 Spanish es_ES.utf8 locale src and binary
PHCO_18128 1.0 Swedish sv_SE.utf8 locale src and binary


then filer out the packages you indeed want to remove, and do

# swremove PHCO_18127 PHCO_18128 ...

Enjoy, Have FUN! H.Merijn [ Who for that reason always compiles his GNU utils with --disable-nls ]
Enjoy, Have FUN! H.Merijn
Adrian Sobers2
Super Advisor

Re: Removing unwanted filesets - reason is space needed

Thing is when I run swremove I do not see the products I'd like to remove listed like netscape, netscape6, mozilla etc.

Is there anything else I need to know?
Prashant Zanwar_4
Respected Contributor

Re: Removing unwanted filesets - reason is space needed

YOu will have associated filesets, just remove those.

swlist -l product | grep -i netscape

swlist -l fileset | grep -i netscape

This will give you idea on what to remove. Then follow using swremove..

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Victor BERRIDGE
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

Hi Adrian

What disks do you have and why so many groups?
It may seem a silly question: What requirement are you trying to satisfy by purging /var /opt?
Because they seem already quite minimalist compared to standard HPUX11 installs
So if you are short of space its not trying to recuperate in vg00 that will solve your problem but more in reconfiguring you existing other vgs and in that Im sure people her have plenty of suggestions...

My 2 cents

All the best
Victor
Adrian Sobers2
Super Advisor

Re: Removing unwanted filesets - reason is space needed

Thanks

swlist -l fileset | grep -i "string"

does it for me. I'll do some removing then see how that goes in terms of freeing space.
Adrian Sobers2
Super Advisor

Re: Removing unwanted filesets - reason is space needed

Victor,

I inherited this system. It is now out of production and I'm trying to prepare it for an Oracle 8 > 8i upgrade.

The confiugration of groups and volume groups I had nothing to do with. Just trying to free space on this machine to install the latest Quality Pack from HP.
Adrian Sobers2
Super Advisor

Re: Removing unwanted filesets - reason is space needed

so should I try to extend my other volume groups where possible?

this will require a reboot I'm assuming?
Robert-Jan Goossens_1
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

Yes, correct.

You will need a reboot to extend /var filesystem and probably the same for /opt filesytem.

RJ
Robert-Jan Goossens_1
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

add on !
To be exact you need to boot to single user mode.
Adrian Sobers2
Super Advisor

Re: Removing unwanted filesets - reason is space needed

I was just snooping around in SAM to see how to go about this. Can someone post step-by-step instructions for this process. I want to extend the volume groups. I have to use existing logical volumes to extend though. No brand new disks to work with, just what is there.
Victor BERRIDGE
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

Hi Adrian,
Im waiting on a box to reboot so I have some time to spare...
To help you would be possible knowing what disks you have, its not that I dont trust sam but more prefer some text when it comes to having quickly the needed info
what does vgdisplay vg00 give? seems if you have truly just 4MB available that you are on a 2 GB disk the rest is occupied by your swap... I would suggest then after clearing up a bit vg00 that you take a make_recovery of you system / vg00
You boot on your ignite tape and reduce the swap to say new size 500MB.
Try to give the extra space to /opt and /var

And since /opt/oracle3 in almost unused, reduce it by 500MB or suppress it and create a new swap of 500MB instead

Now you should be more comfortable


All the best
Victor
Adrian Sobers2
Super Advisor

Re: Removing unwanted filesets - reason is space needed

The output of vg00 display is:

root:INLAND3>vgdisplay vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 2500
VGDA 2
PE Size (Mbytes) 4
Total PE 1023
Alloc PE 1022
Free PE 1
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

What do I do next?

Please explain in step-by-step. I'm newbie at UNIX thrown into deep end. Any help will be greatly appreciated.
Victor BERRIDGE
Honored Contributor

Re: Removing unwanted filesets - reason is space needed

Hi Adrian,
So your disk is bigger than I expected...
Total PE 1023 means 1023 blocks of 4Mb...
used 1022 leaving 4 MB as you have seen in sam.
You have one disk of 4 GB!
So I suspect you have 1.5 or more swap configured which is really a lot when running out of space...
Do you have ignite-ux istalled?
$ which make_recovery
/opt/ignite/bin/make_recovery
Do you have a DAT?
In which case put a tape (I hope DDS2) in it and type (as root) make_recovery -A

This will allow you to use this tape to reconstruct your vg00 => reducing your swap to something more affordable like why not 750 MB...

I have some work now but if you reply:
Yes I have a DATand Yes I ptu in a tape and made a make_recovery, And NOW??

It will be with pleasure some good hearted forumers will assist you...

Maybe me from home?

All the best
Victor