From owner-freebsd-questions@FreeBSD.ORG Wed Sep 29 17:09:04 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 957B41065672 for ; Wed, 29 Sep 2010 17:09:04 +0000 (UTC) (envelope-from drizzt321@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4E8678FC22 for ; Wed, 29 Sep 2010 17:09:04 +0000 (UTC) Received: by qwd6 with SMTP id 6so730371qwd.13 for ; Wed, 29 Sep 2010 10:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=0XHepxNKLVZrhsz0aM6oG5N7bZD9EoREUxgacoI/VEQ=; b=PxG2o2vZk4Ps+URE+Ppx7x2zi2GCB0LdZciLV7SjjcEuzK79dKpmMttr13A+zGixxP ffZw8Fb3UbrJWWUgeVPxnDuVtvOFyx3ESFYbz6Uf0NKGCRx1yfI7Eo7ZQecmS9j1nt69 N7k+vjztpov+1VJlNzp9ff5oW0vaoOUZx4jy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=tPgPSe+c20iMzh/y8cm+sibQDPZ+FVabcqG8+72HYpW5ZW/549j+a4Btaq7NpU9S3J dYFDN+GrqoL987k8E5cEOBrFQdsAynvU2wJsvSMvgYfnFe3aNDCqFUDk/fOBUjE7ZdK9 KKn6avsQ9EVvk+8ZwLeocVI7Ve/GEo1ik6B68= Received: by 10.224.82.203 with SMTP id c11mr1327382qal.299.1285780142722; Wed, 29 Sep 2010 10:09:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.236.85 with HTTP; Wed, 29 Sep 2010 10:02:43 -0700 (PDT) In-Reply-To: References: <4CA302E5.9050004@pp.dyndns.biz> From: Aaron Date: Wed, 29 Sep 2010 10:02:43 -0700 Message-ID: To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: Disappearing available space with ZFS...what am I missing? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 17:09:04 -0000 On Wed, Sep 29, 2010 at 03:14, krad wrote: > > > On 29 September 2010 10:12, Morgan Wesstr=F6m > wrote: >> >> On 2010-09-29 07:56, Aaron wrote: >>> >>> I've created a ZFS pool with zpool create tank raidz ada0 ada1 ada2 >>> ada3, and then I add some additional mountpoints (I think they're >>> called) using zfs create tank/storage, etc. In zpool list, I see the >>> pool with 3.62T available. With df -h, I see 2.4T available for tank, >>> and tank/storage. When I first created tank, it had the 3.62T >>> available as I expected. What am I missing? I do have compression set >>> to gzip-9 on tank which gets inherited like I want, don't know if that >>> would affect anything. >>> >>> --Aaron >> >> There's nothing wrong here that I can see, you just have to make a >> distinction between the zfs pool and the filesystems within the pool and= I >> agree it can be confusing at first. >> >> The numbers suggest you are using 4 x 1TB (base 10 TB) drives? That equa= ls >> 3.7TiB (base 2 TB) which is the unit zpool/zfs uses. This is the total >> amount of space available to the pool and includes all space on all driv= es >> in the pool. Nothing strange so far. >> >> Now, since you've told zpool to create filesystems within the pool using >> raidz, the filesystems will have 25% less space available since this spa= ce >> is used for parity data. So a filesystem using the whole pool will repor= t >> having 3.7 * 0.75 =3D 2.7TiB available which is in agreement with your >> numbers. A raidz filesystem will always lose 1 disk worth of space and w= ill >> never report that space as available to you since it will always be occu= pied >> with parity data. >> >> The pool on the other hand doesn't make a distinction, in this case >> anyway, between user data and parity data so zpool will always report wh= at's >> actually unallocated on all your physical drives in the pool. For every = GiB >> you allocate in the filesystem you will allocate 1.33GiB in the pool sin= ce >> that includes parity data. "zfs list" and "df -h" are your best friends = to >> find out how much space is available for your files. Don't bother about >> "zpool list". >> >> Regards >> Morgan >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to >> "freebsd-questions-unsubscribe@freebsd.org" > > > It gets even more hairy when you start adding in reservsions, quotas, and > compression. Slap dedup on top of that and you get magically growing fs > according to df 8) > > Ahhh...yea. Thanks everyone! I didn't realize that zpool status would show the raw space (so 4x1TB base10 is ~3.7TB base2), and not the available space after the 4-1 RAIDZ usage consumes. So that all makes sense, as well as with reservations, quotas and compression now causing df to not really know what's going on. If I want to get the actual values of available space vs used space, I should use zfs get all and look at the properties there? --Aaron