Operating System - HP-UX
1835971 Members
3211 Online
110088 Solutions
New Discussion

Re: Reducing the the size of /tmp, /var

 
Denton Williams
Advisor

Reducing the the size of /tmp, /var

Hi All,
I am in a terrible situation wherein I allocated too much space to /tmp and /var and as such wasting resources. I am now faced with the task of reducing these logical volumns. I will have to go into single user mode to reduce the sizes, but I am not too familiar with the correct ways to use the commands I need to do this operation. Are these steps accurate and can someone help me with the commands???

1. Create a backup of the /var directory to another logical volumn directory home using fbackup:

/usr/sbin/fbackup -f /home /var

2. Log into single user mode

3. unmount,reduce, extend and mount the logical volumn by using the commands:

i) umount /var
ii) lvreduce -L 500 /dev/vg00/lvol8
iii) newfs -F vxfs /dev/vg00/lvol8
iv) mount /dev/vg00/lvol8 /var

4. frecover the var directory:
/usr/sbin/frecover -f /home /var
I will be greatful is someone can look over the above commands to check if they are correct.

Thanks for your help,
Dee
Working hard
6 REPLIES 6
pap
Respected Contributor

Re: Reducing the the size of /tmp, /var

Hi Your steps seems correct.
Only thing you can take the backup using cpio command to if you are talking on logical volume. fabckup will be also fine.

ONE IMPORTANT POINT TO NOTE IS DO NOT FORGET TO RUN FOLLOWING COMMAND BEFORE BOOTING THE MACHINE.

#lvlnboot -R

THIS IS MOST IMP. FAILURE TO RUN THIS COMMAND WILL CREATE SYSTEM BOOT FAILURE....

This is important whenever you are changing any configuration in /dev/vg00.

-pap
"Winners don't do different things , they do things differently"
Robert Gamble
Respected Contributor

Re: Reducing the the size of /tmp, /var

hpuxrox
Respected Contributor

Re: Reducing the the size of /tmp, /var

Looks good to me
S.K. Chan
Honored Contributor

Re: Reducing the the size of /tmp, /var

Not questioning your judgement here but are you sure you want to do this ? It almost seems to me that having ample of space for /tmp and /var is a good thing, you don't have to worry about it in the future.

just my thoughts
Joseph C. Denman
Honored Contributor

Re: Reducing the the size of /tmp, /var

Denton,

I would not use lvreduce.

lvremove
then.
lvcreate

...jcd....
If I had only read the instructions first??

Re: Reducing the the size of /tmp, /var

Denton,

Have you checked whether you have OnLine JFS?

If you do have this product (it will show up in an swlist), then there's no need to go to single user mode, or even un-mount the file systems...

HTH

Duncan

I am an HPE Employee
Accept or Kudo