Operating System - HP-UX
1833322 Members
3055 Online
110051 Solutions
New Discussion

Re: Increasing the size of /usr

 
Stuart Lloyd_2
Advisor

Increasing the size of /usr

How do I increase the size of /usr? The error says that /usr has to be unmounted and I can't unmount it because there are about a hundred processes using it.
Charlie don't surf.
13 REPLIES 13
RAC_1
Honored Contributor

Re: Increasing the size of /usr

You can increase a file system online if you have advanced online JFS installed. Check if you have one. -- swlist|grep -i online.

If you dont have online JFS installed, then you will have to unmount the file system, but as processes are accessing /usr, you will need to go to single user mode and do that.

Interrupt the boot process. On ISL prompt do hpux -is, once in single usermode do as follows.

/sbin/lvextend -L "new_size_in_MB" /dev/vg00/lvolxx
/sbin/extendfs /dev/vg00/lvolxx

and reboot the machine and check if it has been extened with bdf /usr

Anil
There is no substitute to HARDWORK
Bryan D. Quinn
Respected Contributor

Re: Increasing the size of /usr

Hello Stuart,

If you do not have OnlineJFS, then you must boot your box into single user mode. To boot into single user:

1. reboot and stop the boot by 'pressing any key' when prompted on the console.

2. Boot from primary: 'bo pri'

3. At the ISL prompt: 'hpux -is'

4. When you get a prompt, extend lvol (lvextend) and extend file system (extendfs).

5. mount /usr

6. bdf to verify new size.

7. Reboot or init to your normal run level.

Hope this helps!

-Bryan
Jean-Luc Oudart
Honored Contributor

Re: Increasing the size of /usr

/usr is used in multi user mode
reboot in single mode
and then you can extent /usr

Regards,
Jean-Luc
fiat lux
G. Vrijhoeven
Honored Contributor

Re: Increasing the size of /usr

Hi Steward,

sed 's/tmp/usr/' <

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=541943

HTH,

Gideon

PS. I think only the contiguous part needs to be added to RAC's anwser.
Pete Randall
Outstanding Contributor

Re: Increasing the size of /usr

If you have enough space, a simple way to accomplish this is to make a new file system of the desired size, copy the contents of /usr to this /newusr, then switch the mount points in /etc/fstab and reboot.


Pete

Pete
Fabio Ettore
Honored Contributor

Re: Increasing the size of /usr

Hi,

that error is expected.
/usr is a filesystem that system uses normally; then you should boot in single user mode:

# shutdown -ry 0 ---> Interrupt boot ---> sea ---> boot pri ---> interact eith IPL, yes ---> hpux -is

# mount -a
# lvextend -L /dev/vg00/lvol7
usually it is lvol7 but check bdf
# extendfs -F vxfs /dev/vg00/rlvol7

# init 3

Check all by bdf.

HTH.

Best regards,
Ettore
WISH? IMPROVEMENT!
SS_6
Valued Contributor

Re: Increasing the size of /usr

What commands you are using for extending file system. If you hav online JFS installed than do the following. For example extending /usr to new size of 2GB.
#lvextend -L 2000 /dev/vg00/lvolxxx
#fsadm -b 2000M /usr
By providing solutions I am helping myself
Mobeen_1
Esteemed Contributor

Re: Increasing the size of /usr

If you don't have online jfs then you have no option other than unmount the /usr filesystem and extend.

rgds
Mobeen
SureshKumar_2
Valued Contributor

Re: Increasing the size of /usr

Hi

*) Do u have online JFS ? If yes, it is possible.

------ dont have jfs ----------
IF REBOOT IS NOT POSSIBLE, now CAN BE LATER
--------------------------
*) I suggest u may prefer, create a new LV as required size, as per pete randall.
#lvcreate -L /dev/vg00
(When u give this command it will show the lv name u had been created)
mount in new dir
#newfs -F vxfs /dev/vg00/r
#mkdir /newusr
#mount /dev/vg00/ /newusr
copy the content of /usr to /newusr.
#cp -rp /usr /newusr
change the /etc/fstab entry towards /usr mount point as new LV u have created. Reboot when u get time as convinent.

IF REBOOT IS POSSIBLE IMME.
--------------------------
*) Bring down system run level to single user mode.
#init s
Note down the lvname in bdf output
#bdf
#lvextend -L /dev/vg00/
Note down fstype of lv from /etc/fstype
#extendfs -F /dev/vg00/r
Mount all Local FS
#mount -a
Confirm the size of lv
#bdf
Bring up the system run level to 3.

Hope these will help you

suresh
Things are very easy, when u know about it...
Syed Shaffat Ali
Occasional Advisor

Re: Increasing the size of /usr

I agree with Mobeen. Single user mode is the best option.
Mark Grant
Honored Contributor

Re: Increasing the size of /usr

I have done it in a rather dodgy way in the past by simply re-booting.

Extend the logical volume which you can do online with or without OnlineJFS. Then put the "extendfs" command in the startup scripts before the /usr filesystem is mounted. Then you need merely re-boot the system. Of course, if it fails you have to go to single user mode to sort it out so be careful.

It was useful enough to start reading a config file which if it existed, contained the filesystems to extend and extend it.



Never preceed any demonstration with anything more predictive than "watch this"
Stuart Lloyd_2
Advisor

Re: Increasing the size of /usr

When I try to # extendfs -F vxfs /dev/vg00/rlvol7 I get "cannot stat".
Charlie don't surf.
Paul E. Rogers`
New Member

Re: Increasing the size of /usr

I cannot begin to tell you what a valuable resouce these boards are and have been. This is exactly the information I was looking for when I opened my e-mail today.

The recommendations worked perfectly and now I can stop getting the vxd out of space errors. Thank you all!