From owner-freebsd-questions@FreeBSD.ORG Fri May 22 16:50:54 2009 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 0CEEB106566C for ; Fri, 22 May 2009 16:50:54 +0000 (UTC) (envelope-from fcondo@quinn.com) Received: from mail-gx0-f166.google.com (mail-gx0-f166.google.com [209.85.217.166]) by mx1.freebsd.org (Postfix) with ESMTP id ACD498FC21 for ; Fri, 22 May 2009 16:50:53 +0000 (UTC) (envelope-from fcondo@quinn.com) Received: by gxk10 with SMTP id 10so3706265gxk.19 for ; Fri, 22 May 2009 09:50:52 -0700 (PDT) MIME-Version: 1.0 Sender: fcondo@quinn.com Received: by 10.90.104.15 with SMTP id b15mr3288238agc.98.1243009353433; Fri, 22 May 2009 09:22:33 -0700 (PDT) In-Reply-To: References: From: Fred Condo Date: Fri, 22 May 2009 09:22:18 -0700 X-Google-Sender-Auth: ae10b0b5ea8d853c Message-ID: To: Luke Dean Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: How to recover disk space after "filesystem full" 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: Fri, 22 May 2009 16:50:54 -0000 On Fri, May 22, 2009 at 9:14 AM, Luke Dean wrote: > > Yes, it sounds like a stupid question, but let me tell the story. > > The log for my dhcp server filled up /var last night, which meant that > dhcpd was also unable to hand out new leases, which meant that I had > effectively been DOSed. =C2=A0I'll have to look into changing my logging > policies. > > So, to correct the problem, I log into the router, removed the big > log and several other files in /var to free up some space, and assumed > this would correct the problem. > > It did not. > Several minutes after freeing up a lot of space on /var, I continued > to get "filesystem full" messages and "df" continued to show the > capacity at >100%. =C2=A0I checked "df -i" for the inodes too. =C2=A0That= was > fine. =C2=A0I ran a quick fsck to see if that might shock the system into > seeing all the space that I'd freed up, but no good. > > I ended up rebooting the box. > > Was there any other possible solution I could've tried? > > Why wouldn't the free space immediately appear as free? Because unlinking the file does not close the file. Restarting the dhcp daemon probably would have done the trick. The filesystem will free the disk space only when all references to the file have gone away.