Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i am using fedora 12. i got "no space in root directory" warning from the system..when i went through it, i found many of the space has been occupied by /var/log/httpd/error-log file. so i just deleted the file..
but when i check the space with "df -h" command.it shows 0% availability..the same problem occured before...but it solved when i restarted the system..but how to regain the space wihtout restarting the system?
please guide me..
Thanks in advance..
Click here to see the post LQ members have rated as the most helpful post in this thread.
The log file is in use, most likely by the syslog service (you can easily verify it using the lsof command). This means that the application creates a hard link and uses it to populate the log file: if you remove the file, the hard link is still there and keeps the disk space usage. You can restart the syslogd service using either
kill -1 `cat /var/run/syslogd.pid`
In this way the service frees the log file, the hard link is destroyed and the space is available again.
Anyway I would investigate why the error-log file is used so heavily. Maybe you can limit the logging of the httpd service acting on the related iptables rules. Just an idea.
If I may add to the above: removing a log file while software is running is nearly ALWAYS a bad idea.
Better to 'zero' the log file by usine a command line such as " > logfile ".
while less prone to causing problems, this also is not the BEST solution. Best is to drop services, clean up logs and temp files, then restart services. Best is not always an option if a service outage would impact a production process, so I have used this 'second best' solution of returned a log to 'zero' using redirection often.
If your "/" directory is made on LVM . then simply extend with lvextend command!
The /var partition may be separate from the / partition, and there is no "simply" with lvextend. Running lvextend on a partition also means you have to run resize2fs, which you can't do on a mounted volume. If you do it, you'll wind up with a non-readable disk after you reboot. You have to be booted from a rescue CD/DVD, into single-user before doing those things.
If you're going to try to answer a question, please provide the OP with complete details, so they don't wind up with a broken system.