From owner-freebsd-questions@FreeBSD.ORG Thu Dec 18 17:25:31 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E85F41065670 for ; Thu, 18 Dec 2008 17:25:31 +0000 (UTC) (envelope-from tankko@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by mx1.freebsd.org (Postfix) with ESMTP id C2E378FC12 for ; Thu, 18 Dec 2008 17:25:31 +0000 (UTC) (envelope-from tankko@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so716044wfg.7 for ; Thu, 18 Dec 2008 09:25:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=R7cD5PHcFbXfo64yWs6wC7AuRWqutzxxms3VUOBLd0E=; b=vuqRwxrZCq5b5CNHX2AKPByBGuj5wafa4SmBlgu1TnPei7KlV8nhlAoOyuVk2RXnd3 e0WGCXSX3v2ZbJdW0YIA2vS9DSBomMuKu308fUQNdOOh6IZeuUsNSEUJIhVQAkrCIkR9 Wq8Kwm92CbRii+0DEYx7Q9ovk/uCCf0+Fpzxk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=L1xGISSXZ4aIh1u8M55Ur3pl4UsgKPMW5rARJ3nj5PcupLRTZ87WPtQY1fROgyQ4w0 XkfKvTRYIB6o4zYK5jT/nBSU/A4dS/VOJRrqnNCwlz+CWfo+kSMt/AWcuEhekg+Hn63z yPZVDwBrGxHQuYlAvHVwfd4qZqEU/MS1+EuZg= Received: by 10.142.199.10 with SMTP id w10mr878871wff.345.1229619273680; Thu, 18 Dec 2008 08:54:33 -0800 (PST) Received: by 10.142.133.13 with HTTP; Thu, 18 Dec 2008 08:54:33 -0800 (PST) Message-ID: <7fec743f0812180854o2e66bee2m8369eba789290758@mail.gmail.com> Date: Thu, 18 Dec 2008 08:54:33 -0800 From: Tankko To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: /tmp running out of inodes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2008 17:25:32 -0000 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 Size Used Avail Capacity iused ifree %iused Mounted on /dev/ad4s1a 496M 59M 398M 13% 1535 64255 2% / devfs 1.0K 1.0K 0B 100% 0 0 100% /dev /dev/ad4s1e 496M 69M 387M 15% 65790 0 100% /tmp /dev/ad4s1f 221G 5.2G 198G 3% 337742 29596848 1% /usr /dev/ad4s1d 1.9G 757M 1.0G 42% 1632 280990 1% /var /dev/md0 19M 12K 18M 0% 9 2805 0% /tmp /dev/ad5s1c 289G 49G 217G 18% 27779 39115643 0% /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