From owner-freebsd-questions@FreeBSD.ORG Thu Jul 31 07:30:31 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02FC2260 for ; Thu, 31 Jul 2014 07:30:31 +0000 (UTC) Received: from smtp1.work.de (smtp2.work.de [212.12.45.188]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAA25245B for ; Thu, 31 Jul 2014 07:30:30 +0000 (UTC) Received: from [212.12.32.87] (helo=work.de) by smtp1.work.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1XCkol-0002o3-09 for freebsd-questions@freebsd.org; Thu, 31 Jul 2014 09:30:27 +0200 Received: from [10.10.2.123] (helo=azubix.tec.work) by work.de with esmtp (Exim 4.69) (envelope-from ) id 1XCkop-0004l2-WB for freebsd-questions@freebsd.org; Thu, 31 Jul 2014 09:30:32 +0200 Date: Thu, 31 Jul 2014 09:30:26 +0200 From: Nils Effenberger To: freebsd-questions@freebsd.org Subject: Re: huge difference between du and df - no open file descriptors Message-ID: <20140731093026.1bf4381b@azubix.tec.work> In-Reply-To: References: <20140730142609.1ac2bdc9@azubix.tec.work> <20140730173224.76007499@azubix.tec.work> Organization: n@work X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2014 07:30:31 -0000 On Wed, 30 Jul 2014 11:42:37 -0400 Paul Kraus wrote: > On Jul 30, 2014, at 11:32, Nils Effenberger > wrote: > > > root@zhoernchen:~ # dd if=/dev/zero of=/root/test bs=1024 > > count=3500000 > > > > /: write failed, filesystem is full > > dd: /root/test: No space left on device > > 38849+0 records in > > 38848+0 records out > > 39780352 bytes transferred in 0.422187 secs (94224517 bytes/sec) > > root@zhoernchen:~ # df -h > > Filesystem Size Used Avail Capacity Mounted on > > /dev/mirror/root 4.8G 4.8G -395M 109% / > > devfs 1.0K 1.0K 0B 100% /dev > > root@zhoernchen:~ # rm test > > root@zhoernchen:~ # df -h > > Filesystem Size Used Avail Capacity Mounted on > > /dev/mirror/root 4.8G 4.8G -395M 109% / > > devfs 1.0K 1.0K 0B 100% /dev > > > > (Note that I deleted the 'test' file without effect.) > > Is there a journal that has not completed checkpointing yet? I would > see that with UFS under Solaris. Deletions would take a few seconds > (or minutes if the fuel was large or the FS very full) to be reported > by df. > > > du(1) still shows 2.2G: > > > > root@zhoernchen:~ # du -shx / > > 2.2G / > > > > When I now try to create files I get ENOSPC :( > > Are you dealing with lots of small files? Nope > I am no FreeBSD UFS expert, > but under Solaris, space was allocated in minimum block sizes (there > were blocks and frags, blocks were, by default 8KB and frags 1KB). So > if you had a 512B file it would take up 1KB. du would show 512B used > and df 1KB used. I do not know whether FreeBSD UFS has single or dual > (or more) allocation units or what size they are. But that is one of > the ways du and df differ. > > du shows the size of the file > > df shows the amount of space used in the filesystem I'm well aware of the difference between df(1) and du(1) but that's not the point here. As you might see the Kernel seems to be eating disk space and not releasing it aufter deletion of files, whatsoever. > -- > Paul Kraus > paul@kraus-haus.org > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > > -- Nils Effenberger Junior UNIX-Administration n@work Internet Informationssysteme GmbH Wandalenweg 5, 20097 Hamburg, http://www.work.de E-Mail: effenberger@work.de, Tel: +49 40 2388090 - Fax: +49 40 23880929 HR B 61 668 - Amtsgericht Hamburg, Geschaeftsfuehrer: Jan Diegelmann