From owner-freebsd-questions@FreeBSD.ORG Tue Mar 16 16:18:26 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EBD916A4CE for ; Tue, 16 Mar 2004 16:18:26 -0800 (PST) Received: from relay2.sitel.com.ua (houp.sitel.com.ua [217.27.144.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6C7443D1F for ; Tue, 16 Mar 2004 16:18:25 -0800 (PST) (envelope-from mirya@ukrpost.net) Received: by relay2.sitel.com.ua (Postfix, from userid 84) id D641E4582E; Wed, 17 Mar 2004 02:18:17 +0200 (EET) Received: from dialup-148.62.sitel.com.ua (dialup-148.62.sitel.com.ua [217.27.148.62]) by relay2.sitel.com.ua (Postfix) with ESMTP id 8556345828 for ; Wed, 17 Mar 2004 02:18:15 +0200 (EET) From: Kyryll A Mirnenko To: freebsd-questions@freebsd.org Date: Tue, 16 Mar 2004 02:31:11 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200403130111.24664.mirya@ukrpost.net> Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit Subject: Why does `df` lie about free space X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2004 00:18:26 -0000 That's an old problem, but yesterday I was working with 1.4G UFS2-slice reported by `df` to have 400kb of free space. Alternative calculations (e.g. writing a random file until kernel says no inode's free) give a result of more that 100M (!) unused. Thats about 7% of the whole size! That could a harmless bug, but some applications (PostgreSQL is!) uses statfs to get free space info. Posetgres dies saying can't write his *.pid cause FS is full (but it has 100M inodes free)... So whats wrong with `df` (e.g. statfs/fstatfs)?