Web Hosting Talk







View Full Version : Need a lil help, please


Radon3k
11-29-2002, 01:40 AM
Ok I wasn't sure where to post this, so I'm posting here.

I have a dedicated server $49/month through United Colo. I have Plesk installed (friend sold me the license installed it for me).

Well something happened to one of the sites on my server, so I rebooted it (I don't run a company, so even though down time sucks, it's not as big of a deal as it would be to a company) and then NONE of the sites worked. Rebooted again. Got an error, and talked to my friend.

He went into SSH and played around and determiend that the /var folder is full. He didn't delete it and he signed off, but he did tell me that the drive had been partitioned wrong.

Ok so now it's 1235 and United Colo is sleeping and I need my server back up and running. Can someone please help me out here? If the drive is partitioned wrong, then fine, I'll get it re-done at a later time, but for right now I just want to delete all the logs in the /var folder. I really don't care what they are or how important they are, I just need my sites up.

I can get into SSH and Plesk just fine, it's Apache that won't start. The error is this:

"Unable to start/stop service: servicecontrol: Unable to exec start/stop utility: Service httpd failed to start."

Ok so I know this means Apache won't start and now I know why. Please help me clear out the /var folder. I need my sites back up, and even if this is a temporary solution, please help!

Thanks.

Radon3k
AIM: Radon3k
ICQ: 165832631
MSN: radon3k@hotmail.com

JonL
11-29-2002, 01:43 AM
You could just:

rm -rf /var/log

but I would recommend you downloading your log files first as backup. Also syslogd (the system log daemon) will not create new log files so if you delete logs you will need to

touch /var/log/log_name

in order to create a new file for the logs.

Radon3k
11-29-2002, 02:27 AM
Thanks but what you just said makes no sense to me..eheh :confused:

I'm not good with the command line...

baygirl
11-29-2002, 02:59 AM
1. Backup your var/log to somewhere like he said.

2. Only after you have backed up the logs, type:
rm -rf /var/log at the command line to remove the logs.

3. Now look at the names of the log files that you backed up and recreate them .
For example if you see the name maillog, recreate it like this
touch /var/log/maillog
Do this for each and everyone of the files.

lotuslnd
12-13-2002, 07:42 PM
Hey,

I would strongly advise against removing all of /var/log when the /var partition is full as there is more often than not a required directory structure in /var/log which could be tedious to recreate. Your best bet would be to "cat /dev/null > /var/log/messages" (for example) so that you simply nuke existing logs without messing with the directory structure.