Re: running out of inodes

2009-07-25 Thread ill...@gmail.com
2009/7/25 Peter :
> Hello,
>
> We have a strange issue with one of our machines. We have a busy site on
> it with a lot content  and cache files - all of these a lot small files.
>
> We started to run out inodes.
>
> [r...@pistolcontent-lb3 /]# df -hi
> Filesystem       Size    Used   Avail Capacity  iused  ifree %iused
> Mounted on
> /dev/aacd0s1a    496M    382M     74M    84%    25402  40388   39%   /
> devfs            1.0K    1.0K      0B   100%        0      0  100%   /dev
> /dev/aacd0s1e    496M    2.7M    453M     1%       99  65691    0%   /tmp
> /dev/aacd0s1f    123G     95G     18G    84% 16623996  27266  100%   /usr
> /dev/aacd0s1d    4.8G     62M    4.4G     1%     1425 658029    0%   /var
>
>
>
> What is the best way to handle it ?

fsck_ffs -r
may help temporarily, or may not

dump, newfs -i 4096, restore
might solve it

breaking the content and cache files out into their own
filesystem (with its own, more easily managed parameters)
is probably the best way

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


running out of inodes

2009-07-25 Thread Peter
Hello,

We have a strange issue with one of our machines. We have a busy site on
it with a lot content  and cache files - all of these a lot small files.

We started to run out inodes.

[r...@pistolcontent-lb3 /]# df -hi
Filesystem   SizeUsed   Avail Capacity  iused  ifree %iused
Mounted on
/dev/aacd0s1a496M382M 74M84%25402  40388   39%   /
devfs1.0K1.0K  0B   100%0  0  100%   /dev
/dev/aacd0s1e496M2.7M453M 1%   99  656910%   /tmp
/dev/aacd0s1f123G 95G 18G84% 16623996  27266  100%   /usr
/dev/aacd0s1d4.8G 62M4.4G 1% 1425 6580290%   /var



What is the best way to handle it ?

Thanks in advance.


Peter Zyumbilev

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: /tmp running out of inodes

2008-12-18 Thread Tankko
> As Kirk has already said, you need to figure why this is happening in
> the first place, but there is a periodic job which can help keep /tmp
> tidy for you. It is in /etc/periodic/daily/110.clean-tmps and can be
> enabled with this in /etc/periodic.conf:
>
> daily_clean_tmps_enable="YES"
>
> You can tailor its behaviour depending on your needs - look for the
> relevant knobs in /etc/defaults/periodic.conf
>

Thank you for all your help.  I now understand what is going wrong.
Thanks again!

Tankko
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: /tmp running out of inodes

2008-12-18 Thread Daniel Bye
On Thu, Dec 18, 2008 at 08:54:33AM -0800, Tankko wrote:
> On a side question...what the the best policy for deleting files from
> /tmp?  Seems like a lot of apps are happy to leave files in /tmp.  Is
> clean up commonly done as a cron job?  What about files like
> mysql.sock= which are important.  I can't just blindly remove
> everything in /tmp each night.

As Kirk has already said, you need to figure why this is happening in 
the first place, but there is a periodic job which can help keep /tmp
tidy for you. It is in /etc/periodic/daily/110.clean-tmps and can be
enabled with this in /etc/periodic.conf:

daily_clean_tmps_enable="YES"

You can tailor its behaviour depending on your needs - look for the
relevant knobs in /etc/defaults/periodic.conf

Dan

-- 
Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpG0snG3rd8V.pgp
Description: PGP signature


Re: /tmp running out of inodes

2008-12-18 Thread Dan Nelson
In the last episode (Dec 18), Tankko said:
> For the second time in 2 weeks my server has gone down due to running
> out of inodes in /tmp.  The first time it did this /tmp was filled
> with files, so that made sense.  I delete all the files from /tmp and
> all was well for a few weeks.  Just this morning it did it again
> (keep in mind that this sever is currently 700 miles away) and had to
> be rebooted.
> 
> But when I looked at /tmp, it was empty except for a couple of files,
> but running df shows the follow:
> 
> Filesystem SizeUsed   Avail Capacity iusedifree %iused  Mounted on
> /dev/ad4s1a496M 59M398M13%1535642552%   /
> devfs  1.0K1.0K  0B   100%   00  100%   /dev
> /dev/ad4s1e496M 69M387M15%   657900  100%   /tmp
> /dev/ad4s1f221G5.2G198G 3%  337742 295968481%   /usr
> /dev/ad4s1d1.9G757M1.0G42%1632   2809901%   /var
> /dev/md019M 12K 18M 0%   9 28050%   /tmp
> /dev/ad5s1c289G 49G217G18%   27779 391156430%   /bigdrive

You seem to have two filesystems mounted on /tmp at the moment, which
could be affecting your ability to see files in the one that got
overlayed.

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: /tmp running out of inodes

2008-12-18 Thread Kirk Strauser
On Thursday 18 December 2008 10:54:33 Tankko wrote:

> On a side question...what the the best policy for deleting files from
> /tmp?  Seems like a lot of apps are happy to leave files in /tmp.

What kind of files are you seeing in /tmp?  I have files in mine from July, but 
only about 7,000 files today - not nearly enough to run out of inodes (not that 
it should crash the FS anyway).

> Is clean up commonly done as a cron job?  What about files like mysql.sock=
> which are important.  I can't just blindly remove everything in /tmp each
> night.

I think you really need to figure out what's spamming /tmp.  You *can* do 
something like "find /tmp -type f -oldermt '3 days ago' -delete", but that's 
just addressing the symptoms.
-- 
Kirk Strauser
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


/tmp running out of inodes

2008-12-18 Thread Tankko
For the second time in 2 weeks my server has gone down due to running
out of inodes in /tmp.  The first time it did this /tmp was filled
with files, so that made sense.  I delete all the files from /tmp and
all was well for a few weeks.  Just this morning it did it again (keep
in mind that this sever is currently 700 miles away) and had to be
rebooted.

But when I looked at /tmp, it was empty except for a couple of files,
but running df shows the follow:

Filesystem SizeUsed   Avail Capacity iusedifree %iused  Mounted on
/dev/ad4s1a496M 59M398M13%1535642552%   /
devfs  1.0K1.0K  0B   100%   00  100%   /dev
/dev/ad4s1e496M 69M387M15%   657900  100%   /tmp
/dev/ad4s1f221G5.2G198G 3%  337742 295968481%   /usr
/dev/ad4s1d1.9G757M1.0G42%1632   2809901%   /var
/dev/md019M 12K 18M 0%   9 28050%   /tmp
/dev/ad5s1c289G 49G217G18%   27779 391156430%   /bigdrive

65790 used inodes and 0 free on /tmp

I ran fsck and it shows:

** /dev/ad4s1e (NO WRITE)
** Last Mounted on /tmp
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
65790 files, 35374 used, 218441 free (9 frags, 27304 blocks, 0.0% fragmentation)

So where are these mysterious 65790 files?  Is there a way to clean
this up?  And more importantly is there a way to do this remotely
given that I am 700 miles from the server right now?

Every time the server goes down due to this problem, it won't come up
again without someone physically running fsck at boot.

On a side question...what the the best policy for deleting files from
/tmp?  Seems like a lot of apps are happy to leave files in /tmp.  Is
clean up commonly done as a cron job?  What about files like
mysql.sock= which are important.  I can't just blindly remove
everything in /tmp each night.

Thanks for any help.

Tankko
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"