Operating System - HP-UX
1834449 Members
2603 Online
110067 Solutions
New Discussion

how to extend /(root) in hpux 11.11

 
avizen9
Esteemed Contributor

how to extend /(root) in hpux 11.11

HI i am having one server with hpux 11.11 its having below file systems

$ bdf -l
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 1048576 0 100% /
/dev/vg00/lvol1 512499 36288 424961 8% /stand
/dev/vg00/lvol8 2097152 1481966 578078 72% /var
/dev/vg00/lvol11 614400 57429 522221 10% /var/opt/perf
/dev/vg00/lvol9 2097152 1683 1964573 0% /var/adm/crash

my /(root) got full in the samve vg i am still having 50gb free space, how i can extend /root

/(root) is lvol3 in vg00

Please reply who has done this before, thanks
9 REPLIES 9
Johnson Punniyalingam
Honored Contributor

Re: how to extend /(root) in hpux 11.11

Hi ,


my /(root) got full in the samve vg i am still having 50gb free space, how i can extend /root

One easiest way would be:

1) Check the biggest directory in root (/):

# du -k -x | sort -rn | pg

2) Go to each big subdirectories (which will be listed on top, running
the above command) and check for bigger files there:

# find . -depth -xdev -size +1000 -print

3) Check and if you think the directories/files are not needed, move or
delete it.

Note: One common reason for root file system full is a big file in
/dev. If by mistake, somebdy gave /dev/rmt/Om instead of /dev/rmt/0m during
a backup, that might make the root file system full!


Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: how to extend /(root) in hpux 11.11

<
/ root File system can be only using Ignite tape

make_tape_recovery -a /dev/rmt/_mn -I -v -x inc_entire=vg00 to back up your root
volume group. Boot off the Ignite tape and interact with the recovery
to resize your logical volumes

Explanation:-
First of all /stand, swap space and / need to contigeous.

In order to increase any of them, you will have to use ignite and
resize the partitions.

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
R.K. #
Honored Contributor

Re: how to extend /(root) in hpux 11.11

Hello Avizen,

There are three ways to resolve "root full" issue:

1. Clear the root file system by deleting unwanted files.
a) du -kx | sort -rn | head -20
b) Trim log files

2. Add another disk to Vg00 and do a pvmove of lvol4 and the extend lvol3 (a hectic method).

3. take ignite backup of VG00 and restore it, while changing the root fs size.

Also, keep a track of yout root files sys growth size....it should not growing heavily.

Regds,
R.K.
Don't fix what ain't broke
sujit kumar singh
Honored Contributor

Re: how to extend /(root) in hpux 11.11

Hi Avizen,


the suggestions from Johnsona and RK give you all possible ways to do the expansion as wished.

But where are your LVs in VG00 . the lvol4,5,6 and 7 etc.
could you please post vgdisplay -v vg00.

and also
lvdisplay -v /dev/vg00/lvol3 | grep -i -e copies -e alloaction -e status
lvdisplay -v /dev/vg00/lvol4 | grep -i -e copies -e allocation
lvdisplay -v /dev/vg00/lvol5 | grep -i -e copies -e allocation
lvdisplay -v /dev/vg00/lvol6 | grep -i -e copies -e allocation
lvdisplay -v /dev/vg00/lvol7 | grep -i -w copies -a allocation
etc

also better if you can provide with the


vgdisplay -v vg00


this shall help you know about the free space in the VG and whether on which PV is that free space vailable.

regards
sujit
Avinash20
Honored Contributor

Re: how to extend /(root) in hpux 11.11

Refer

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1313820
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
sen_ux
Valued Contributor

Re: how to extend /(root) in hpux 11.11


What about trying this.?

logical volume /dev/vg00/lvol3 will be mounted on /.This volume should be contigious and can not be extended normal way.
Order of LVs in VG00
/dev/vg00/lvol1 /stand
/dev/vg00/lvol2 Swap
/dev/vg00/lvol3 /
/dev/vg00/lvol4 /tmp
/dev/vg00/lvol5 /home
/dev/vg00/lvol6 /opt
/dev/vg00/lvol7 /usr
/dev/vg00/lvol8 /var

All these LVs will be contigious .For extending lvol3 , we need to move all LVs preceding to lvol3
Ie..lvol4,5,6,7and 8
We need a spare disk on vg00.if not add a disk to Vg00
#vgextend vg00 /dev/dsk/cXtXdX

Move all extents after root vol to the other disk.
#pvmove â n lvol source_disk dest_disk

This will move all LVs ( lvol4,5,6,7,8) to the new disk.
Now extend the root LV.
#lvextend â L 1000 /dev/vg00/lvol3
#fsadm â b 1000M /

This will extend the / FS.
Now move back all LVs to the original disk.
#pvmove â n lvol souce_disk dest_disk

This will make all LVs to reside on the original disk.
Reboot the server and check.


Thanks
sen
sujit kumar singh
Honored Contributor

Re: how to extend /(root) in hpux 11.11

hi


just suggest that if you are using pvmove to move the LV lvol4 that is just after the lvol3 that is your root asuming that you have enuf free space in the VG vg00, i shall ask you to have an Ignite backup of the server before trying to do that.

regards
sujit
Aashique
Honored Contributor

Re: how to extend /(root) in hpux 11.11

Hi,
If you have OnlineJFS then you can increase the "/" size online. No downtime required.Last week i followed the below link and increase my root partition.So please follow it.Hopefully it will help you.

http://www.symmetricwebsites.com/articles/HP-UX/hpuxDynamicallyExtendSlashAndOrStand.php

Thanks & Regards.
Aashique
R.K. #
Honored Contributor

Re: how to extend /(root) in hpux 11.11

Hi Aashique,

The link you suggested is indeed very nice....thanks for sharing such a well documented procedure.

Regds,
R.K.
Don't fix what ain't broke