LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-13-2004, 07:11 AM   #1
masterJ
Member
 
Registered: Jun 2003
Location: London
Distribution: Debian Sarge & Slack 10.0
Posts: 52

Rep: Reputation: 15
/var full


I have a Redhat 7.1 box that's configured as an Intranet server. It's working fine except for uploading some content.

Had a quick look, and a "df -h" reports that /var is full (236Mb), but by doing a "du -ah" on /var, I can only find 63Mb of files...

Any ideas what this could be? I've checked the fstab file, and nothing's being mounted to /var or anything...

Cheers.
 
Old 01-13-2004, 09:13 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
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...
 
Old 01-13-2004, 10:22 AM   #3
rm303
LQ Newbie
 
Registered: Jan 2004
Posts: 4

Rep: Reputation: 0
Lightbulb

Quote:
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 ...
 
Old 01-13-2004, 12:55 PM   #4
masterJ
Member
 
Registered: Jun 2003
Location: London
Distribution: Debian Sarge & Slack 10.0
Posts: 52

Original Poster
Rep: Reputation: 15
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...!
 
Old 01-13-2004, 01:53 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Quote:
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.
 
Old 01-13-2004, 01:59 PM   #6
masterJ
Member
 
Registered: Jun 2003
Location: London
Distribution: Debian Sarge & Slack 10.0
Posts: 52

Original Poster
Rep: Reputation: 15
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...)

So that's what's confusing me so much!!
 
Old 01-13-2004, 11:43 PM   #7
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Rep: Reputation: 31
/var is mounted on it's own partition?

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?
 
Old 01-14-2004, 12:01 PM   #8
masterJ
Member
 
Registered: Jun 2003
Location: London
Distribution: Debian Sarge & Slack 10.0
Posts: 52

Original Poster
Rep: Reputation: 15
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?

Thanks...

Last edited by masterJ; 01-14-2004 at 12:03 PM.
 
Old 01-15-2004, 07:09 PM   #9
Pico_01
LQ Newbie
 
Registered: Jan 2004
Posts: 23

Rep: Reputation: 15
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.
 
Old 01-16-2004, 04:43 AM   #10
masterJ
Member
 
Registered: Jun 2003
Location: London
Distribution: Debian Sarge & Slack 10.0
Posts: 52

Original Poster
Rep: Reputation: 15
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....
 
Old 01-16-2004, 12:41 PM   #11
Pico_01
LQ Newbie
 
Registered: Jan 2004
Posts: 23

Rep: Reputation: 15
I am not aware of any other method. I have seen this problem on sun boxes and a reboot fixes them.
 
Old 01-16-2004, 01:27 PM   #12
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Quote:
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var full manoj142 Linux - General 8 10-17-2005 07:00 AM
Up2date problem /var partition full hurlant Fedora - Installation 3 08-17-2005 01:37 PM
/var really full or not? philforrest Linux - Software 6 02-22-2005 04:10 AM
Question about full /var partition. Allen T Linux - General 1 04-18-2003 08:36 AM
2 gig /var partition already full after 3 weeks Nigel_Tufnel Linux - General 2 02-26-2003 09:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration