From owner-freebsd-fs@FreeBSD.ORG Fri Jun 25 23:17:12 2010 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 C76F4106575B for ; Fri, 25 Jun 2010 23:17:12 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5818FC1A for ; Fri, 25 Jun 2010 23:17:11 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c211-30-160-13.belrs4.nsw.optusnet.com.au [211.30.160.13]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o5PNH90V002065 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 26 Jun 2010 09:17:10 +1000 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.4/8.14.4) with ESMTP id o5PNH8O2037205 for ; Sat, 26 Jun 2010 09:17:08 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id o5PNH8jD037204 for freebsd-fs@freebsd.org; Sat, 26 Jun 2010 09:17:08 +1000 (EST) (envelope-from peter) Date: Sat, 26 Jun 2010 09:17:08 +1000 From: Peter Jeremy To: freebsd-fs@freebsd.org Message-ID: <20100625231708.GB29793@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) Subject: mdconfig on ZFS leaks disk 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: Fri, 25 Jun 2010 23:17:12 -0000 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I recently did a quick experiment to create an 8TB UFS filesystem via mdconfig and after destroying the md and deleting the file, the disk space used by the md was not returned - even after a reboot. Has anyone else seen this? I was using a 8.1-prelease/amd64 with everything on ZFS v14 and did: # truncate -s 8T /tmp/space # mdconfig -a -t vnode -f /tmp/space # newfs /dev/md0 /dev/md0: 8388608.0MB (17179869184 sectors) block size 16384, fragment size= 2048 using 45661 cylinder groups of 183.72MB, 11758 blks, 23552 inodes. This occupied ~450MB on /tmp which uses lzjb compression. # fsck -t ufs /dev/md0 needed ~550MB VSZ and had ~530MB resident by the end. # mount /dev/md0 /mnt # df -k /mnt /dev/md0 8319620678 4 7654051020 0% 2 1075407868 0% /mnt I then copied a random collection of files into /mnt, boosting the size of /tmp/space to ~880MB. # umount /mnt # fsck -t ufs /dev/md0 # mdconfig -d -u 0 # rm /tmp/space At this point, 'df' on /tmp reported 881MB used whilst 'du' on /tmp report 1MB used. lsof showed no references to the space. Whilst there were snapshots of /tmp, none had been taken since /tmp/space was created. I deleted them anyway to no effect. Rebooting the system had no effect. I eventually recovered the space by doing a "zfs destroy zroot/tmp" and re-creating it. This showed the in the pool increased by exactly the amount of extraneous space. --=20 Peter Jeremy --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkwlOPQACgkQ/opHv/APuIeDpQCgk13kJD/l+/lr2Xj5naz1Pv0l sMAAn1rZQJU12px54f9uvLEFpUpouvsZ =ETd9 -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--