1850674 Members
3529 Online
104055 Solutions
New Discussion

/opt 98% full...

 
SOLVED
Go to solution
Adrian Sobers2
Super Advisor

/opt 98% full...

/opt is very full. Attached is the output of my du command. I ran the trim system logfiles from SAM and still it is at 98%.

Does anyone have any ideas on how I can free up some space under /opt?
35 REPLIES 35
Zygmunt Krawczyk
Honored Contributor

Re: /opt 98% full...

Hi,
the only reasonable method to resolve this problem is to increase the size of /opt filesystem (or remove some not needed software)

Regards,
Zygmunt
Adrian Sobers2
Super Advisor

Re: /opt 98% full...

attached is the output from the bdf and vgdisplay commands...zipped as one attachemnt ;)
Sundar_7
Honored Contributor

Re: /opt 98% full...

du -sk * /opt also will include other filesystems like /opt/oracle.

/opt/mx and /opt/ignite are the directories you want to look at for housekeeping.

/opt is supposedly a static filesystem (unless,ofcourse, if you dont install softwares everyday :-). You have enough Free PE in the volume group. I would suggest increasing the LV size. Do u have online JFS installed ?
Learn What to do ,How to do and more importantly When to do ?
Jean-Luc Oudart
Honored Contributor

Re: /opt 98% full...

There are some directory that I would question :
Plenty of oracle some being "old" . Are all these version of oracle in use ?

Also, "inventory" (oracle again) is used when you install the product(s). They copuld be moved elsewhere and you can keep a link otherwise the location of such installation directory is kept in /var/opt/oracle/oraInst.loc

Regards
Jean-Luc
fiat lux
Adrian Sobers2
Super Advisor

Re: /opt 98% full...

Sundar,

I don't think we have Online JFS, how would I check?

What is under /opt/mx? I know the /opt/ignite is the Ignite-UX tools that was installed last month.

Also is it possible to just remove things like netscape, mozilla, etc and other software under /opt that we do not use and need. It is a production database server, period.

I tried swremove for netscape, mozilla etc but it does not work. How do you get the exact "argument" for swremove for applications under HP-UX like Netscape, Mozilla etc?

Thanks for your help.
Victor BERRIDGE
Honored Contributor

Re: /opt 98% full...

Hi Adrian,
Do you have Online-JFS?
type:
swlist|grep JFS
or swlist -l product|grep JFS

While you check that I will have a look to your joined files

All the best
Victor
Adrian Sobers2
Super Advisor

Re: /opt 98% full...

Victor,

Here is the output from the commands:

root:INLAND8>swlist | grep JFS
root:INLAND8>swlist -l product | grep JFS
JFS B.11.11 The Base VxFS File System
PHKL_24026 1.0 JFS Filesystem swap corruption
PHKL_28512 1.0 Fix for POSIX_AIO in JFS3.3
PHKL_29115 1.0 JFS Direct I/O cumulative patch
Steven E. Protter
Exalted Contributor

Re: /opt 98% full...

To original post:

trimming logs won't help with space on /opt

/opt is generally used for optinal software.

/var is for logs.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Adrian Sobers2
Super Advisor

Re: /opt 98% full...

Yes a lot of those Oracle directories on there are actually Oracle Installation CDs. The consultant that worked with us on the Oracle install put on the following installations (Oracle 8, Oracle 8i, Oracle 9i) onto our disk for ease of install and to avoid swapping CDs etc. Since we had the "space". I'm not sure we can afford to do that now the machine is in production. We only use Oracle 8i (8.1.7.4) in production. Come to think of it, I think there are also duplicates on there for difference versions like 8.0 patched and 8.0 base....hmph

Victor BERRIDGE
Honored Contributor

Re: /opt 98% full...

OK no Online-JFS installed...

That means you will have to stop oracle
all of it with the listener...
then
umount
/opt/oracle/data
/opt/oracle/archive_logs
/opt/oracle/app
then give a try with sam to extend /dev/vg00/lvol6 to 1.8 GB


Tell me if it works
What does bdf says now and what does du -sk * in /opt produce now?

All the best
Victor
Adrian Sobers2
Super Advisor

Re: /opt 98% full...

Well I will have to schedule that for after hours, working hours now...

Do I have to boot to ISL prompt or just stop Oracle and then do the business?
Victor BERRIDGE
Honored Contributor
Solution

Re: /opt 98% full...

No need to boot single user..
Just stop all that oracle and try to umount the file systems I mentionned
then you can try using sam if I remember right you did this once
or use command line:
umount /opt
lvextend -L 1800 /dev/vg00/lvol6
extendfs /dev/vg00/rlvol6

mount -a

#done!

Good luck
Victor
Victor BERRIDGE
Honored Contributor

Re: /opt 98% full...

I forgot
When oracle is stopped
and you umount /opt/oracle/data etc..
If they do not saying device busy then:
fuser -cku /opt/oracle/data etc...

How does oracle start anyway? at boot that is do you hace a start/stop script? in /sbin/rc3.d ?
if so type init 2 when you can...
and when finished
init 3 or 4 whatever you have as value for initdefault in /etc/inittab


All the best
Victor
Adrian Sobers2
Super Advisor

Re: /opt 98% full...

