Operating System - HP-UX
1752577 Members
4586 Online
108788 Solutions
New Discussion юеВ

Re: root file system size increment

 
SOLVED
Go to solution
chetana07
Frequent Advisor

root file system size increment

How to increase the size of root file system(/) in HP-UX 11.11i?
4 REPLIES 4
MarkSyder
Honored Contributor

Re: root file system size increment

First question: why? The root filesystem is supposed to be static. Check what's in it and you'll probably find stuff that should be elsewhere. One frequent problem is mis-typing a tape device name and ending up with a large file in /dev: find /dev -type f -print

If after checking these things you still need to increase /, the only HP supported way is to take an ignite backup and resize the filesystem when you restore from it.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Pete Randall
Outstanding Contributor

Re: root file system size increment

It's possible but / needs to be contiguous so you're going to have to shrink the succeeding LV (/home) and then use that reclaimed space. The better, easier approach is to use Ignite to make a make_tape_recovery backup of vg00 and then rebuild using that tape and resize your LV's.

An even better approach is to clean out / so you don't have to enlarge it. / should be quite static, unless you're mis-using it by putting files there that don't belong. Take a good look at just what you've got in there and maybe you can re-arrange things so you don't have to expand at all.


Pete

Pete
Rasheed Tamton
Honored Contributor
Solution

Re: root file system size increment

The best way is to make a ignite recovery boot tape with interactive recovery option.

make_tape_recovery -AIv -a /dev/rmt/tape_device

see man make_tape_recovery

-I Causes the system recovery process to be interactive when
booting from the tape. By default, when the systems boots
from the recovery tape, it will allow ten (10) seconds to
interrupt the automatic recovery process in order to make
modifications interactively. When the -I option is
specified, booting from the tape will always present the
interactive menus. This option is useful when making configuration changes during the recovery, and may also help
prevent an accidental system recovery from a recovery tape.

When the system boots through the ignite tape, you will get interactive menu, and you can modify the / (root) partition as per your available physical extents (PE) on the VG00.

Jollyjet
Valued Contributor

Re: root file system size increment

chetana I suggest you to take the ignite backup and change the directory structures as you like.

Below are the steps to extend the root file system but I suggest not to take risk if you are proceeding be care ful on the steps.


Boot the system in single user mode and extend the root using the lvextend command and it will extend the root logical volume.
Make sure that the space to extend the root LV is available in the same disk as continuous physical extents because the root volume allocation poicy must be contigous.
If the adjacent physical extents are occupied by any other LV move that logical volume to some other disk using pvmove command.
#pvmove -n /dev/vg00/lvolx /dev/dsk/c0txd0 /dev/dsk/c0txd0
Shutdown the machine and interrupt the normal boot process by pressing any key if it is a S800 system and if it is S700 use "esc" key.
From the boot admin prompt type boot pri isl you will get the isl prompt
ISL> hpux -lm
This will take you to the logical volume maintanence mode. Don't try to mount any logical volume and don't switch to multiuser mode or a different runlevel.
The root LV will now be mounted on /dev/root instead of /dev/vg00/lvolx
Now you can execute the extendfs command on the root logical volume:
# extendfs -F hfs /dev/vg00/rlvolx
Note down the alternate superblock locations and reboot the macine using
#reboot -n -------------- DONT MISS THIS STEP.
This will cause the system to not sync the old superblock back to the filesystem and damage it.
When you boot the system normally now you will get all the allocated space for the root filesystem.
Now you will notice that the root volume is still mounted on /dev/root rather than /dev/vg00/lvolx. To correct this you remove the /etc/mnttab and you will find bdf now displays the correct logical volume