From owner-freebsd-questions Tue Jan 28 15: 7:19 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 9C35037B401 for ; Tue, 28 Jan 2003 15:07:17 -0800 (PST) Received: from cypress.adhesivemedia.com (cypress.adhesivemedia.com [207.202.159.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBDAD43F85 for ; Tue, 28 Jan 2003 15:07:16 -0800 (PST) (envelope-from philip@adhesivemedia.com) Received: from cypress.adhesivemedia.com (localhost [127.0.0.1]) by cypress.adhesivemedia.com (8.12.3/8.12.3) with ESMTP id h0SN7ASc086867; Tue, 28 Jan 2003 15:07:10 -0800 (PST) (envelope-from philip@adhesivemedia.com) Received: from localhost (philip@localhost) by cypress.adhesivemedia.com (8.12.3/8.12.3/Submit) with ESMTP id h0SN79t4086864; Tue, 28 Jan 2003 15:07:09 -0800 (PST) X-Authentication-Warning: cypress.adhesivemedia.com: philip owned process doing -bs Date: Tue, 28 Jan 2003 15:07:09 -0800 (PST) From: Philip Hallstrom To: Bill Moran Cc: David.Bear@asu.edu, Subject: Re: Deleted files not releasing their space (was Re: syslog message wrt inodes) In-Reply-To: <3E36E3AF.8030201@potentialtech.com> Message-ID: <20030128150623.S82717-100000@cypress.adhesivemedia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 (skip down) On Tue, 28 Jan 2003, Bill Moran wrote: > 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. lsof can tell you what files are open... and includes the process/pids that have it open. -philip To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message