Re: Increase the Logical volume - root (310 Views)
Reply
Occasional Contributor
HP-UX Increasing the ro
Posts: 6
Registered: ‎07-08-2008
Message 1 of 15 (310 Views)
Accepted Solution

Increase the Logical volume - root

Hello !!
I have one HP-UX server.. Now its shows / root is occupied 100 % . Many users are using this server to access some database,Please help me out to increase the size without rebooting also not in single user mode, here i dont have Tape drive for backup etc.. etc...

Looking forward a solution for this problem..

Thanks in advance,
Arun
Honored Contributor
Jeeshan
Posts: 2,084
Registered: ‎11-05-2007
Message 2 of 15 (310 Views)

Re: Increase the Logical volume - root

Hi Arun

take a look at this link

http://www.symmetricwebsites.com/
a warrior never quits
Esteemed Contributor
Shrikant Lavhate
Posts: 501
Registered: ‎10-31-2007
Message 3 of 15 (310 Views)

Re: Increase the Logical volume - root

Hi,

extending root lvol without reboot i.e. on the fly is quite risky. Again you dont have a tape for backup also. I suggest that even if you dont have tape make sure that you have backup on some network location to start with in case of failures.
Extending root file sys can be acheived using lvextend.
Methods using lvextend or online JFS can be found within forum search.
Will it remain a personal, if I broadcast it here!
Esteemed Contributor
Shrikant Lavhate
Posts: 501
Registered: ‎10-31-2007
Message 4 of 15 (310 Views)

Re: Increase the Logical volume - root

Also, before you apply anything try to free up some space by trimming log files, removing unwanted softwares & temp files etc.
Will it remain a personal, if I broadcast it here!
Honored Contributor
MarkSyder
Posts: 1,815
Registered: ‎11-10-2003
Message 5 of 15 (310 Views)

Re: Increase the Logical volume - root

It seems highly likely that you have a process writing to / that should be writing to a dedicated filesystem. Check this before you do anything drastic like increasing /.

