1847097 Members
5067 Online
110262 Solutions
New Discussion

Re: Extending /opt

 
SOLVED
Go to solution
subodhbagade
Regular Advisor

Extending /opt

Hello Expert,

I am using hp-ux production server 11.11 and Sap application are running on it, need your help for following task.

I don't have online Jfs product installed on server.

1)I have to extend the /opt, but during umounting it showing device is busy.i tried with
#fuser -ku /opt
#kill -9 pid

but still device showing busy.

2)I think so i have to boot the interupt sequence and go into ISL mode for single user mode.

3)But can you give me exact steps and command to go into single user mode and again back to multiuser mode without affecting running appln.Hopes this will help to umount the file system.

3)which file system needs to be unmount in single user mode?

thanks in advance.

Regards,
subodh.
10 REPLIES 10
James R. Ferguson
Acclaimed Contributor

Re: Extending /opt

Hi:

If you don't have Online JFS (and you should!) then you can't use 'fsadm' to resize a filesystem without unmounting it.

If this is the case, you must unmount the filesystem in order to 'extendfs' it. For most 'vg00' filesystems it is easiest if you *boot into* single user-mode where only the root filesystem is mounted. Use the commands in '/sbin' or in your specific case, mount '/usr' since this isn't the filesystem that needs extension.

It is cleanest, when done, to simply reboot again and resume normal production.

Regards!

...JRF...
Vivek Bhatia
Trusted Contributor
Solution

Re: Extending /opt

Hi,

1. Interrupt the boot sequence at BCH
2. check for the bootable devices using
sea ipl
3. then run bo P0 (boot as per the path)
4. Then interact with ISL
5. Then do hpux -is at the isl prompt
#hpux -is

6.check weather /opt is unmounted or not
If not then unmount the filesystem
7. do a lvextend to increase the size of the logical volume.
#lvextend
8. Do a extendfs for extending the filesystem
#extendfs

Then mount the filesystem and check if everything is working fine and then boot the system in the multiuser mode

Thanks
Vivek Bhatia
SKR_1
Trusted Contributor

Re: Extending /opt

Extend the File system from single user mode.

lvextend -L size(M) lvolname
extendfs -F vxfs -b size(M) /opt

Thanks

SKR
Sandeep_Chaudhary
Trusted Contributor

Re: Extending /opt

as mentioned above:

reboot server

interrupt BCH and boot with primary boot disk
interrupt ISL and type "hpux -is"
make sure that /opt not mounted.
extend size of /opt with "lvextend -L newlvsizeinmb /dev/vg00/lvol6

extendfs -F vxfs /dev/vg00/rlvol6

reboot system
Peter Eichhorn
Occasional Contributor

Re: Extending /opt

We use here a modified /etc/lvmrc script which allows us to autoextend all filesystems (except the boot filesystem) at boottime. We just do an lvextend, then uncomment or add the lvol in lvmrc and reboot without any interaction. We use and need this way because we support the systems via remote access. This way works fine for HP-UX 10 and 11.

If you want I can send you a copy of that script.

regards,
PeterE
likid0
Honored Contributor

Re: Extending /opt

Hy Peter Eichhorn,

You could upload the modified lvmrc script, to give it a look, sound great.

thnx
Windows?, no thanks
MarkSyder
Honored Contributor

Re: Extending /opt

An alternative is to create a new filesystem, /opt/product (where product is the new product you are installing). You can do this without interruption to your users.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Peter Eichhorn
Occasional Contributor

Re: Extending /opt

Sorry for the delay. But here comes my script to autoextend the file systems at boot time.

To install the new script save it as /etc/lvmrc.myone (or what ever name your want) and do:

cp -p /etc/lvmrc /etc/lvmrc.HP
cp /etc/lvmrc.myone /etc/lvmrc
chmod 444 /etc/lvmrc*
chown bin:bin /etc/lvmrc*

Next lvextend all lvols you want to extend and edit /etc/lvmrc. Uncomment one or some of the pre-defined '/sbin/extendfs' lines or add your own one at the end in function 'custom_vg_actions'.

Control your changes for syntax errors with:

/sbin/sh -xp /etc/lvmrc

There should be NO error!

Now reboot the system and after it is up again control the logfile /etc/lvmrc.log

After the file system has been extended you can comment out the line
AUTO_VG_ACTIVATE=0 at top page of the script but there is no need to do so. This script function is reboot-save.

After rebooting you can comment out the '/sbin/extendfs' in the lvmrc script but there is no need to do so.

Hope this helps. For me it works fine with HP-UX 10 and 11.

- PeterE
SKR_1
Trusted Contributor

Re: Extending /opt

>> extendfs -F vxfs -b size(M) /opt

Sorry, this is not the right syntex, you need to give

extendfs -F vfxs /dev/vg00/lvolname

Thanks

SKR
sreekanthtm
Trusted Contributor

Re: Extending /opt

Hi,

>> But can you give me exact steps and command to go into single user mode and again back to multiuser mode without affecting running appln???

No, you cannot. Reboot is compulsory.

Vivek Bhatia is exactly right in describing the steps. One add.... You need to mount /usr file system manualy.
# mount /usr
OR
# mount /dev/vg00/lvol7 /usr

Rgds
Sreekanth