Operating System - HP-UX
1826631 Members
3359 Online
109695 Solutions
New Discussion

Re: How to increase /opt file system?

 
SOLVED
Go to solution
Steve Yang_2
Advisor

How to increase /opt file system?

When I tried to install DB2 on HP-UX, I was told not enough space on /opt. I can not change the install directory. When I used umount and extendfs command to increase /opt, it prompted me that the filesystem was busy.

How can I increase /opt ?or do I have to reinstall the system ?
steve_yxf
8 REPLIES 8
Patrick Wallek
Honored Contributor
Solution

Re: How to increase /opt file system?

It sounds like you do NOT have the Advanced JFS (Online JFS) product. Pity. It would be much simpler if you did.

Since you don't the easiest thing is going to be to reboot your system, interrupt the system when it says "press any key in 10 seconds....." and boot into single user mode.

When in single-user mode you can then extend /opt without any problem. Be sure to mount the other VG00 LV's (especially /usr) so that you have all the commands you need.
PIYUSH D. PATEL
Honored Contributor

Re: How to increase /opt file system?

Hi,

If you have free extents left in the vg00 ( root volume group) then you can increase the /opt filesystem by booting the system into the single-user mode.

If you dont have the free extents then you may have to add another harddisk to the root volume-group or you may have to free some space from the /opt fileysystem if possible. If you cannot add a new harddisk then you can reinstall the OS.


HTH,
Piyush
Michael Tully
Honored Contributor

Re: How to increase /opt file system?

Unless you have the On-Line JFS product, forget it. You'll need to boot into single-user mode and do it that way as suggested by Patrick. To check if you have the product.

$ /usr/sbin/swlist -l product | grep -i jfs
JFS B.11.11 The Base VxFS File System
OnlineJFS B.11.11 Online features of the VxFS File System

If you do have this product, assuming new size is 2Gb. For the sizes in blocks you can refer to the 'fsadm_vxfs' man page.

# lvextend -L 2048 /dev/vg00/lvol?
# fsadm -F vxfs -b 2097152 /opt
Anyone for a Mutiny ?
PIYUSH D. PATEL
Honored Contributor

Re: How to increase /opt file system?

Hi,

How to add a new hardisk to the vg00. Boot in single user mode.

Umount /opt: umount /opt

1. Create LVM info to the unused disk:

#pvcreate -f /dev/rdsk/c?t?d0

2. Add the unused disk to vg00:
#vgextend vg00 /dev/dsk/c?t?d0

3.Increase the logical volume:

#lvextend -L /dev/vg00/lvol6 /dev/dsk/c?t?d0


Extend the filesystem:
#extendfs -F /dev/vg00/rlvol?

Remount /opt:
mount /opt

HTH,
Piyush
Amruth
Regular Advisor

Re: How to increase /opt file system?

Hi,

I would rather suggest you to take an ignite backup. While restoring go to advanced options and increase your /opt size then continue restoration.

Hope this helps...

Regards,
AM
If i am doing the same way you are doing to me then what is the difference between us.
Patrick Wallek
Honored Contributor

Re: How to increase /opt file system?

Amruth,

While taking an ignite backup and then booting from that tape is a viable option. I think it is overkill and not necessary in this case and would take much more time than you need to in this case.

/opt does NOT have to be contiguous like /, /stand and primary swap (lvols 1, 2 and 3) so you don't have to use the ignite backup here.

The only time an ignite backup is the best option is when you want to extend /, /stand or pri. swap.

T G Manikandan
Honored Contributor

Re: How to increase /opt file system?

THe document attached will be helpful if you do not have Online Jfs.


Also,

you can create a link to opt from some other file system for installation so that /opt is not taken for space

eg.

ln -s /home2/DB2 /opt/DB2

You can install DB2 under a file system which has enough space eg.home2 and link that to opt so that your application can refer to /opt/ file system.

If /opt is to used for all application installations then I think it should have around 10GB of space.
I have seen oracle,WEbsphere,Weblogic,DB2 and many other application to be installed on /opt.
So you can just create a link from other file system to /opt.

but make sure that you document it so that the next administrator does not delete the files on ignorance.


Thanks
Yogeeraj_1
Honored Contributor

Re: How to increase /opt file system?

hi,

There is also an online document which explains how to Adjust File System Sizes such as /usr, /opt, /stand or /var.


http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/5187-0103/5187-0103_top.html&con=/hpux/onlinedocs/5187-0103/00/00/44-con.html&toc=/hpux/onlinedocs/5187-0103/00/00/44-toc.html&searchterms=/opt%7cincrease&queryid=20020811-204641

Of course, if you don't have online JFS.

hope this helps!
Regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)