Date: Wed, 30 Jul 2014 11:42:37 -0400 From: Paul Kraus <paul@kraus-haus.org> To: freebsd-questions@freebsd.org Subject: Re: huge difference between du and df - no open file descriptors Message-ID: <E616FBD7-64A4-4A2C-BC49-7E6254A32368@kraus-haus.org> In-Reply-To: <20140730173224.76007499@azubix.tec.work> References: <20140730142609.1ac2bdc9@azubix.tec.work> <20140730173224.76007499@azubix.tec.work>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 30, 2014, at 11:32, Nils Effenberger <effenberger@work.de> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E616FBD7-64A4-4A2C-BC49-7E6254A32368>