Operating System - HP-UX
1832433 Members
3292 Online
110042 Solutions
New Discussion

increasing root partition sze

 
Mohit Jairath
Occasional Advisor

increasing root partition sze

Dear All,

I have a HP server with a 146GB HDD. I configured the system for 40 GB and now have to increase the size of each partition. How do I increase the size of the root partition ?

thanks and regards,
mohit jairath
Avaya GlobalConnect Ltd, India
91-9818375383
11 REPLIES 11
Robert-Jan Goossens
Honored Contributor

Re: increasing root partition sze

RAC_1
Honored Contributor

Re: increasing root partition sze

First thing is that, you can extend / size, but it is unsupported. So try it at your risk. Before you do that. take the backup - use ignite.

Do you want to extend only root file system? or other files systems also? You just can not do anything with lvol1-/stand and lvol2-swap lvol.
There is no substitute to HARDWORK
Mohit Jairath
Occasional Advisor

Re: increasing root partition sze

Thanks for replying.


Currently bdf looks as follows:
IBSPCS@opt/dbase/OraHome1/network/log [7]
#root# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 229376 136888 91808 60% /
/dev/vg00/lvol1 314736 55336 227920 20% /stand
/dev/vg00/lvol8 2097152 587432 1498288 28% /var
/dev/vg00/lvol7 2326528 878144 1437160 38% /usr
/dev/vg00/lvol4 229376 42720 185256 19% /tmp
/dev/vg00/lvol6 1703936 659456 1036328 39% /opt
/dev/vg00/lvol9 4194304 2157 3930145 0% /opt/moimager
/dev/vg00/lvoldb 5144576 3298303 1730970 66% /opt/dbase
/dev/vg00/lvol11 33554432 4160304 29165664 12% /opt/avaya
/dev/vg00/lvol5 32768 23520 9232 72% /home
/dev/vg00/lvol10 4194304 1004310 2990621 25% /DVD_OPS

You should be able to increase the size of the existing /opt/dbase volume with SAM, provided there is still unallocated space on the hard drive.
Below is the bdf from a site where PCS is installed with 146 GB harddrive:

Dallas Morning News(admin)@/opt/dbase/OraHome1/network/admin [21]
$ bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 25165824 138648 24831688 1% /
/dev/vg00/lvol1 314736 54448 228808 19% /stand
/dev/vg00/lvol8 4718592 675176 4012320 14% /var
/dev/vg00/lvol7 4194304 1082848 3087184 26% /usr
/dev/vg00/lvol4 4194304 29304 4132520 1% /tmp
/dev/vg00/lvol6 4194304 691288 3475680 17% /opt
/dev/vg00/lvoldb 63438848 3186626 56487318 5% /opt/dbase ---- 63 GB.
/dev/vg00/lvol11 28606464 496408 27231778 2% /opt/avaya
/dev/vg00/lvol5 98304 9240 88424 9% /home
/dev/vg00/lvol9 4194304 2128 3930172 0% /DVD_OPS

I have increased /opt , /opt/dbase since that was critical.

I am getting "device busy " errors when I try to umnount root partition.

I have tried using "fuser" command to list out files and processes, but still get the same error.
MarkSyder
Honored Contributor

Re: increasing root partition sze

You can't unmount root - you either need online JFS or (preferably) to restore from an ignite backup and resize the partition then.

But why do you need to increase /? It usually doesn't grow much.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Robert-Jan Goossens
Honored Contributor

Re: increasing root partition sze

could you the output of

# du -kx / | sort -rn | head -20

Regards,
Robert-Jan
Mohit Jairath
Occasional Advisor

Re: increasing root partition sze


DELHI(admin)@/opt/avaya/pds [546]
$ du -kx | sort -rn | head -20
275200 .
121616 ./bin
118160 ./pre_sp1
118056 ./pre_sp1/opt
117992 ./pre_sp1/opt/avaya
107504 ./pre_sp1/opt/avaya/pds
106000 ./pre_sp1/opt/avaya/pds/bin
10480 ./pre_sp1/opt/avaya/pab
10384 ./pre_sp1/opt/avaya/pab/bin
10088 ./lists
8504 ./lists/history
8008 ./lists/history/datastore
3688 ./account
3448 ./config
3184 ./shell
2432 ./tools
2288 ./SDN/PC3_739
2288 ./SDN
2256 ./SDN/PC3_739/orig
2000 ./lists/history/datastore/01132007
Robert-Jan Goossens
Honored Contributor

