From owner-freebsd-questions@FreeBSD.ORG Wed Jul 30 12:26:12 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0C03471 for ; Wed, 30 Jul 2014 12:26:12 +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 B553B265C for ; Wed, 30 Jul 2014 12:26:12 +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 1XCSxO-0001gC-Cb for freebsd-questions@freebsd.org; Wed, 30 Jul 2014 14:26:10 +0200 Received: from [10.10.2.123] (helo=azubix.tec.work) by work.de with esmtp (Exim 4.69) (envelope-from ) id 1XCSxT-0001vF-5a for freebsd-questions@freebsd.org; Wed, 30 Jul 2014 14:26:15 +0200 Date: Wed, 30 Jul 2014 14:26:09 +0200 From: Nils Effenberger To: freebsd-questions@freebsd.org Subject: huge difference between du and df - no open file descriptors Message-ID: <20140730142609.1ac2bdc9@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: Wed, 30 Jul 2014 12:26:13 -0000 Hi there, du and df are showing signifcantly different values on our storage system: [root@zhoernchen ~]# df -h / Filesystem Size Used Avail Capacity Mounted on /dev/mirror/root 4.8G 4.1G 336M 93% / [root@zhoernchen ~]# du -shx / 2.3G / root@zhoernchen:~ # gpart show => 34 97696301 ada0 GPT (47G) 34 128 1 freebsd-boot (64K) 162 10485760 2 freebsd-ufs (5.0G) 10485922 10485760 3 freebsd-zfs (5.0G) 20971682 76724653 4 freebsd-zfs (37G) => 34 97696301 ada1 GPT (47G) 34 128 1 freebsd-boot (64K) 162 10485760 2 freebsd-ufs (5.0G) 10485922 10485760 3 freebsd-zfs (5.0G) 20971682 76724653 4 freebsd-zfs (37G) (The zfs partitions are zil and l2arc of the zpool on HDDs) My first thought was that this was due to open file descriptors but I could'nt find anything relevant with fstat. To be absolutely shure I rebooted (fortunately the system isn't productive yet) but that didn't help either. To enshure that I was using fstat correctly (I'm not that familiar with FreeBSD) I created a file of ~350MB, opened it with less, deleted it while opened, was able to find it with fstat, closed less and found the system in following state: root@zhoernchen:~ # du -shx / 2.2G / root@zhoernchen:~ # df -h / Filesystem Size Used Avail Capacity Mounted on /dev/mirror/root 4.8G 4.5G -13M 100% / Could someone explain this and how I get that fixed? Thanks in advance, Nils -- 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