From owner-freebsd-questions Tue Jan 28 12: 9:20 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8610737B401 for ; Tue, 28 Jan 2003 12:09:18 -0800 (PST) Received: from mail.adelphia.net (pa-plum1b-166.pit.adelphia.net [24.53.161.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F42643F79 for ; Tue, 28 Jan 2003 12:09:17 -0800 (PST) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com ([172.16.0.95]) by mail.adelphia.net (8.12.3/8.12.3) with ESMTP id h0SKAdiE007590; Tue, 28 Jan 2003 15:10:40 -0500 (EST) (envelope-from wmoran@potentialtech.com) Message-ID: <3E36E3AF.8030201@potentialtech.com> Date: Tue, 28 Jan 2003 15:10:23 -0500 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021127 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David.Bear@asu.edu Cc: freebsd-questions@freebsd.org Subject: Deleted files not releasing their space (was Re: syslog message wrt inodes) References: <20030128093720.A26639@asu.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David Bear wrote: > I'm getting messages like below that I'm out of inodes on /var. > > asu.edu kernel log messages: > >>id 25 on /var: out of inodes >> syslogd: /var/log/auth.log: No such file or directory >> syslogd: /var/log/maillog: No such file or directory >> syslogd: /var/log/cron: No such file or directory >> syslogd: /var/log/auth.log: No such file or directory >> syslogd: /var/log/maillog: No such file or directory >> syslogd: /var/log/cron: No such file or directory >> syslogd: /var/log/auth.log: No such file or directory >> syslogd: /var/log/maillog: No such file or directory >> syslogd: /var/log/cron: No such file or directory >> syslogd: /var/log/auth.log: No such file or directory >> syslogd: /var/log/maillog: No such file or directory >> syslogd: /var/log/cron: No such file or directory > > > Filesystem 1K-blocks Used Avail Capacity iused ifree %iused Mounted on > /dev/ad0s1a 128990 37232 81440 31% 1316 14938 8% / > /dev/ad0s1f 257998 4 237356 0% 2 32508 0% /tmp > /dev/ad0s1g 2341102 508366 1645448 24% 37711 256175 13% /usr > /dev/ad0s1e 257998 25572 211788 11% 8298 24212 26% /var > procfs 4 4 0 100% 25 507 5% /proc > > Last week my var volume did run out of inodes. I erase some > snort logs to free up the inodes. But it appears the kernel or > syslogd doesn't know about it. > > any pointers on letting the kernel know I have enough inodes? Let's see if I remember the details on this. I believe this happens when a file is deleted, but another program still holds a filehandle? to it. Thus, if you delete Apache's log file (for example) but don't restart Apache, the space the logfile is using isn't truely freed. (This is why newsyslog.conf has a column for the PID of a process to restart). So ... if you know which process had the files open, restart it (probably by sending it a -HUP). If you don't know, you can probably cheat and just reboot the machine, but that shouldn't be necessary. -- Bill Moran Potential Technologies http://www.potentialtech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message