LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-14-2010, 10:36 PM   #1
jrodger
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Rep: Reputation: 0
Need to move /var


I have a little issue, every month the log folder fills up and stops my mail coming through. The poeple that build the server put it into a ridiculously small partition and have 2 home partitions. This is a proxy server, no-one logs onto it and I want to use one of the home folders to relocate the /var folder to.

Any ideas? pointers most welcome.

JR
 
Old 02-14-2010, 11:45 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,254

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
You should look into the logrotate service to automatically prune your logfiles. Moving partitions will not solve your problem, the disk will still fill up eventually.
 
Old 02-15-2010, 01:17 AM   #3
jrodger
LQ Newbie
 
Registered: Nov 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Logrotate vs mv files

I am aware of the logrotate thing but it is not working, therefore the move is a band-aid solution at this stage, but also a logical one, when the files are moved, I can then work on getting logrotate to work correclty.
 
Old 02-15-2010, 06:39 AM   #4
slightlystoopid
Member
 
Registered: Jan 2010
Distribution: Arch, Gentoo, FreeBSD
Posts: 64

Rep: Reputation: 16
are logs really the only thing significantly filling up /var? You could relocate /var to a larger partition. You could also create a /var/log symlink relocating the logs somewhere else. or you could get logrotate working. make sure that /etc/logrotate.conf contains something like:

Code:
size=somethingsmall
postrotate
find /var/log -iname '*.log.*' -mtime +somethingshort -exec rm {} \;
endscript
 
Old 02-15-2010, 12:52 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Split out from the other thread - please don't hi-jack other
peoples threads.
 
Old 02-15-2010, 02:39 PM   #6
mpier
Member
 
Registered: Jan 2008
Location: Poland
Distribution: Slackware, Arch
Posts: 38

Rep: Reputation: 17
Hi,
is really necessary to relocate /var. If omitted, may even prevent the system from booting up. The simplest way is to copy whole /var content, cp -a /var/* /mnt/new_var and mount /dev/new_var_partition /var. /mnt/new_war was the previous /dev/new_var_partiotion mount point.

Sorry form my english.

Last edited by mpier; 02-15-2010 at 02:40 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to move /var? Cyberman Debian 2 04-05-2009 07:59 PM
spam_buttons move from /var/spool/mail/user to $HOME/mail/Junk paul_mat Linux - Software 0 05-25-2006 03:07 AM
How do I move /var to a logical volume? bret Linux - General 5 02-03-2006 12:59 PM
Post installation re-partitioning: how to move /var? wolfpeach Debian 4 06-30-2004 11:17 AM
/var move killed ftp server jeffpoulsen Linux - Networking 1 10-24-2002 08:46 AM


All times are GMT -5. The time now is 10:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration