1834275 Members
1681 Online
110066 Solutions
New Discussion

Shrinking /var

 
Lacrosse
Regular Advisor

Shrinking /var

I have a mirrored /var filesystem and want to shrink it, can I do this through SAM or command line only, if command line does someone know off hand what thos commands are (I'm assuming I have to break the mirror) Also I do not have Online JFS
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: Shrinking /var

Go UT!

Oh, ah, back to business. Without Online JFS, you're going to have to re-boot into single user mode just to get it unmounted so you can work on it. Make sure you have GOOD backups before you start, and a good plan of attack, then schedule some downtime.

Pete

Pete
Pete Randall
Outstanding Contributor

Re: Shrinking /var

I should mention that the easiest way to accomplish this, provide you have some extra disk space is to create a new filesystem (call it /var2), restore everything into it, then switch the mounts for /var and /var2 and reboot.

Pete

Pete
Jeff Schussele
Honored Contributor

Re: Shrinking /var

Sorry - without OnLine JFS you cannot do this outside of single-user mode.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Oleg Zieaev_1
Regular Advisor

Re: Shrinking /var

agree with /var2 approach.
Easy and working.

Hope this helps.
0leg
Professionals will prevail ...
Oleg Zieaev_1
Regular Advisor

Re: Shrinking /var

/var is not necessary to be big.
We use /var/tmp, /var/opt/perf, /var/adm/crash as separate file systems mounted under /var.
This also give us flexibility maintaining them.

Hope this helps,
0leg
Professionals will prevail ...
James R. Ferguson
Acclaimed Contributor

Re: Shrinking /var

Hi:

I give careful consideration to not shrinking /var. One always needs space for patches (/var/adm/sw/) and for temporary space (/var/tmp/).

If you insist, in the absence of OnlineJFS you will need to boot into single user mode and use the LVM commands in the '/sbin' directory. Alternately, mount '/usr'. You do not need to break the mirror; merely resize your filesystem. Be advised that you will need to reload the data therein afterwards since to shrink it in the absence of OnlineJFS means that you 'newfs' to a smaller size!

Regards!

...JRF...
Kellogg Unix Team
Trusted Contributor

Re: Shrinking /var

Hi,

Another way will be to do a "make_tape_recovery" of your vg00, boot from this tape, and resize the logical volumes. You need to have Ignite/UX software installed on the system which can be downloaded from HP's site.

HTH
...Manjeet
work is fun ! (my manager is standing behind me!!)
Kellogg Unix Team
Trusted Contributor

Re: Shrinking /var

I agree with Oleg - make separate mount points to contain /var viz. /var/adm/crash can go to its own mount mount.

You may also want to run 'cleanup' utility (for patch cleanup) to make room in /var. Do "man cleanup" for details.

Thanks
...Manjeet
work is fun ! (my manager is standing behind me!!)
Lacrosse
Regular Advisor

Re: Shrinking /var

Thanks for the help.....bummer about the horns this week-end Pete