From owner-freebsd-fs@FreeBSD.ORG Sat Nov 15 01:42:13 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56584106564A for ; Sat, 15 Nov 2008 01:42:13 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by mx1.freebsd.org (Postfix) with ESMTP id CF89D8FC13 for ; Sat, 15 Nov 2008 01:42:12 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id mAF1g3hA008647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 15 Nov 2008 12:42:05 +1100 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id mAF1g3uS052890; Sat, 15 Nov 2008 12:42:03 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id mAF1g3xr052889; Sat, 15 Nov 2008 12:42:03 +1100 (EST) (envelope-from peter) Date: Sat, 15 Nov 2008 12:42:03 +1100 From: Peter Jeremy To: Andrei Kolu Message-ID: <20081115014203.GE51761@server.vk2pj.dyndns.org> References: <491D5296.3000600@bsd.ee> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b5gNqxB1S1yM7hjW" Content-Disposition: inline In-Reply-To: <491D5296.3000600@bsd.ee> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-fs@freebsd.org Subject: Re: Filesystem size and free space X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 01:42:13 -0000 --b5gNqxB1S1yM7hjW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Nov-14 12:27:34 +0200, Andrei Kolu wrote: >due to migration from Windows Server 2003 NTFS filesystem to FreeBSD=20 >7.1Beta2 UFS+softupdates filesystem I encountered strange problem. NTFS=20 >formatted filesystem seen in FreeBSD as read-only and exactly 500GB with= =20 >28GB free space but after format to UFS disk shows up as 484GB and after= =20 >copying back files that was on same disk (from ntfs) UFS filesystem=20 >shows that I got -33GB (minus?) of free space. What's wrong? Is UFS so=20 >inefficient filesystem or it is a bug? Maybe your data is not a good match for the UFS2 defaults. In the case of UFS2, the size shown as x-Blocks reflects the size of the underlying media, less a free space allowance: 8% [not 10%] by default - see the -m option of tunefs for details of this and why it exists. Out of this, UFS2 allocates file and direcory data blocks, file metadata and filesystem metadata. By default, data blocks are 16KB with 2KB fragments. Each file or directory needs 256 bytes of metadata (its inode). I can't quickly find the size of the filesystem metadata but estimate it is <<1% of the filesystem size. You haven't said what sort of files you are storing but you might find the following suggestions useful: - As others have suggested, reducing minfree will help remove the negative free space. Be careful doing this unless your filesystem is write-once. - If you have a few very large files, rebuild the filesystem with fewer inodes (large '-i' parameter to newfs) and maybe a bigger blocksize. - If you have lots of small files, you might be better off with an 8K/1K filesystem and maybe even UFS1 (which has a smaller inode size). --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --b5gNqxB1S1yM7hjW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkeKOsACgkQ/opHv/APuIe0wACgje5nEyV1Pa6vBUCkK4hY9H8G Y34Aniir+owb+j5nro7ghHLQM6HTn1HY =O8Ys -----END PGP SIGNATURE----- --b5gNqxB1S1yM7hjW--