Re: increasing root partition sze

Mohit,

118160 ./pre_sp1
118056 ./pre_sp1/opt
117992 ./pre_sp1/opt/avaya
107504 ./pre_sp1/opt/avaya/pds
106000 ./pre_sp1/opt/avaya/pds/bin
10480 ./pre_sp1/opt/avaya/pab
10384 ./pre_sp1/opt/avaya/pab/bin

above should not be in the / root filesystem. Create a new filesystem or mv it to opt/apps filesystem.

Regards,
Robert-Jan
Mohit Jairath
Occasional Advisor

Re: increasing root partition sze

Hi Robert,

This is a customised OS for an Avaya product.
the disk and file structure cannot be tampered with.

I have taken an moimage backup on a DDS3 tape. I will try to reload the system using the tape. I should get options to resize the root partition.

will update you on this.

thanks and regards,
mohit jairath
Avaya GlobalConnect Ltd.
91-9818375383
Bill Hassell
Honored Contributor

Re: increasing root partition sze

Your 230 Meg / directory is fine -- no need to expand it at all. The second system you referenced has an outrageously large (25Gb) / directory which only uses 138 Megs. That system was probably setup by a workstation user that dislikes separate mountpoints and decided to make / extremely large.

It is very important to understand that the / directory is static, that is, it does not grow significantly unless a serious mistake was made. Now the du command you posted is not for the / directory, it appears to be for the opt/avaya/pds directory and that is fine. To analyze the / directory, use:

du -kx / | sort -rn | head -20

But with just 136 megs out of 230 megs used in /, there is no need to expand the root filesystem. NOTE: if you are not an experienced sysadmin in HP-UX, trying to expand the root filesystem, whether done with the aid or extra disks or using the Ignite/UX backup/reinstall method, is not without the risk of losing everything. The / directory simply does not need to be expanded. Instead, like all filesystems, it needs to be monitored and mistakes corrected rather than using a bigger bandage.


Bill Hassell, sysadmin
Geoff Wild
Honored Contributor

Re: increasing root partition sze

How to do it live...

Not for the faint of heart.

No outage required , if you have online jfs.
If you do not have online jfs , do all the following in LVM maintenance mode.
Note: this will only work if SWAP is NOT the next lvol after /

a. Login as root.
b. Find out a free disk / un mirror the rootvg and make that disk free.
c. find out the next logical volume after lvol3(assumed lvol3 is root)
d. pvmove that logical volume onto the newly added disk
[ pvmove -n /dev/vg00/lvol4 /dev/dsk/CURRENT /dev/dsk/NEW]
e. now you should be able to increase root filesystem to an additional `size_of_the_lvol4`.
f. pvmove the lvol4 back to root vg ( vg00)

boot,swap and root are the only lvols that needs a contegeous policy. so , it does not matter where lvol4 is.

Example, move lvol4 away from lvol3 , thus creating a contegeous space right after lvol3. If you need more space on "/" you will be able to move lvol5 ...6 to the next disk and do the stuff. Do remember to migrate them back to the original disk.

Now, if you have mirrored root vg, then break the mirror before you do this.


Practical Example (actual test)

# bdf |grep vg00
/dev/vg00/lvol3 204800 151616 53184 74% /
/dev/vg00/lvol1 125808 49064 64160 43% /stand
/dev/vg00/lvol7 4194304 2501208 1680472 60% /var
/dev/vg00/lvol6 3145728 1856304 1279456 59% /usr
/dev/vg00/lvol5 524288 160992 361104 31% /tmp
/dev/vg00/lvol4 2097152 1833496 261656 88% /opt
/dev/vg00/lvol8 1048576 622656 422632 60% /home
/dev/vg00/lvol10 2097152 1270980 774595 62% /app


Find a spare disk:

strings /etc/lvmtab |grep c7t0d6
pvcreate -f /dev/rdsk/c7t0d6
vgextend /dev/vg00 /dev/dsk/c7t0d6
lvdisplay -v /dev/vg00/lvol4 |more
lvreduce -m 0 /dev/vg00/lvol4
lvdisplay -v /dev/vg00/lvol4 |more
pvmove -n /dev/vg00/lvol4 /dev/dsk/c0t6d0 /dev/dsk/c7t0d6

