1752613 Members
4523 Online
108788 Solutions
New Discussion юеВ

Re: how to extend /root

 
SOLVED
Go to solution
jayola
Occasional Contributor

how to extend /root

somebody tell me how i can extend root for hpux11
i am new for this
8 REPLIES 8
avizen9
Esteemed Contributor
Solution

Re: how to extend /root

Hello

you can not just simpley extend root / by lvextend

you need to create ignite backup tape and boot from the tape,

there are many same thread here you can search it will get more and more informaiton.
Johnson Punniyalingam
Honored Contributor

Re: how to extend /root

First, do a "vgdisplay -v vg00" and a "bdf" to determine what file
systems you have that are not part of the / file system. Then do a "du -sk
/* |sort -n" to see the size of what exists under /, ignoring the other
mounted file systems. This will tell you where most of the space is
being consumed.

/root File system can only be increased by "Ignite",

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
DeafFrog
Valued Contributor

Re: how to extend /root

Johnson Punniyalingam
Honored Contributor

Re: how to extend /root

Check for core files:

#!/bin/sh
HOST=`uname -n`
cat /dev/null >/tmp/core.find.txt
for i in `find / -name core -type f`
do
file ${i} >>/tmp/core.find.txt
done
if [ `ls -s /tmp/core.find.txt |awk '{print $1}'` -ne 0 ]; then
mailx -s "core files on $HOST" you@yourdomain.com fi


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

Re: how to extend /root

Hello Jayola,

There are three ways to achieve what you want:

1. Clear the root file system by deleting unwanted files.
a) du -kx | sort -rn | head -20
Now look for file you don't require and delete or move them.

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


2. Add another disk to Vg00 and do a pvmove of lvol4 and the extend lvol3 because lvol1,2,3 needs to be contiguous (a hectic and time taking method).
#/usr/sbin/pvmove -n lvol4_path source_pv_path dest_pv_path (you do this only for lvol4 or even for lvol5 depends on space requirement)
Extend the root LV.
#lvextend -L 4000 /dev/vg00/lvol3
#fsadm -b 4000M /

For illustrative examples on this have a look on this link.

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

3. Take ignite backup of VG00 and restore it, while restoring you can change the root fs size. This would be easy I suppose. But if you are going with this, take at least two good ignite backups. While booting from tape you can select "interactive" snd "advance" optons to set file sizes.

Hope this help !!

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

Re: how to extend /root

Thank you very much for quick response its really good, i will try with these options.
Suraj K Sankari
Honored Contributor

Re: how to extend /root

Hi,
One more suggestion to extend the root step-by-step.

1. The new disk or physical volume must be added to the root volume group vg00.
# pvcreate /dev/rdsk/c1t1d0
# vgextend vg00 /dev/dsk/c1t1d0

Check with
# vgdisplay -v vg00

2. The lv lvol4 has to be moved to the new disk.
# pvdisplay -v pv_path_original_boot_disk

3. Create a mirror copy of /dev/vg00/lvol4 on the new disk.
# lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t1d0

Check with
# lvdisplay -v /dev/vg00/lvol4

Reduce the mirrored logical volume on the original boot disk.
# lvreduce -m 0 /dev/vg00/lvol4 pv_path_original_boot_disk

Check with
# lvdisplay -v /dev/vg00/lvol4

If you do not have a MirrorDisk-UX license alternative is pvmove: for safety takke Ignite-UX' make_tape_recovery.

# pvmove -n /dev/vg00/lvol4 pv_path_original_boot_disk /dev/dsk/c1t1d0
NOTE: Due to a system error, during an active pvmove command, data corruption may occur.

4. Increase lvol3 now. For extending the size of the file system multiple of 32MB has to be chosen, e.g.
# lvextend -L 512 /dev/vg00/lvol3

5. Now, the file system can be extended.
# fsadm -F vxfs -b 512M /
NOTE: You need to add M directly to the lv_size_MB value.

6. Please test with bdf
# bdf

7. and then move lvol4 back.
# lvextend -m 1 /dev/vg00/lvol4 pv_path_original_boot_disk
Check with
# lvdisplay -v /dev/vg00/lvol4
Reduce the mirrored logical volume on the spare disk.
# lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/c1t1d0
Check with
# lvdisplay -v /dev/vg00/lvol4

If you do not have a MirrorDisk-UX license you may choose the following alternative:
# pvmove -n /dev/vg00/lvol4 /dev/dsk/c1t1d0 pv_path_original_boot_disk

8. You can reduce the spare disk from the root volume group now.
vgreduce vg00 /dev/dsk/c1t1d0

9. Recover any missing links to all of the logical volumes specified in the Boot Data Reserved Area
and update the Boot Data Reserved Area of each bootable physical volume in the volume group
# lvlnboot -R
# lvlnboot ├в v


Suraj
щ╗ЮчЗГ
Valued Contributor

Re: how to extend /root