Also, check /dev for files type f: a common mistake is to mistype a tape device name and produce a large text file (although that seems unlikely in your case as you say you don't have a tape drive).

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Outstanding Contributor
Pete Randall
Posts: 16,205
Registered: ‎11-03-1996
Message 6 of 15 (310 Views)

Re: Increase the Logical volume - root

Whoa, folks!

First off, it is nearly impossible to extend your root volume. Secondly, to do so without a reboot or a tape device is literally impossible. Because /stand, swap and / need to be contiguous, a simple lvextend is not going to accomplish anything. The only feasible way to accomplish this it to restore from an Ignite make_tape_recovery backup, re-sizing your root logical volumes in the process. Since you have no tape device, that seems unlikely.

I would start with Mark's advice and invest my time in looking to find what is filling your root volume, rather than trying to accomplish the basically impossible task of enlarging. Use the find command to search /dev, as Mark indicated (-type f). Then use it to search / for core files and large files in general ( -name and -size).

Under normal circumstances, / should be almost completely static and there should be no reason for growth. You need to do some investigation into why it filled up and not waste your time trying to enlarge something that can't readily be enlarged.


Pete

Pete
Occasional Contributor
HP-UX Increasing the ro
Posts: 6
Registered: ‎07-08-2008
Message 7 of 15 (310 Views)

Re: Increase the Logical volume - root

Thanks for all..

I have done with all basic and some troubleshoot to increase the volume in /.. and tried to delete some files under / but all contains applications many users
working on it like 24/7.... still now we all are able to work on it.. I hope after some times later i wount get the login prompt .. due to /dev - root 100% full.. it would be great if someone help me out with this issue..

Trusted Contributor
mobidyc
Posts: 282
Registered: ‎09-20-2006
Message 8 of 15 (310 Views)

Re: Increase the Logical volume - root

Hello,

i've wrote an article (in french) for extend root volume if you have a miror, you can found it here:
http://mobidyc.net/?id=23

please, adapt these commands in your situation.

basically, here are the commands passed in my case:
1/ broke the miror:
for i in /dev/vg00/lv* ; do lvreduce -m 0 $i ; done

2/ identify the PV with all its free extends by :
vgdisplay -v vg00 |tail -n 20

3/ pvmove lvol4 from used pv to free pv seen above :
pvmove -n /dev/vg00/lvol4 /dev/dsk/c1t2d0 /dev/dsk/c2t2d0

4/ after that, you can extend root :
lvextend -L 2048 /dev/vg00/lvol3

5/ you can re-pvmove the lvol4 :
pvmove -n /dev/vg00/lvol4 /dev/dsk/c2t2d0 /dev/dsk/c1t2d0

6/ redo your miror :
for i in /dev/vg00/lv* ; do lvextend -m 1 $i ; done

on another terminal, you can monitore the progress with:
for i in /dev/vg00/lvol* ; do t=$(lvdisplay -v $i |awk '/dsk.*stale/,/^$/'|wc -l) ; echo ${i##*/} Stale: $t ; done

--
Regards,
Cedrick Gaillard
Best regards, Cedrick Gaillard
Honored Contributor
Rita C Workman
Posts: 3,790
Registered: ‎08-03-2000
Message 9 of 15 (310 Views)

Re: Increase the Logical volume - root

OMG.....greetings oh interestingly named Author - I'll call ya H-pux

Please look at what Pete has said. You can not on the fly increase root ( / ).
Clean up "safe" files you can clean up. Try running the following to clean up old levels of patches you will never remove anyway:

cleanup -c (1 or 2)

Then look under /dev and see if some newbie wrote a file out under /dev/rmt instead of writing it to a tape unit. I see this one more than I care to think about.

...AND if your users are writing things out 24/7 why don't they have disk and a seperate mountpoint to put it there! So your O/S wouldn't be getting hammered.

Rgrds,
Rita

...it is less painful when you plan for growth, then force it to fit with a hammer...
Honored Contributor
Rita C Workman
Posts: 3,790
Registered: ‎08-03-2000
Message 10 of 15 (310 Views)

Re: Increase the Logical volume - root

H-pux (Arun)

I just read "here i dont have Tape drive for backup etc...etc..."

You have one HPUX server in serious peril. Your data is extremely unsafe. Get a cheap dat tape drive and at least do a make_tape_recovery. How on earth are you backing up your data???

You need to address this with the $$ mgmt. Because when something happens (and it will) who do you think they will hold accountable first. you.

Best Wishes,
Rita
Super Advisor
Vincent_5
Posts: 371
Registered: ‎04-02-2000
Message 11 of 15 (310 Views)

Re: Increase the Logical volume - root

Hello,
Basically, I believed that the / root filesystem cannot be increase on the fly. The only way to resize is to do a make_tape_recovery backup and resize it from there. Is the safe way. The backup will take approximately 30 mins and restore will take 45mins But, before you do that, I would advice you to check if your root disk have anymore space available to resize.


Regards
Vincent
nothing is better than to know more
Honored Contributor
Patrick Wallek
Posts: 13,787
Registered: ‎06-21-2000
Message 12 of 15 (310 Views)

Re: Increase the Logical volume - root

The problem I see with a lot of the recommendations -- cleaning log files, running the 'cleanup' command, etc. -- is that none of this write to the '/' filesystem itself. Most of the recommendations would only affect other mountpoints, most only /var.

The one thing you should check is the /dev directory. Do this:

# cd /dev
# find . -type f -exec ls -ld {} \+

Now, if anything shows up here, it could very well be a problem. There should be no regular files in the /dev directory. All files here should be block or character files.
Occasional Contributor
HP-UX Increasing the ro
Posts: 6
Registered: ‎07-08-2008
Message 13 of 15 (310 Views)

Re: Increase the Logical volume - root

Thanks for all.. atlast the problem is solved.. without reboot.. just i swapped some files to other directory.. Thanks for such a help and suggestion given to me..


And more over.. I'm not H-PUX arun.. just Arun :)

Thanks you.. wish you all good luck..
Honored Contributor
Patrick Wallek
Posts: 13,787
Registered: ‎06-21-2000
Message 14 of 15 (310 Views)

Re: Increase the Logical volume - root

>>just i swapped some files to other directory..

What files? I hope they weren't critical?
Honored Contributor
Honored Contributor
Jov
Posts: 1,574
Registered: ‎01-12-2000
Message 15 of 15 (310 Views)

Re: Increase the Logical volume - root

Core dumps have a habit of filling up '/'.

As for the clean up suggestions not help recoverying some space on '/', well that depends on how the filesystems are setup.


Jov
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.