lvextend -L 1024 /dev/vg00/lvol3
fsadm -b 1024M /

pvmove -n /dev/vg00/lvol4 /dev/dsk/c7t0d6 /dev/dsk/c0t6d0
vgreduce /dev/vg00 /dev/dsk/c7t0d6

lvextend -m 1 /dev/vg00/lvol4


# bdf |grep vg00
/dev/vg00/lvol3 1048576 151640 890456 15% /
/dev/vg00/lvol1 125808 49064 64160 43% /stand
/dev/vg00/lvol7 4194304 2506048 1675672 60% /var
/dev/vg00/lvol6 3145728 1856304 1279456 59% /usr
/dev/vg00/lvol5 524288 160992 361104 31% /tmp
/dev/vg00/lvol4 2097152 1833552 261600 88% /opt
/dev/vg00/lvol8 1048576 622656 422632 60% /home
/dev/vg00/lvol10 2097152 1270980 774595 62% /app

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Mohit Jairath
Occasional Advisor

Re: increasing root partition sze

Hi,

I should have mentioned I have just one HDD of 146GB. Had there been another HDD available, I would have tried the disk mirroring option.

Following are the details of the steps I followed :

TITLE: Increasing PCS disk partitions as per latest Avaya recommendations

Author: Mohit Jairath
Date: 16th January, 2007

Problem : The disk partitioning as per existing work orders makes 83GB space unused in a 146GB HDD.

Fact: Avaya PCS 3x

Solution:
1. make sure all processes are stopped. If not, type stop_pds;stop_mts;stop_db
2. Login as root
3. # bdf

Currently bdf looks as follows:

#root# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 229376 136888 91808 60% /
/dev/vg00/lvol1 314736 55336 227920 20% /stand
/dev/vg00/lvol8 2097152 587432 1498288 28% /var
/dev/vg00/lvol7 2326528 878144 1437160 38% /usr
/dev/vg00/lvol4 229376 42720 185256 19% /tmp
/dev/vg00/lvol6 1703936 659456 1036328 39% /opt
/dev/vg00/lvol9 4194304 2157 3930145 0% /opt/moimager
/dev/vg00/lvoldb 5144576 3298303 1730970 66% /opt/dbase
/dev/vg00/lvol11 33554432 4160304 29165664 12% /opt/avaya
/dev/vg00/lvol5 32768 23520 9232 72% /home
/dev/vg00/lvol10 4194304 1004310 2990621 25% /DVD_OPS

4. # umount /opt/dbase
5. # umount /opt/moimager
6. # umount /opt/avaya
7. # umount /opt
8. # umount /tmp
9. # umount /home
10 # sam
11. Go to "disk and file systems" >> logical volumes
12. scroll down to each of the above mentioned partitions and expand the size as per Avaya recommended standards.
13. Return to # prompt
14. # mount /opt
15. # mount /opt/moimager
16. # mount /opt/avaya
17. # mount /opt/dbase
18. # mount /tmp
19. # mount /home
20. Check using # bdf
21. # cd /opt/moimager
22. Make an moimage backup of the system
23. Reload the system using the tape
24. While defining the vg00 volume, "file systems", find / partition and increase the partition to minimum 20GB
25. Continue with reloading the system using the tape.
26. On completing system install using the tape, start and check all the services.
27. # bdf

Now the system should look something like this
#root# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 20480000 98904 20221880 0% /
/dev/vg00/lvol1 314736 57136 226120 20% /stand
/dev/vg00/lvol8 2097152 485224 1599392 23% /var
/dev/vg00/lvol7 2326528 862840 1452288 37% /usr
/dev/vg00/lvol4 4096000 5256 4058840 0% /tmp
/dev/vg00/lvol6 4096000 506168 3561824 12% /opt
/dev/vg00/lvol9 4194304 2157 3930145 0% /opt/moimager
/dev/vg00/lvoldb 61440000 3213200 54587634 6% /opt/dbase
/dev/vg00/lvol11 33554432 350008 32945064 1% /opt/avaya
/dev/vg00/lvol10 4194304 1004201 2990723 25% /DVD_OPS
/dev/vg00/lvol5 425984 9328 413456 2% /home

However, from now onwards we would be recommending disk mirroring. and I will surely try increasing partitions size using the steps mentioned in this thread.


Thanks everyone for your help and support.

thanks and regards,
mohit jairath
Avaya GlobalConnect Ltd, India
91-9818375383