Victor,

Thanks, I will do this. Yes I did do something similar before practicing on the old server. Look, it came in handy!

One more question, how do I tell how much space I have to extend my volume groups? Is this available from a command or through SAM?
Victor BERRIDGE
Honored Contributor

Re: /opt 98% full...

Looking at your vgdisplay of vg00
you have
Free PE 2136
that means so many blocks of 8 MB...
You can lvextend to using -L ...
so I now would say -L 2500

So your new filesystem size after extendfs will be of 2.5GB..

All the best
Victor
Adrian Sobers2
Super Advisor

Re: /opt 98% full...

Victor,

I just drafted up a plan to extend the filesystem. Could you please review it and comment please? I'll pass it on to superiors after your feedback and confirmation ;)
Patrick Wallek
Honored Contributor

Re: /opt 98% full...

I think you will have a hard time umounting /opt even after you stop the Oracle processes.

Once Oracle is stopped, do an 'fuser -cu /opt' to see other processes are using the mount point.

I have a feeling you will find a lot.

I think it would be easier to reboot the machine, interrupt the boot, and then come up into single-user mode. At that point you can do all you need to do to extend /opt. Just note that in single-user mode you will need to use the statically linked LVM commands located in the /sbin directory.

Making and Ignite tape is a good idea, but I'm not sure why you are copying the kernel. You aren't making any kernel changes.
Adrian Sobers2
Super Advisor

Re: /opt 98% full...

updated plan
Victor BERRIDGE
Honored Contributor

Re: /opt 98% full...

Hi Adrian,
following Patrick advice will let you get more familiar with single user mode..
I vote for it not that the other alternativeisnt good I do it when needed but maybe experience makes me unaware of difficulties a novice may find...
So In single user you will go remember extendefs the character device rlvol6

the alternate method will be a init 2 or init S
With luck it will close all applications running, if not you will have to ...
then umount all the /opt/* lvol before /opt

extend...
then mount -a (lazy way)
then init 3 (4?)
You will see on the console the new processes start, you can see them logged in /etc/rc.log
if oracle doesnt have a stop/start script in /sbin/init.d linked to the good level (/sbin/rc3.d) then start oracle by ???


All the best
Victor

Sยภเl Kย๓คг
Respected Contributor

Re: /opt 98% full...

Adrian
from ur bdf I understood the /opt/oracle/data and /opt/oracle/archive_logsis are in a diffrent disk.
This situation i would sugest you to back up both oracle/data and oracle/archive_logsis.

then
#pvcreate -f /dev/rdsk/
#vgextend vg00 /dev/dsk/
#lvextend -L /dev/vg00/lvol6 /dev/dsk/

don't forget to umount /opt/oracle/app/ before doing this.

then create oracle/data and oracle/archive_logsis under /opt.Then restore data.

regards
SK
Your imagination is the preview of your life's coming attractions
bhavin asokan
Honored Contributor

Re: /opt 98% full...

hi,

you can extend the /opt without rebooting in single user mode.i have done it so many times (last one was 1 week before).
take the backup as per your procedure.
1. stop all the database applications and database.

2. check anybody is using the mount point by fuser.

#fuser -cu /opt

3.if no user is existing you can proceed the umount

4.if it is showing root only then use fuser to remove it.(if some other user is existing then findout it is any application related one.if not proceed with following.otherwise shutdown that application)

#fuser -ku /dev/vg00/lvol6

check again by fuser -cu command.


5. umount /opt
6. lvextend -L 2500 /dev/vg00/lvol6
7. extendfs -F vxfs /dev/vg00/rlvol6
8. mount /dev/vg00/lvol6 /opt
9.check by lvdisplay,bdf
#lvdisplay /dev/vg00/lvol6

9.start database and applications.

regds,

Adrian Sobers2
Super Advisor

Re: /opt 98% full...

I've attached what I consider the final plan for extending the volume group. Could someone please review it for correctness. Feedback would be greatly appreciated.
Victor BERRIDGE
Honored Contributor

Re: /opt 98% full...

Hi Adrian,
You seem to go for the second alternative..
So remember You will NOT be able to umount /opt while the other file system under /opt are mounted
You will need to umount them first..

Good luck
Victor
Sridhar Bhaskarla
Honored Contributor

Re: /opt 98% full...

Hi Adrian,

I am afraid you will need to boot the system in singleuser mode to extend /opt. It's not a good idea to kill the processes accessing /opt. Even if you do, you wouldn't know how to start them back. For ex., 'dced' runs from /opt.

If you have OnlineJFS installed

swlist -l product |grep -i onlinejfs
grep vxadv /stand/system

then you can do it online.

lvextend -L 2560 /dev/vg00/lvol6
fsadm -b 2560m /opt

If you don't have OnlineJFS, bring down the applicatiosn and the database, reboot the system, interact with ISL and bring it up in single user mode. Once in there, do

#mount /usr
#mount /tmp
#mount /var
#lvextend -L 2560 /dev/vg00/lvol6
#extendfs -F vxfs /dev/vg00/rlvol6
#mount /opt
#bdf /opt
(verify that it is 2.5 Gigs)
#init 3

-Sri
You may be disappointed if you fail, but you are doomed if you don't try