From owner-freebsd-questions@FreeBSD.ORG Wed Jul 30 15:32:28 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 0B19DAB6 for ; Wed, 30 Jul 2014 15:32:28 +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 C36F32F14 for ; Wed, 30 Jul 2014 15:32:27 +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 1XCVrd-0007jj-5M for freebsd-questions@freebsd.org; Wed, 30 Jul 2014 17:32:25 +0200 Received: from [10.10.2.123] (helo=azubix.tec.work) by work.de with esmtp (Exim 4.69) (envelope-from ) id 1XCVri-0002ZH-1S for freebsd-questions@freebsd.org; Wed, 30 Jul 2014 17:32:30 +0200 Date: Wed, 30 Jul 2014 17:32:24 +0200 From: Nils Effenberger To: freebsd-questions@freebsd.org Subject: Re: huge difference between du and df - no open file descriptors Message-ID: <20140730173224.76007499@azubix.tec.work> In-Reply-To: <20140730142609.1ac2bdc9@azubix.tec.work> References: <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 15:32:28 -0000 > One other way of using up space in a partition without it showing up > in du(1) is to have files hidden underneath the mount points for other > filesystems. So you've got a 5GB UFS partition and a ZFS pool > somewhere -- if you have (say) a file /mnt/big-file on the root and > then you mount another filesystem (eg. ZFS) on top of /mnt you'll > hide that file from du(1), but it will still be using space on the > root partition and show up in df(1) output. > > The only way to find this sort of thing is to unmount those other > filesystems and look at what exists under the mount point. > > You can also use up space invisibly by creating snapshots -- see > mksnap_ffs(8) and snapinfo(8). > > Cheers, > > Matthew Thank you for your answer Matthew. Strangely enough I didn't receive the mail, I found it in the archives. Anyway... I unmounted the zpool (the only thing that was mounted except the root partition) to make sure I've nothing mounted on top of something, which brought me to this state: root@zhoernchen:~ # zfs unmount /zpool0 root@zhoernchen:~ # mount /dev/mirror/root on / (ufs, local) devfs on /dev (devfs, local, multilabel) root@zhoernchen:~ # df -h Filesystem Size Used Avail Capacity Mounted on /dev/mirror/root 4.8G 4.5G -15M 100% / devfs 1.0K 1.0K 0B 100% /dev root@zhoernchen:~ # du -shx / 2.2G / I don't have noch snapshots either: root@zhoernchen:~ # snapinfo / root@zhoernchen:~ # snapinfo -a root@zhoernchen:~ # Then I tried to create another (big) file which lead to the following: 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.) du(1) still shows 2.2G: root@zhoernchen:~ # du -shx / 2.2G / When I now try to create files I get ENOSPC :( Regards, 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