[CentOS] is it possible to resive /var online?

Sun May 2 21:23:08 UTC 2010
Kahlil Hodgson <kahlil.hodgson at dealmax.com.au>

On 05/03/2010 05:15 AM, Rudi Ahlers wrote:
> Is it possible, safely, to resize /var while a server is running? I
> urgently need to resize a full 2GB /var on a running server which is
> located at a remote location where no one can get to it for 2 days?

I've done it before on a quiet system and it worked fine.  Still think
its a bit risky if you cant get to it for 2 days.

> I already moved /var/logs to it's own LVM partition but it didn't help
> at all so I think it's better to rather just resize it. Google searches
> suggest taking the server offline, or boot into single mode. But this
> won't be possible for another 2 or so days and I urgently need to
> install more software on the server.

If you "urgently need to install new software", then a small possibility
of breaking the system for 2 days is probably a show stopper.  I'd
continue with your approach (as a temporary solution) of migrating bits
of /var to a different LVM.  If moving /var/logs didn't help, you need
to track down the big directories.  Try

du -sh /var/*

then drill down though your big candidates

/var/cache/yum, /var/spool, and /var/tmp are always candidates for clean up.

Hope this helps.

Kal