Operating System - HP-UX
1758561 Members
1740 Online
108872 Solutions
New Discussion юеВ

Increase /usr and /tmp disk space

 
SOLVED
Go to solution
Dale Sullens
Occasional Contributor

Increase /usr and /tmp disk space

Is there an easy way to increase the amount of space available to /usr and /tmp?
I have already allocated all of the space available on the disk to other mnt points..
Can you decrease the space allocated to a mnt point? I have a mnt point for /apps that contains 30Gig of disk space but only using around 5 Gig, I would like to make some the unused space available to both /usr and /tmp.
I am new to Unix so I apologize if the message is written poorly..
Thanks..
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Increase /usr and /tmp disk space

First, do a swlist | grep JFS; if you see OnlineJFS listed then that makes life easier because these operations can be done "on the fly"; if not, then it's not so pretty.

I do question your need to increase /tmp; /tmp should really only be used by the OS; /var/tmp is intended for users and applications.

If your have OnlineJFS then you can do an fsadm and shrink the /apps filesystem and then do an lvreduce to reduce the size of the LVOL. You can then do an lvextend operation on the /usr and /tmp LVOLS and an fsadm to grow the filesystems.

Man fsadm_vxfs for details.

Now if you don't have OnlineJFS then things are more complicated so before going through that procedure or giving more detail on the OnlineJFS procedure, it would be good to know it you are OnlineJFS challenged or not.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Increase /usr and /tmp disk space

Hi:

If you have OnlineJFS licensed, then you *may* be able to dynamically reduce the size of your /apps filesystem. I say "may" only because this generally will not work unless you have JFS version 3.3.

In the absence of the above, the best (only) way to decrease a filesystem's size is to back it up; 'lvreduce' the logical volume container in which the filesystem resides; 'newfs' the filesystem; and reload your data.

With regard to expanding '/usr' and '/tmp', then if you have a spare physical disk, then you could add it to the volume group, although I personally prefer vg00 to consist of a single disk (plus a single mirror).

If you don't have OnlineJFS, then to expand '/usr' and '/tmp' you will need to boot-up into single-user mode; 'lvextend' the logical volumes; and 'extendfs' the filesystem.

Since you are new to Unix, I urge you to consider using SAM *and* I urge you to take some time to read chapter-6 of "Managing Systems and Workgroups":

http://docs.hp.com/hpux/onlinedocs/B2355-90742/B2355-90742.html

Regards!

...JRF...
Hai Nguyen_1
Honored Contributor

Re: Increase /usr and /tmp disk space

If you have online JFS, you may be able to reduce a size of a filesystem. However, I do not think reducing a filesystem size is a good idea in any case.

If you have a current backup of your /apps then this is my suggestion:
- Delete the logical volume on which /apps mounts.
- Created a 10GB logical volume to mount /apps on.
- Restore /apps data to this new /apps.
- Now you have 20GB available to add to /usr and /tmp.

Hai
Elena Leontieva
Esteemed Contributor

Re: Increase /usr and /tmp disk space

I think in order to increase /usr you have to be in a single user mode:
shutdown -ry 0
interrupt
boot pri ipl
ISL> hpux -is
(only / and /stand should be mounted)
/sbin/lvextend -L XXX(MB) /dev/vg00/lvolx
/sbin/extendfs -F vxfs /dev/vg00/rlvolx
mount /dev/vg00/lvolx /usr
bdf (to check that it has been extended)
init 3
Steven E. Protter
Exalted Contributor

Re: Increase /usr and /tmp disk space

You can still do it if you don't have OnlineJFS, you just can't do it during the day.

The /tmp filesystem is a bit annoying because by default the allocation is strict, meaning the new space must be contiguous.

If you have space contiguous to the end of /tmp you can do this.

init 1

brings the system down to run level 1

lvextend -L 1024 /dev/vg00/lvol6 /dev/dsk/c1t1d0

umount /tmp

extendfs -F vxfs /dev/vg00/rlvol6

1024 is the number of megabytes to expand /tmp to
The /dev/dsk entry is the chosen disk.

/var is even tougher.

To expand it without OnlineJFS, you will need to follow this procedure.

shutdown -ry now

interupt at the 10 second prompt

bo

Y Interact with the ISL

hpux -is

You have now booted to single user mode and can use the lvextend and extendfs commands to finish the job.

Good Luck,

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
Alex Jenner
Advisor

Re: Increase /usr and /tmp disk space

Since you have already allocated all the space available, then the only way of increasing some volumes, is to decrease others. JRF makes a good point about probably needing to backup and restore those volumes that you need to reduce, then use 'lvreduce' and 'newfs'

Here's another idea and can only be called an "easy way" if this machine can afford the downtime involved. Make an ignite tape backup using 'make_recovery' with the "-Ai" options so that the recovery is interactive, then reduce/increase the size of the volumes when you go to restore the system from the recovery tape.
twang
Honored Contributor

Re: Increase /usr and /tmp disk space

if you have online jfs you can online change /usr and /tmp size. it is better that you need to
1. boot to a single user mode
ISL > hpux -is
2. mount /usr ( for commands )
# umount /tmp
3. change the size of the logical volume
of tmp.
# lvextend -L /dev/vg00/lvol4
4. extend the file system with extendfs
# extendfs /dev/vg00/rlvol4
# mount /dev/vg00/lvol4 /tmp
5. boot the system.
John Bolene
Honored Contributor

Re: Increase /usr and /tmp disk space

you can also change these file systems by doing an ignite restore, and changing the allocations on the first ignite screen

otherwise, you are off to single user land to make these changes if you do not have OnlineJFS
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com