Operating System - HP-UX
1834285 Members
1468 Online
110066 Solutions
New Discussion

Re: Increase the size of /tmp

 
SOLVED
Go to solution
Simon R Wootton
Regular Advisor

Increase the size of /tmp

I need to increase the size of /tmp filesystem. My root disk is mirrored and I have plenty of unallocated disk to allow this extension. What's the easiest way of doing this ? There are no users currently on the system. Thanks in advance.
8 REPLIES 8
Stefan Farrelly
Honored Contributor

Re: Increase the size of /tmp


If you have OnlineJFS installed its going to be easy. Do you ? (swlist -l bundle will show it). If not then youre going to either;
1. reboot in single user mode from the console in order to unmount /tmp to extend it
2. Create a new /tmp lvol, edit /etc/fstab, reboot and it will activate on the new /tmp - then you can delete the old one.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Mateja Bezjak
Respected Contributor

Re: Increase the size of /tmp

Hi,

I usually use this procedure:
To extend the logical volume to 500 MB
1. Reboot and go to single user mode
2. Type: boot pri isl
3. Type: hpux -isl
4. mount -a
5. Check the logical volume of /tmp
5. If it is lvol5, then umount /dev/vg00/lvol5
6. lvextend -L 500 /dev/vg00/lvol5
7. extendfs /dev/vg00/lvol5
8. mount /dev/vg00/lvol5 /tmp
9. reboot

Regards,
Mateja
Pete Randall
Outstanding Contributor

Re: Increase the size of /tmp

Simon,

Nowadays /tmp doesn't really need to be very large as most stuff goes in /var. Do you really need to enlarge it? How big is it and how big are you going to make it? Maybe you should be looking at what's causing the demand for /tmp space?

Just a thought,
Pete

Pete
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Increase the size of /tmp

Faced with too many (3rd party) software that has /tmp hardcoded as temp space and/or don't honour the $TMPDIR environment, the first thing I do on a fresh system is make /tmp very large, remove /var/tmp and symlink /tmp to /var/tmp

How to extend /tmp without OnlineJFS, which is by far the best solution, I usually do the following:

Create a new filesystem with the desired size, mountpoint /tmp2

go to /etc and edit fstab

swap the devices for /tmp and /tmp2 and reboot
lvremove the previous tmp volume and remove /tmp2

Mateja's solution has the same effect, but you need to remember a lot more

How this will affect mirroring I don't know
Enjoy, Have FUN! H.Merijn
John Bolene
Honored Contributor

Re: Increase the size of /tmp

You can also use ignite to do this and also expand /stand or any other file systems at the same time.

Do the make_tape_recovery and then boot with that tape and redefine the file systems.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
ITeam
Super Advisor

Re: Increase the size of /tmp

I also have similar task - ie; increase size of /tmp on a mirrored root disk ... only I've got to do an lvreduce on the primary swap area to get some space back.

Would appreciate any info on how the mirror would be affected - I plan to boot into lvm maint' mode (hpux -lm) in order to make the changes. I've tried on a 'spare' machine here under 11i (no mirrors) and it seems to work fine but am naturally cautious about doing it on a live machine with mirrored root disk. I'm now trying to get mirror set-up on spare machine and see what happens ... will update as I get more info for you!
Regards, Paul.
Bill McNAMARA_1
Honored Contributor

Re: Increase the size of /tmp

The mirror disk is transparent to this, what you need to be careful of is that there is sufficient space on the 2 pvs to extend the lvol to the size you want. You don't need to be in -lm maintenance mode.

Later,
Bill
It works for me (tm)
ITeam
Super Advisor

Re: Increase the size of /tmp

Thanks Bill (and others who have e-mailed me directly)!
I've also now tried the shrinking/extending exercise on our d/r system, with mirroring and confirmed (mainly for the benefit of the system manager of the live machine) that it will work just fine and, as Bill indicates; the changes are transparent to mirrordisk/UX.
The issue of having enough extents seems to be catered for by my stealing 400MB from swap and then adding same (or slightly smaller - as it needs to round-up to extent points) to the /tmp area.

Again - Thanks to everyone.
PS: I like the idea of using ignite to do the size changes ... but I think the sys.mgr would end up a nervous wreck if I told him I intended reinstalling the opsys for something he sees as "a very minor change" ... Hmmmph!