Operating System - HP-UX
1834903 Members
2661 Online
110071 Solutions
New Discussion

Re: Extending root filesystem

 
SOLVED
Go to solution
masoodasif
Advisor

Extending root filesystem

Dear
I need to extend the root file system because we are running out off space my main purpose is to create the 11 2TB mount points.i suspect that for each mount we required 7MB space on root to create VG.For this i need to extend the / file system. NOW the issue is that we cannot afford downtime for this production machine to reignite it. i have Online JFS installed on the server.
i was checking some forums to extending the root file system they are suggesting one procedure to move the lovol 4 to the next location and extend the root .
now my question is that this possible solution . and why the VG is taking 7mb on root.
i m sending BDF command out put

s7dmc # bdf

Filesystem kbytes used avail %used Mounted on

/dev/vg00/lvol3 212992 198768 14168 93% /

/dev/vg00/lvol1 298928 85040 183992 32% /stand

/dev/vg00/lvol8 4718592 2225408 2477856 47% /var

/dev/vg00/lvol7 3080192 1298896 1767448 42% /usr

/dev/vg00/lvol4 212992 42208 170128 20% /tmp2

/dev/vg00/tmp2 1048576 64973 922928 7% /tmp

/dev/vg01/lvoractl 114688 6349 101575 6% /oractl

/dev/vg00/lvol6 2670592 2395992 272480 90% /opt

/dev/vg00/lvORA920 7340032 4547160 2620066 63% /opt/oracle

/dev/vg00/lvol5 2048000 54296 1978184 3% /home

/dev/vg00/fms 5242880 3127816 1985777 61% /fms

/dev/vg03/lvavfile2

524156928 22263896 497972352 4% /avfiles

/dev/vg01/lvAV 40960000 19499560 21320232 48% /avfile2

/dev/vg04/lv3g 2146140160 1241255776 897820920 58% /3g1

s7dbq:/dmc_back 35848192 1503608 34087432 4% /TEMP

s7cs:/depot 12288000 11380296 900056 93% /depot

/dev/vg05/lv3g2 2146107392 68016 2129273456 0% /3g2

/dev/vg06/lv3g3 2146107392 68016 2129273456 0% /3g3

/dev/vg07/lv3g4 2146107392 68016 2129273456 0% /3g4

s7dmc #
20 REPLIES 20
masoodasif
Advisor

Re: Extending root filesystem

hi again

is these are the steps to follow or need some modification

pvmove -n /dev/vg00/lvol4 /dev/dsk/
lvextend -L 400 /dev/vg00/lvol3
fsadm -F vxfs -b 400 /

a quick response is highly appreciable

thanks
MarkSyder
Honored Contributor

Re: Extending root filesystem

You almost certainly have something writing to / that should be writing to a dedicated filesystem.

Also check for files type f in /dev: someone may have incorrectly typed a tape device name and created a huge text file.

Final check: do a find for core files and remove any you find.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Shrikant Lavhate
Esteemed Contributor

Re: Extending root filesystem

Extending root ....

Find experts comment in this thread.
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1247446

Will it remain a personal, if I broadcast it here!
john korterman
Honored Contributor

Re: Extending root filesystem

Hi,

the size of your root file system is ok, and there should be no need for extending it. Generally, the root file system should not contain anything growing very much, but you can perhaps clean it up a little bit. There are many threads suggesting how to do this: make a forum search for "root file system full".
The best way is to look for the directories comsuming most space. A fast, but not very efficient way is to look for big single files, e.g.:
# find / -type f -size +1000000c -xdev -exec ls -l {} \;
which will list all files bigger than 1000000 characters.
But the investigation of what takes up space should determine what can be cleaned up, and you should definitely try that before even attempting to extend the root file system, which would an extremely risky task.

regards,
John K.
it would be nice if you always got a second chance
masoodasif
Advisor

Re: Extending root filesystem

Dear

thanks For your advice i checked every thing and i cannot remove files from here because all files are used by the application
i want to ask one thing
that FOR VG Creation for about 2TB how much space required on the root because when i m creating the VG then my system will increase the root size to approximately 7-8MB

My main purpose is to add 11x2TB mount points on my system recently i free some space and created 2 VGs and it take approx 14 MB space on my root
so for creating more i need more space on root thats why i want to increase the size

PVMOVE will not serve me in this case like moving LVOL4 to next extent and increasing the space of root
?? please HELP me thanks
MarkSyder
Honored Contributor

Re: Extending root filesystem

"i cannot remove files from here because all files are used by the application"

Isn't that what I said? You have an application writing to / that should be writing to a dedicated filesystem.

Mark
The triumph of evil requires only that good men do nothing
Ivan Krastev
Honored Contributor
Solution

Re: Extending root filesystem

For every new volume group you need 1~10MB space in root file system. This is required for lvm configuration files in /etc/lvmconf/.

