From owner-freebsd-questions@FreeBSD.ORG Mon Mar 17 17:20:06 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 5615A106566B for ; Mon, 17 Mar 2008 17:20:06 +0000 (UTC) (envelope-from chris@vindaloo.com) Received: from corellia.vindaloo.com (corellia.vindaloo.com [64.51.148.100]) by mx1.freebsd.org (Postfix) with ESMTP id 279118FC15 for ; Mon, 17 Mar 2008 17:20:06 +0000 (UTC) (envelope-from chris@vindaloo.com) Received: from hadar.vindaloo.com (hadar.vindaloo.com [172.24.145.72]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by corellia.vindaloo.com (Postfix) with ESMTP id 6A6ED5D6A; Mon, 17 Mar 2008 13:20:03 -0400 (EDT) Message-Id: <7E93919B-A105-4133-AC4D-0783D51A6527@vindaloo.com> From: Christopher Sean Hilton To: Dr. Jennifer Nussbaum In-Reply-To: <878724.45020.qm@web53408.mail.re2.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 17 Mar 2008 13:20:02 -0400 References: <878724.45020.qm@web53408.mail.re2.yahoo.com> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-questions@freebsd.org Subject: Re: Urgent: filesystem "full", though space is available 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: Mon, 17 Mar 2008 17:20:06 -0000 On Mar 17, 2008, at 11:34 AM, Dr. Jennifer Nussbaum wrote: > > Hi, Ive got a big problem now on a production server. > > When i do various things, i am getting "write failed, file system > full" > messages all over the place. Ive gone through and deleted > things i can, and i should have the space now, but its just > not available: > > $ df -m > Filesystem 1M-blocks Used Avail Capacity Mounted on > /dev/da0s1a 2015 1858 -3 100% / > /dev/da0s1e 14061 9002 3933 70% /usr/local > procfs 0 0 0 100% /proc > > I dont know what kind of math lets you do 2015-1858 and gives > you an answer of -3! > > I have softupdates, or whatever, but i dont know how to get > it to release this space. I cant reboot the running server. > I am planning on adding a disc to this system but right now > i need to get this space released ASAP! Can anyone help? > The math used in df is a compromise. The system reserves about 8% of the blocks in the filesystem for root to write only. This is because back in the day if the filesystem truely completely filled up the situation would go from bad to worse pretty quickly. If I recall correctly The filesystem performance falls off of the cliff once the filesystem fills up. In your particular case I can see that you have about 150Mb free on the system. You do have the option of getting at this space using the tunefs command: man tunefs to change the percentage of free space reserved for root but as I inferred before expect performance to suffer. A thread poster suggested that you remove the contents of /usr/ports/ distfiles to free up some space. If you built the system from scratch and have built a bunch of ports this is a good place to go but if that is the case you probably want to clean out any work directories first: # find /usr/ports -type d -name work -print Will generate a list of the work directories for any ports you have built. In general you can completely recreate this data by building the port again so if you have a lot of space tied up here you can easily reclaim it with this command: # find /usr/ports -type d -name work -exec rm -rf {} \; This will remove just the work directories from the ports tree. It costs you extract, patch, and compile time but it's quicker than: # cd /usr/ports # make clean If you haven't built the system from ports then you have to identify what action filled up the filesystem and make the appropriate correction. -- Chris