Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-14-2010, 09:36 PM   #1
LQ Newbie
Registered: Nov 2009
Location: Sydney, Australia
Distribution: Slackware
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.

Old 02-14-2010, 10:45 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,349

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
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, 12:17 AM   #3
LQ Newbie
Registered: Nov 2009
Location: Sydney, Australia
Distribution: Slackware
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, 05:39 AM   #4
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:

find /var/log -iname '*.log.*' -mtime +somethingshort -exec rm {} \;
Old 02-15-2010, 11:52 AM   #5
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

Rep: Reputation: 17
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 01:40 PM.


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 06:59 PM
spam_buttons move from /var/spool/mail/user to $HOME/mail/Junk paul_mat Linux - Software 0 05-25-2006 02:07 AM
How do I move /var to a logical volume? bret Linux - General 5 02-03-2006 11:59 AM
Post installation re-partitioning: how to move /var? wolfpeach Debian 4 06-30-2004 10:17 AM
/var move killed ftp server jeffpoulsen Linux - Networking 1 10-24-2002 07:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:11 AM.

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