Red HatThis forum is for the discussion of Red Hat Linux.
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.
Something must be boinked on your command you ran. I did the same exact commands against my /var and they came out reporting the same. Other than that though, df -h should be accurate and most likely your partition is filled. Try clearing out some log files. And you might want to consider moving your 'www' folder to another partition with more space if your only allocated 256 megs for it...
Originally posted by trickykid ....... And you might want to consider moving your 'www' folder to another partition with more space if your only allocated 256 megs for it...
THIS IS most probably the problem as your install (default) does that ...I wondered always why and increased it myself ...
Originally posted by masterJ www is stored on /usr on this box, not /var so that shouldn't be a prob.
Also, if i search around under /var, I can only find enought stuff to add up to about 60Mb, like df reported...
Anything else I should look for? Got me stumped...!
What's the exact command your using with du and how are you adding this up? If you do a 'du -ah /var' it should tell you your total after listing all the files and directories in /var and all of its subdirectories.
I have never seen df -h give any inaccurate output in just about all the times I've ever used it. Remember also, most likely if your adding up the sizes yourself, which I would think would be alot of files, remember to add 4k for about every folder as well, etc.
Yep, that's the command I'm running (did start with "df -h /var" but then thought I'd try -ah incase it was hidden stuff taking up all the room).
It's only logs and mail (which is just mailed logfiles) on this partition, and that only adds up to about 60Mb (ignoring small crappy stuf, which is why i say "about" 60Mb). but the partition still looks full, which is causing the prob mentioned before, and also slows down things like logging in via ssh (I'm assuming that's 'cos it's trying to log it but can't...)
Just out of curiosity, if you have space elsewhere on the disk, why don't you try moving all the files you can see from /var to another partition, & then see what du and df show?
I deleted about 30Mb worth of old mailed logs from that partition, so that solved the problem for a while, except /var is now reporting that it's full again under df , and du reckons there's only 18Mb of files on that volume (which I think is correct). Where is all this space going??!
Was thinking about giving the server a reboot, but will that cause problems if it thinks /var is full? ...or similarly, should I just unmount /var and then remount it again?
The reboot will solve the problem. Sometimes after deleting the files, the space is not freed. On running ls, you can see no stuff. A reboot frees up all the space and du and df results match after that.
That's more like it!! 211Mb free on /var - as it should be!!
Cheers for that. But is there some way of forcing it to 'refresh' this info other than a reboot. Seems a shame as the box had been up for the best part of a year with no hassle....
Originally posted by masterJ That's more like it!! 211Mb free on /var - as it should be!!
Cheers for that. But is there some way of forcing it to 'refresh' this info other than a reboot. Seems a shame as the box had been up for the best part of a year with no hassle....
You could possibly try to umount the partition/drive and then remount it. Not sure if that will fix the differences in free space, etc but might be the only way instead of a reboot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.