1833785 Members
4014 Online
110063 Solutions
New Discussion

Reduce /var

 
castro_2
Regular Advisor

Reduce /var

I need to reduce /var. How can I do this?

Thanks
7 REPLIES 7
MarkSyder
Honored Contributor

Re: Reduce /var

Bearing in mind that some important log files are stored in /var, the first thing to do is ask if you really need to do this?

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Pete Randall
Outstanding Contributor

Re: Reduce /var

Anytime you reduce a file system, you are going to have to re-create it. So, to start, you're going to have to back it up, remove it, redefine it, and restore it. I would suggest that the easiest way to do this would be to do an Ignite make_tape_recovery backup and then restore from it, interrupting the boot process to re-size your root file systems.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Reduce /var

If you have OnlineJFS and it's at least Version 3.3 then you can do an fsadm -F vxfs -b xxxx and specify a smaller number. Max fsadm_vxfs for details. Next, you do an lvreduce and you are done.

However, if you have a version below 3.3 and you attempt the fsadm -b with a smaller value the command MAY work but it will probably corrupt the filesystem.

Since you didn't bother to identify the OS or filesystem type, it's a bit difficult to be more specific.
If it ain't broke, I can fix that.
Hoang Chi Cong_1
Honored Contributor

Re: Reduce /var

Hi castro.

Don't know it realy helps you but in my system, it helps me so mutch to reduce /var:
Remove all of the content of /var/preserve directory.
Other file that you can initialize : /var/adm/log directory.

Finaly, if the trouble still persit, extend the /var.
You need to boot in single-user mode to extend /var mount point system.

Goodluck!
Regard,
HoangChiCong
Looking for a special chance.......
Timothy Czarnik
Esteemed Contributor

Re: Reduce /var

I was wondering if you need to increase the size of /var or to free up space inside an already created /var? If you need to just free up some space you can use the cleanup script that removes versions of older saved patch files. You can specify how many generations of old patch files you want to keep around but I find that there is usually a decent amount of space here that can be freed, especially in a system that has been around for awhile.
Hey! Who turned out the lights!
Deoncia Grayson_1
Honored Contributor

Re: Reduce /var

I'm curious, why do you need to reduce /var? What size is it now?
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Garry Ferguson
Frequent Advisor

Re: Reduce /var

Another option is to move a directory or two
to another filesystem and use logical links to the new locations. ( Careful about which ones you move though! Some may be needed at boot time. )
Garry