Hi all, 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? The system runs on lvm. 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. tia :) -- Kind Regards Rudi Ahlers SoftDux Website: http://www.SoftDux.com Technical Blog: http://Blog.SoftDux.com Office: 087 805 9573 Cell: 082 554 7532 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20100502/84166c63/attachment-0001.html>
Rudi Ahlers wrote:> Hi all, > > 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? > > The system runs on lvm.Growing on line EXT3 file systems on LVM has always worked ok for me. shrinking needs to be done off line but growing on line File systems has not given me any trouble to date. I expect that the likelihood of problems with this is proportional to the distance from your current location to the server though ;-) regards Brendan
On Sun, May 2, 2010 at 3:15 PM, Rudi Ahlers <rudiahlers at gmail.com> wrote:> Hi all, > > 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? > > The system runs on lvm.If it's on LVM it's pretty simple: lvs to show the current lvs. lvresize -L +500M /dev/VolGroup00/var_lv resize2fs /dev/VolGroup00/var_lv If you're running earlier versions of lvm you may need to use ex2online instead of resize2fs.
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
Apparently Analagous Threads
- is it possible to resive a PV in LVM and add more LV's ?
- what''s correct way of shrinking LVM based domU?
- Re: unable to access Linux HVM via xm console - Couldnot read tty from store: No such file or directory
- how do I find out which nameserver returns a DNS query?
- setting up bare minimal CentOS VM