Operating System - HP-UX
1855501 Members
2938 Online
104111 Solutions
New Discussion

"/" root & "/usr" increase

 
SOLVED
Go to solution
Megassini
Occasional Contributor

"/" root & "/usr" increase

I want to encrease the space of the "/" (root) & "/usr" filesystem.
System :
HP-UX 11.00
on a N4000 system
10 REPLIES 10
James R. Ferguson
Acclaimed Contributor

Re: "/" root & "/usr" increase

Hi:

If you have Online JFS this should not be a problem. If you do not, then you can use Ignite to make a make_tape_recovery tape from which you can (re)ignite your system specifying larger filesystem sizes.

...JRF...
Mark Mitchell
Trusted Contributor

Re: "/" root & "/usr" increase

You have to bring the server to single user mode to do this unless you have them set up
as VXFS file systems. Do a man on lvextend if this is the case.
Also, how much disk do you have, are they mirrored, do a vgdisplay -v vg00 and see
if there is any un-allocated space.
Vincenzo Restuccia
Honored Contributor

Re: "/" root & "/usr" increase

For /usr:
if you have online jfs
#fsadm -F vxfs -b xxx
if not:
boot in single user:
lvextend -L xxx /dev/vg00/lvolxx
extendfs -F vxfs /dev/vg00/rlvolxxx

For /root not is possible beaucouse is contiguous with dump and stand.
James R. Ferguson
Acclaimed Contributor
Solution

Re: "/" root & "/usr" increase

Hi (again):

Oops! Vincenzo is correct. Since "/" is contiguous, it is doubtful that you will be able to extend it directly.

Short of playing games to move lvol4 to a different physical place on the disk (since its extents are probably immediately adjacent to lvol3), thereby creating new contiguous space for lvol3...Ignite recovery is the best, sureest solution for you.

...JRF...
Dan Bonham
Advisor

Re: "/" root & "/usr" increase

Hello,
If you ever need to extend / or /stand, you should definitely use ignite-ux. It is very easy. If you do not have Ignite installed you can download it from HP or if you have the application CD's it will be on there. You should download the Ignite Documents as well, they have very clear directions on how to do this. You will simply us make_recovery to create a recovery tape. then you will boot from the recovery tape and restore the system. During the process you will have a chance to change the size of / and /stand.

good luck

Rusty Sapper
Bill Hassell
Honored Contributor

Re: "/" root & "/usr" increase

 


Bill Hassell, sysadmin
Mark Bak
Occasional Advisor

Re: "/" root & "/usr" increase

I just went through an exercise yesterday to increase /stand on an 10.20 system. It can be done without having to use Ignite. I found a doc on HP's doc web site, Part No. B2355-90703, look at pages 84 + 85 in Appendix B. It worked pretty well for me except for two little snags:
#1 Make sure Kernel Parm "maxswapchunks" is big enough. If you make a bigger new swap space than your old one SAM will want to do a Kernel re-build for you. Back out of the Logical volume creation and do the Kernel build seperately using the value Sam suggests to you.
#2 Sam will put your new swap logical volume in /etc/fstab. Then on re-boots you'll get an error from the startup script S500swap_start. Just edit /etc/fstab and remove the line that Sam added.

Other than that it worked really well.
David Hixson
Advisor

Re: "/" root & "/usr" increase

I'll agree that re-installing the OS or using ignite is certainly the easiest way, but you can use mirror-disk UX to increase /, /stand, or whatever.

The basic idea for increasing / with mirror'd disks is:
Given disk 1 and disk 2 are mirrors.
determine the physical order of the lvols on the disks... and un-mirror all of the lvols after the one you want to extend. Remove the mirrors from disk 1. Then lvextend the lvol as needed (be aware of any limits) then mirror the removed lvols back from 2 to 1.... and remove them all from 2. Then mirror back, again, and in the same order, starting with the lvol you extended.

It takes a VERY long time, but you can do it while the system is live. With Online JFS you can extend the filesystems and everything.

Oh, and make sure you have good backups before you start... gremlins hate backups, but they love people who do 'stupid lvm tricks'.
LVM is a powerful tool in the hands of the devious.
Carlos Fernandez Riera
Honored Contributor

Re: "/" root & "/usr" increase

To increase these filesystems it not necesary make_recovery, but you must reboot.

The correct is :

shutdown -r

stop boot

on ISL: hpux -is

after boot:

vgchange -a y /dev/vg00

do lvextend for / and /usr
do extendfs ( if HFS) for / and /usr


reboot.



Regards.

unsupported
Wieslaw Krajewski
Honored Contributor

Re: "/" root & "/usr" increase

Hi,

I exactly share Bill Hassell opinion that increasing root file system should be avoided. Reasons are well presented in Bill's answer.
But I'd like to join your technical discussion how to increase root file system if somebody wants to do this. I did this a couple of times in version 9, 10 and 11 of HPUX.

Now, definitely the easiest way is to use make_recovery tape. No special technical knowledge is required.

But it is also possible without Ignite. But requires an extra disk that must be added to vg00, just for a time of increasing root file system. Because as you have mentioned LV with root file system must be contiguous, the main idea is to pvmove to this new disk LVs next to LV with root file system (for example lvol4, lvol5, ..., assuming that root file system has been created in lvol3).
Than after such freeing physical extents that are immediately after lvol3, we may lvextend lvol3 in contiguous way. And after this we must pvmove back all these LVs that were previously moved to new disk, and we canremove extra disk from vg00.

Of course this is possible if we have On-line JFS.
Seems to be quite simple too.

From technical point of view it is slightly more complicated to lvextend lvol1, i.e. boot file system but possible.

However, I'd like to add that definitely I am not a lover of lvol1, lvol2 and lvol3 lvextending.

Rgds.
Permanent training makes master