For extending root mount point you can try with lvol4 first (/tmp2 200mb) and after that with lvol5 (/home 2GB). An of course you should have a free space in vg00.

For extending the root volume you don't need to break the mirror on all lvols, only on the next (lvol4) after root (lvol3).

Do the following:
1. make a mirror copy of /tmp2 filesystem (lvol4) over new disk - MirrorDisk required.
2. remove mirror on lvol4 from first disk.
3. extend lvol3 (/) with size of lvol4.
4. mirror again lvol4 over old disk.

Before procedure you have:
lvol2
lvol3
lvol4
lvol5
.
.
.
lastlvolfromVG00

and after this you will have:
lvol2
lvol3 (with size lvol3+lvol4)
lvol5
.
.
.
lastlvolfromVG00
lvol4

regards,
ivan
masoodasif
Advisor

Re: Extending root filesystem

Dear Mark

yes u r right that some constant things are already there on the root which i cannot move from root.now my root is still not increasing rapidly but i want to add 11 VGs in it it will almost required 70 to 100 MB on root thats y i want to increase the root.
i already remove some unnecessary files that help to add 2 vgs.
and
Dear ivan
I have some space available on VG00
means on my first disk i have space available can i move my LOVL4 to my vg00 or i need to create LV and MOVE my LV to new LV

means i will create one more LV on the VG00 and mount /test2 to that lvol
and then i will remove my lovol 4 and extend my root ? is it ok aur i will move PV
please suggest
Ivan Krastev
Honored Contributor

Re: Extending root filesystem

Do you have mirror of the lvols? Can you post lvdisplay of lvol4 ?

If /tmp2 is not usable and it is after lvol3 (check with vgdisplay) you can create new lvol and move all data from /tmp2 to the new lvol.
After that umount /tmp2, umount new lvol and mount it as /tmp2.

This will free lvol4 and you can remove it and extend lvol3.

regards,
ivan
masoodasif
Advisor

Re: Extending root filesystem

Dear Ivan,
Thanks for ur reply
yes /tmp2 is not usable but have some tmp files in it
and there is no mirror of the disk only single disk is in the VG00 now after this activity we will go for mirroring customer is buying the disk for mirroing

now plz confirm
first i will creat an new lvol
2ndly i will create file system on it
then i will unmount the /tmp2
and will mount it to the new lvol for this i do not need to take copy off the tmp2 contents coz i should have tape backup of vg00
then i will remove the lvol4 and extend the root file system
these steps are ok
??
john korterman
Honored Contributor

Re: Extending root filesystem

Hi again,

The root partition, /dev/vg00/lvol3, must consist of physically continous extents. The first new extent must therefore have the first number that is bigger than the last extent of the existing volume used for /dev/vg00/lvol3. An example for a lvol3 root file system:
# lvdisplay -v /dev/vg00/lvol3
................
Ignore this and look only at the last line....
................
00023 /dev/dsk/c1t2d0 00317 current /dev/dsk/c1t0d0 00317 current
00024 /dev/dsk/c1t2d0 00318 current /dev/dsk/c1t0d0 00318 current

The last extent used in the example was no. 24, and if this root-lvol should ever be extended, the first extension would have to be no. 25.
The reason why Ivan suggests that you break /tmp2 is its name, /dev/vg00/vol4, which suggests that /tmp2 uses the first (and following) needed extents for extending /dev/vg00/lvol3 - but you have to make sure first yourself that this is actually the case.

And plenty of backups are always nice to have...

regards,
John K.
it would be nice if you always got a second chance
Ivan Krastev
Honored Contributor

Re: Extending root filesystem

John already answer on this question - ensure that lvol4 is after lvol3.
See example:
#lvdisplay -v /dev/vg00/lvol3 | grep current | tail -2
00034 /dev/dsk/c2t1d0s2 01346 current /dev/dsk/c2t0d0s2 01346 current
00035 /dev/dsk/c2t1d0s2 01347 current /dev/dsk/c2t0d0s2 01347 current

#lvdisplay -v /dev/vg00/lvol4 | grep current | head -2
00000 /dev/dsk/c2t1d0s2 01348 current /dev/dsk/c2t0d0s2 01348 current
00001 /dev/dsk/c2t1d0s2 01349 current /dev/dsk/c2t0d0s2 01349 current


After that you can do the tricks with /tmp2.

regards,
ivan
Steven E. Protter
Exalted Contributor

Re: Extending root filesystem

Shalom,

Basic point.

root fs is not for file storage. There should be folders and mounted file systems and some configuration files such as found in /etc

Root FS can not be extended because HP-UX requires it to be contiguous.

So I suggest:
1) Move files that don't belong. Make sure there are not files in folders that have mounted filesystems as they will be invisible but still take up space.
2) do an Ignite make_tape_recovery, boot off it recover the system, intervening to set a large root fs size if you must. This is the only supported way of "extending" the root fs.

