Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extending /usr

Status
Not open for further replies.

butterfm

Programmer
Feb 15, 2002
132
0
0
GB
Hi,

I'm trying to apply some patches to a HP-UX 11.11 box and am running out of space in /usr. I therefore need to extend /usr. To extend it it needs to be unmounted, which is clearly not a sensible thing to do.
Does anybody have any suggestions how to extend /usr either in SAM or on the command line.

Thanks,
Matt.
 
As far as i am aware you cannot do this, certainly with thre HP boxes i have worked on.
It may be worth looking into the cleanup command which can get rid of superceded patches thus giving you some space.
I have a rough doc on the increase of /var below, if it is of any use to you.


Do the following:

Log in as root.

Find out if any space is available:

/sbin/vgdisplay

You'll see output something like this:


--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 2000
VGDA 2
PE Size (Mbytes) 4
Total PE 249
Alloc PE 170
Free PE 79
Total PVG 0

The Free PE entry indicates the number of 4Mb extents available, in this case, 79 (316 Mb).


Change to single user state:

/sbin/shutdown
Break boot
bo pri ISL

hpux -iS

This will allow /usr to be unmounted (see below).


Check to see where /usr is mounted (/dev/vg00/lvol7 by default):

/sbin/mount

You'll see output such as:


/ on /dev/vg00/lvol1 defaults on Sat Jan 28 23:19:19 1995
/usr on /dev/vg00/lvol7 defaults on Sat Jan 28 23:19:28 1995

unmount the filesystem

Extend the logical volume:

/sbin/lvextend -L new_size /dev/vg00/lvol7

For example,


/sbin/lvextend -L 332 /dev/vg00/lvol7

increases the size of this volume to 332Mb.


Unmount /usr:

/sbin/umount /usr

This is required for the next step, since extendfs can only work on unmounted volumes.


Extend the file system size to the logical volume size.

/sbin/extendfs /dev/vg00/rlvol7


Remount /usr:

/sbin/mount /usr


Return the system to its normal run level:

exit

The system will prompt you for a new init state; enter 3 or 4.


 
Thanks Drill,

Looks like you might be right. Tried your notes above which are similar to some I was sent by HP and they didn't work. Looks like HP sent me notes for extending /var as well but there seems to be some difference to extending /usr.

Managed to create just enough space to apply the patches by moving the man pages elsewhere and creating a symbolic link.

I will look into the cleanup command.

Many thanks,
Matt.
 
I would use Ignite to extend /usr, you get an option when you boot off the recovery CD to set the sizes of the filesystems.
 
Do you have online JFS installed.

Give this

swlist | grep -i online*

if it is installed then you can extend the filesystem provided you have space on LV.

Thanks
 
If you haven't got Online JFS, this is what I've done once : take system so single user mode, kill all processes using /etc (the system won't crash or something!), unmount the file system, lvextend, extendfs and mount again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top