Operating System - HP-UX
1753829 Members
8668 Online
108806 Solutions
New Discussion юеВ

How to increase free space on /tmp using JFS?

 
SOLVED
Go to solution
Gino Castoldi_2
Honored Contributor

How to increase free space on /tmp using JFS?

Hi,

HPUX 11.11 JFS vg00 is mirrored

We want to increase disk space on the /tmp
file system in the vg00 volume group.

I believe we need to boot the server into single user mode so we can umount the /tmp
file system. What are the exact steps to increasing free disk space?

10 points to any answer.
Thank you
Gino


11 REPLIES 11
Pete Randall
Outstanding Contributor
Solution

Re: How to increase free space on /tmp using JFS?

Gino,

If you have OnlineJFS, it's simple and you don't need to reboot. Check like this

# swlist |grep -i online
B3929CA B.11.11 HP OnLineJFS
OnlineJFS B.11.11.03.03 Online features of the Vx
FS File System


If the above shows you have OnlineJFS you can expand by running "fsadm -b newsize mount_point". Have a look at "man fsadm_vxfs" for details.

If you don't have online JFS, then you have to run lvextend and extendfs, which requires the FS to be unmounted, probably necessitating a reboot to single user mode. Look at "man lvextend", particularly the EXAMPLES section.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: How to increase free space on /tmp using JFS?

Although it isn't the question you asked, you probably aren't asking the right question. The right question is why do you need to increase space on /tmp? On modern UNIX boxes (those less than about 15 years old), /tmp should only be used for temporary files directly associated with the OS. User temporary files should use /var/tmp and well-written applications (including scripts) will go a step further and query the TMPDIR environment variable and use that if defined and default to /var/tmp otherwise. Only on very rare occasions does /tmp itself need to be enlarged.
If it ain't broke, I can fix that.
Geoff Wild
Honored Contributor

Re: How to increase free space on /tmp using JFS?

Sorry Pete - you forgot to say you must lvextend prior to doing the fsadm command:

If /tmp is /dev/vg00/lvol6

then

lvextend -L 1024 /dev/vg00/lvol6
fsadm -b 1024M /tmp

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.
Gino Castoldi_2
Honored Contributor

Re: How to increase free space on /tmp using JFS?

Clay,

I agree with you about the general/normal use of the /tmp fs. However I have a specific/special reason for enlarging /tmp

Our /tmp is currently 7GB and I want to increase it to 14GB. The reason is that we are running OVO/UX on this server (clustered) and we want to run the OVOU backup utility (opc_backup) which copies
several file systems and Oracle database files to disk and the best candidate for this is the /tmp filesystem.

We really need a spare disk for this purpose
but for now this is the best we can do.

10 points to any answer.
Thank you
Gino
Geoff Wild
Honored Contributor

Re: How to increase free space on /tmp using JFS?

I wouldn't use /tmp for copying OVO db's and file systems - I would create a new file system for that purpose....

Something like /data/openview/backup or /data/openview/tmp

(that's what we do)

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.
A. Clay Stephenson
Acclaimed Contributor

Re: How to increase free space on /tmp using JFS?

Mine is set up as /ovobackups and I also have a separate /download filesystem which is used to archive the OV/O history logs. My /ovobackups filesystem is sized large enough to handle the most recent 2 backups. This directory is backed up by Data Protector and a cron job runs to only keep the 2 most recent versions. Older backups can be restored by DP. In any event, OV/O is considered an application and /tmp should not be used. 7GiB is an enormous /tmp filesystem. By comparison, /tmp on my largest boxes is 512MiB and stays at 1% utilization almost all the time.
If it ain't broke, I can fix that.
Ivan Krastev
Honored Contributor

Re: How to increase free space on /tmp using JFS?

You can increase /tmp very easy:

If you have OnlineJfs installed:

#lvextend -L 14436 /dev/vg00/lvolX (see output from bdf, where /tmp is located)

#fsadm -F vxfs -b 14680064 /tmp


If don't have OnlineJFS:

Check what process use /tmp with fuser and try to unmount it.

#umount /dev/vg00/lvolX

Do same as above - lvextend
#lvextend -L 14436 /dev/vg00/lvolX
#extendfs -F vxfs /dev/vg00/rlvolX

Mount agains:
#mount /dev/vg00/lvolX /tmp

If /tmp cannot be unmounted you should go to single user mode.


regards,
ivan
Gino Castoldi_2
Honored Contributor

Re: How to increase free space on /tmp using JFS?

Hi,

Is it possbile to "reduce" the /tmp file system at a later date?

10 points to any answer.
Thank you
Gino
James R. Ferguson
Acclaimed Contributor

Re: How to increase free space on /tmp using JFS?

Hi Gino:

> Is it possbile to "reduce" the /tmp file system at a later date?

Yes, if you have OnlineJFS you can not only extend but you can reduce the size of a filesystem without having to recreate it.

The later the version of JFS the better.

Regards!

...JRF...