From owner-freebsd-questions@FreeBSD.ORG Wed Jul 30 15:42:41 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 D3DA1E05 for ; Wed, 30 Jul 2014 15:42:41 +0000 (UTC) Received: from mail-qg0-f54.google.com (mail-qg0-f54.google.com [209.85.192.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 928F8205C for ; Wed, 30 Jul 2014 15:42:40 +0000 (UTC) Received: by mail-qg0-f54.google.com with SMTP id z60so1740147qgd.13 for ; Wed, 30 Jul 2014 08:42:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=wGrsChIxwFBgoB8iA3+XGjM2vbgsIC/DUjCIz1uktzI=; b=Rz/z9N4hAfejUgKEYqPTHDDgmiqiHNW1cn6LW9IRj7ujy6IbUX15UFfDrXI2uke35a VpB1e2IBmhyF/smlnBYS6A2/HK3POlAmqHwOG+4xHUdMqJb1MPEu0X0ywA/6b/SZKVdM FfboE5eZc7Qt0C/6c7ewsObCtvQ8SSMrCpH9UgJ3ytGNjHyIvsVnqGsOp6QJLdr73L+D HAX/xU7SWkxSM6lAB1SJWWSzpbzkiiYbU8eicioakSISBG4jay/FOqcO8dYklhiwS/mU k0Xdarx0W+fMOENhLuSWr1aKncHe6rFl9jHdziu4AL0HmoWL8ZDsKCf4uq32vkxUPP92 qq7w== X-Gm-Message-State: ALoCoQn3KJW7GdsvmbQD5gzXP+Tr6HQhWAgziHnFnSP8XWcZhdUBg/zqcRxBTOeQyqsjK9OJ/miT X-Received: by 10.224.223.199 with SMTP id il7mr8424315qab.10.1406734959627; Wed, 30 Jul 2014 08:42:39 -0700 (PDT) Received: from [192.168.2.65] ([96.236.21.80]) by mx.google.com with ESMTPSA id 33sm2883796qgj.11.2014.07.30.08.42.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Jul 2014 08:42:39 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: huge difference between du and df - no open file descriptors From: Paul Kraus In-Reply-To: <20140730173224.76007499@azubix.tec.work> Date: Wed, 30 Jul 2014 11:42:37 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20140730142609.1ac2bdc9@azubix.tec.work> <20140730173224.76007499@azubix.tec.work> To: freebsd-questions@freebsd.org X-Mailer: Apple Mail (2.1878.6) 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:42:42 -0000 On Jul 30, 2014, at 11:32, Nils Effenberger wrote: > root@zhoernchen:~ # dd if=3D/dev/zero of=3D/root/test bs=3D1024 = count=3D3500000 >=20 > /: 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 >=20 > (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: >=20 > root@zhoernchen:~ # du -shx / > 2.2G / >=20 > When I now try to create files I get ENOSPC :( Are you dealing with lots of small files? 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 -- Paul Kraus paul@kraus-haus.org