1 is way easier than 2.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Adam Winebaugh
Regular Advisor

Re: Extending root filesystem

I could not agree with Steven more. Here is the layout of my system.
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 143360 68099 70560 49% /
/dev/vg00/lvol1 83733 34750 40609 46% /stand
/dev/vg04/lvol2 2560000 2253953 296703 88% /www
/dev/vg00/lvol8 1433600 1168366 251855 82% /var
/dev/vg00/lvol12 2048000 870765 1107288 44% /var/adm/sw
/dev/vg00/lvol6 2097152 1541468 521400 75% /usr
/dev/vg04/lvol9 38912000 35283643 3402831 91% /usr/pvcs
/dev/vg01/lvol6 3145728 2133724 948769 69% /usr/local/oracle7
/dev/vg01/lvol8 3145728 2447493 672684 78% /usr/local/oracle
/dev/vg02/lvol1 8388608 2909188 5313594 35% /u21
/dev/vg04/lvol12 5120000 13862 4798475 0% /u03
/dev/vg06/lvol1 5238784 4574889 622422 88% /u02
/dev/vg04/lvol3 25600000 24038886 1512400 94% /u01
/dev/vg00/lvol5 1536000 10390 1435676 1% /tmp
/dev/vg08/lvol1 19968000 14153584 5723592 71% /software
/dev/vg02/lvol2 4096000 1025985 2878238 26% /rateload
/dev/vg05/lvol1 10485760 6433054 3972996 62% /oralogs
/dev/vg04/lvol1 103424000 81796408 21289720 79% /oradata4
/dev/vg04/lvol4 10240000 5597054 4499070 55% /oradata3
/dev/vg04/lvol5 71680000 59354856 12256096 83% /oradata2
/dev/vg04/lvol6 90112000 55861016 33986896 62% /oradata1
/dev/vg00/lvol7 2097152 1600426 467315 77% /opt
/dev/vg05/lolv3 3145728 1861266 1204626 61% /opt/tug
/dev/vg04/lvol7 5242880 4509129 689416 87% /opt/rc
/dev/vg01/lvol9 2097152 1618144 449140 78% /opt/pvcs/tracker/backup
/dev/vg04/lvol8 3145728 2659218 456135 85% /opt/mtmc
/dev/vg04/lvol13 1048576 502884 511626 50% /opt/gentran
/dev/vg02/lvol4 512000 66054 418077 14% /opt/fax
/dev/vg05/lvol4 1048576 328078 675506 33% /opt/ess
/dev/vg00/lvol4 3072000 1802681 1196319 60% /home
/dev/vg05/lvol2 1048576 43929 941882 4% /history
/dev/vg02/lvol3 512000 58125 430490 12% /edi315
/dev/vg07/lvol1 52416512 28867672 23375424 55% /backup


Point is. Find what is writing to / and stop it immediately. Move what needs moved. I would not boot from tape and extend unless it is a last option, simply due to potential issues that can come from it.
Kyris
Frequent Advisor

Re: Extending root filesystem

The root file system must be contiquous and to do it in any other way than Ignite will be asking for trouble.
Using an ignite will allow you to resize your filesystem to your current needs and keeping in mind of any future requirements.

To Ignite I used = make_tape_recovery -x inc_entite=vg00 -I -v -a /dev/rmt/0mn

hope this helps...
Jeeshan
Honored Contributor

Re: Extending root filesystem

Salam asif

take a look at this link

http://www.symmetricwebsites.com/

a warrior never quits
vijay alur
Advisor

Re: Extending root filesystem

hi Masood Asif,

just checkout this forum link. follow the steps carefully.

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=940172



chris huys_4
Honored Contributor

Re: Extending root filesystem

Hi,

A lot of inventive ways to increase the rootfilesystem, but doing it via ignite is still the only HP recommended way for increasing the rootfilesystem.

Also all this "alternative" are limited in some way or another, some will work only for 1 volumemanager, some will only work with a particular HP-UX OS version, some require additionals disks/diskspace etc.., while ignite will work with any volumemanager, with any HP-UX OS and doesnt require extra disks/more diskspace, beyond what you need extra for the increase of the rootfilesystem.

And as you do it with ignite, you are sure that you have taken a backup, that the system will be able to boot afterwards and you have done a disaster/recovery exercise all in one go. ;)

Greetz,
Chris
PS.
to create a (tape) ignite backup :
make_tape_recovery -v -x inc_entire=vg00 -a _tapedevicefile_

to create youre bigger root filesystem.
boot from the ignite backup tape.. select install HP-UX OS, adapt the rootfilesystem to the correct size, start the ignite restore.. done.
masoodasif
Advisor

Re: Extending root filesystem

Dear All

thanks for your prompt response and support

i solved the problem using iginte

thanks Any ways

Regards
Masood Asif
masoodasif
Advisor

Re: Extending root filesystem

closing the The Thread its Done
thanks once again Guys