Operating System - HP-UX
1826493 Members
4026 Online
109692 Solutions
New Discussion

Re: Best way to add space to /OPT

 
SOLVED
Go to solution
Rita D'Elia_1
Occasional Contributor

Best way to add space to /OPT

What is the best process to add disk space to /OPT? I tried SAM but was not successful.
Thanks! I'm rather new to HP-UX and appreciate any and all suggestions.
10 REPLIES 10
Mel Burslan
Honored Contributor

Re: Best way to add space to /OPT

if sam is not able to add this space, it means that you may have a problem with either insufficient disk space or maybe unbalanced mirroring or many other things.

It would help if you can tell us what kind of error message you got back from sam.
________________________________
UNIX because I majored in cryptology...
Rita D'Elia_1
Occasional Contributor

Re: Best way to add space to /OPT

The message is that the filesystem is still mounted. I was able to add space to the /u05 filesystem using SAM, but not /OPT. Any idea why SAM did not unmount OPT?
Pete Randall
Outstanding Contributor

Re: Best way to add space to /OPT

The reason you were unable to extend with SAM is because the file system needs to be unmounted in order to run the extendfs. The easiest way, unless, of course, you have OnlineJFS, is to boot into single user mode. Your file systems will be unmounted. I usually do a "mount -a" so that all my commands, utilities, etc are available to me, and then do a "umount /opt". You can then go into SAM and extend /opt.


Pete

Pete
Geoff Wild
Honored Contributor
Solution

Re: Best way to add space to /OPT

Because it was busy....

If you don't have online jfs - then you need to un mount it.

fuser -cu /opt

will tell you all the processes that have /opt locked.

do a
ps -ef |grep PID
to see what they are...

You will probably need to shut some stuff down...

Check output of:

vxlicense -p

and

/sbin/fs/vxfs/vxenablef

to see if you have online jfs...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
James R. Ferguson
Acclaimed Contributor

Re: Best way to add space to /OPT

Hi Rita:

If you were unable to increase the size of the '/opt' filesystem, I would guess that either you don't have enough free physical disk extents to enlarge the underlying logical volume; or that the filesystem must be unmounted to enlarge it.

As already mentioned, please post any error messages.

Regards!

...JRF...
Rita D'Elia_1
Occasional Contributor

Re: Best way to add space to /OPT

I ran the "ps" and "fuser" commands and got the output below. If I'm not mistaken, I should be able to turn these all off?
#fuser -cu /opt
/opt: 1133mt(root) 1204mt(root) 2998mto(root) 1408mto(root) 134)

root@labsvr.crmchealth.org[/]
#ps -ef | grep 1133
root 1133 1 0 Feb 18 ? 0:14 /opt/dce/sbin/rpcd
root 19604 19561 1 12:41:31 pts/ta 0:00 grep 1133
root@labsvr.crmchealth.org[/]
#ps -ef | grep 1204
root 1204 1 0 Feb 18 ? 1:44 scrdaemon
root 19877 19561 0 12:41:46 pts/ta 0:00 grep 1204
root@labsvr.crmchealth.org[/]
#ps -ef | grep 2998
root 2998 1389 0 Feb 18 ? 0:17 /opt/perf/bin/agdbserver -t ala/
root 2999 2998 0 Feb 18 ? 0:37 /opt/perf/bin/alarmgen -svr 299a
root 19879 19561 1 12:41:56 pts/ta 0:00 grep 2998
root@labsvr.crmchealth.org[/]
#ps -ef | grep 1408
root 1408 1 0 Feb 18 ? 7:24 /opt/perf/bin/scopeux
root 19882 19561 1 12:42:15 pts/ta 0:00 grep 1408
Geoff Wild
Honored Contributor

Re: Best way to add space to /OPT

scopeux

Can stop with

/sbin/init.d/mwa stop

That should stop agdbserver and alarmgen as well...

For rpcd:

/sbin/init.d/Rpcd stop

For scrdaemon:

/sbin/init.d/scrdaemon stop

Then try to extend, then start those up.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: Best way to add space to /OPT

While these daemons most likely can be turned off individually, I maintain that it is far simpler to reboot into single user mode. Even if you get all the daemons stopped, you still may not be able to unmount!


Pete

Pete
AshishJain_USA
Frequent Advisor

Re: Best way to add space to /OPT

Hi Rita

/opt will have lots of runing stuff in an online systems. so,the best way ( in the absence of online JFS ) is to

1. boot the system in single user mode
2. vgchange -a y /dev/vg00
3. mount /usr

Once u are done with this, u can do lvextend and extendfs to increse the space.

rgds...Ashish
Rita D'Elia_1
Occasional Contributor

Re: Best way to add space to /OPT

I am closing this thread as it seems that I will need to boot to single user mode as suggested in this thread in order to expand the space. Thanks for all the input!