mikenn
09-01-2003, 02:59 PM
HI,
/var partion is full, can you please recommend what files can be deleted.
Also it is RedHat 7.3 and Cpanel.
Anyhelp is appreciated.
Slidey
09-01-2003, 03:23 PM
delete old logs
try and move a large dir to another partition and symlink it
unixtx
09-01-2003, 05:00 PM
to see which dir is the hog:
du -h --max-depth=1 /var
then take a look at the big one's in the same manner, to see where you need to prune:
du -h --max-depth=1 /var/log
...
sprintserve
09-01-2003, 11:18 PM
Since it is Cpanel, there's log rotation.
do the following
1. cd /var/log
2. ls (check what are the rotated logs. Those with the biggest number extensions are the oldest)
3. rm -f *.1 | rm -f *.2 | rm -f *.3 | rm -f *.4
etc.
That should free up quite some space.
rotteneye
09-02-2003, 03:27 AM
Hello,
Try this also
echo '' > /var/log/messages
echo '' > /var/log/exim_mainlog
( echo and two separate single quotes, it is not a double quote)
Slidey
09-02-2003, 03:48 AM
you mean delete the logs ?
no dont do that, logs can be useful
sprintserve
09-02-2003, 04:39 AM
If you intend to keep the logs, find a partition that has a lot of space (i.e. /home) and make a directory and move them across.
Slidey
09-02-2003, 05:25 AM
and as i said further up, symlink the dir..
in the case of logs you could always play with syslog.conf but i think other things will break
better to a) work out why the partition is so full b) if its logs work out whats filling them up so much, maybe tweak your syslog c) move the directory to a larger partition and symlink d) have a think about how you partition in the future
sprintserve
09-02-2003, 05:52 AM
If you are going to move and symlink, remember to shut down some of the services that may lock the files and prevent you from completing the moving. (e.g. exim, httpd etc)
Slidey
09-02-2003, 07:01 AM
they probably wont stop you doing it, but they might stop working..
id suggest a reboot after you've moved the stuff to make sure everything coems up fine