1834804 Members
2800 Online
110070 Solutions
New Discussion

extend of /opt in a LVM

 
SOLVED
Go to solution
nikolaii
Advisor

extend of /opt in a LVM

Hello,
I need to resize (also "extend") the /opt partition which resides on (or in) a volume group. I work on a hp 9000 with hp-ux 10.20. Is there a "easy" and _secure_ way to do this ?
Thanks for help.
Nico
10 REPLIES 10
Ken Hubnik_2
Honored Contributor

Re: extend of /opt in a LVM

Do you already have some free extents in vg00??
Do you have onlineJFS??

If you do not have onlineJFS then you must boot in single user mode to increate /opt.
Pete Randall
Outstanding Contributor

Re: extend of /opt in a LVM

Nico,

Unless you have the OnlineJFS product, which lets you expand on the fly, you have two choices:

1) Shutdown to single user mode, lvextend, extendfs.

2) If you have space, create a /newopt of the desired size, copy /opt contents into /newopt, switch the mounts in /etc/fstab, and reboot.

Pete

Pete
Sridhar Bhaskarla
Honored Contributor
Solution

Re: extend of /opt in a LVM

Hi Nico,

Easy way. Yes if you have Vxfs filesystems and have OnlineJFS installed. Otherwise, you will need to boot the system into single user mode and then extend it.

First you need to determine if your volume group (I assume it is vg00) has enough space. Look at vgdisplay vg00 and note down your PE size and Free PE. Multiply them and you will get free space. If your vg00 is mirrored, then devide the Free PE with 2 and you will get approximate free space. Do a 'bdf /opt' and note down the logical volume say /dev/vg00/lvol6.

Shutdown the system, interact with ISL, get into single user mode by type "hpux -is /stand/vmunix". Once you are in single user mode do the following.

#mount /usr
#mount /var
#mount /tmp
#lvextend -L new_size_in_mb /dev/vg00/lvol6
(new_size_in_mb is the total desired size not the increment)
#extendfs /dev/vg00/rlvol6
#init 3

If you get any errors in lvextend, this could be due to insufficient space and mirror inavailability. If you can post your setup, then we will detail it further.

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

Re: extend of /opt in a LVM

One other alternative is to create a new logical volume for just this portion of /opt. For example, if you need /opt increased because you want to install oracle you could just create a new logical volume vg00 or vg01/newvol and mount it to /opt/oracle.

- Chris
nikolaii
Advisor

Re: extend of /opt in a LVM

Thanks a lot for the fast answers !
I will try to make this in single-user lode, cause the whole filesystem is HFS ! But I think it's maybe more interessant to upgrade to JFS (maybe with a backup of the system, then "convert" to JFS) and then extend the partition; or ?
Nico
Sridhar Bhaskarla
Honored Contributor

Re: extend of /opt in a LVM

Hi Nico,

The first suggestion I give is to upgrade it to 11i if possible. Then you can use vxfsconvert utility to convert the hfs file systems to vxfs. 10.20 is obsolete and you should be planning for next version and it's better to go for 11i.

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

Re: extend of /opt in a LVM

It would be a good thing, but I'm not sure if the 11.x version can run on this hp 9000/800 H50 ?
Nico
Sridhar Bhaskarla
Honored Contributor

Re: extend of /opt in a LVM

awwww.. There you got me. H50 and I don't believe HP supports it anymore leave aside 11.x

-Sri
PS: No more points for me. You assigned enough already.
You may be disappointed if you fail, but you are doomed if you don't try
Pete Randall
Outstanding Contributor

Re: extend of /opt in a LVM

Nico,

H50 will only run 11.0 in 32 bit mode.

See:

http://devresource.hp.com/STK/serversupport.html



Pete

Pete
nikolaii
Advisor

Re: extend of /opt in a LVM

Very good ! It's a good thing for me if I can upgrade to a 11.x version, because there are more softs which have been ported to the 11.x version of hp-ux. Thanks.
Nico