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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
Code:
/etc/init.d/syslogd restart
or
Code:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.