From owner-freebsd-questions@FreeBSD.ORG Wed Sep 29 09:12:09 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 C598E1065675 for ; Wed, 29 Sep 2010 09:12:09 +0000 (UTC) (envelope-from freebsd-questions@pp.dyndns.biz) Received: from smtprelay-h32.telenor.se (smtprelay-h32.telenor.se [213.150.131.5]) by mx1.freebsd.org (Postfix) with ESMTP id 4D5B38FC18 for ; Wed, 29 Sep 2010 09:12:09 +0000 (UTC) Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h32.telenor.se (Postfix) with ESMTP id A1472E8739 for ; Wed, 29 Sep 2010 11:12:07 +0200 (CEST) X-SENDER-IP: [85.226.59.55] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aiw8APufokxV4js3PGdsb2JhbACHb5orDAEBAQE1LcdUhUQEjTk X-IronPort-AV: E=Sophos;i="4.57,252,1283724000"; d="scan'208";a="136323387" Received: from c-373be255.107-1-64736c10.cust.bredbandsbolaget.se (HELO gatekeeper.pp.dyndns.biz) ([85.226.59.55]) by ipb1.telenor.se with ESMTP; 29 Sep 2010 11:12:07 +0200 Received: from [192.168.69.67] (phobos [192.168.69.67]) by gatekeeper.pp.dyndns.biz (8.14.4/8.14.4) with ESMTP id o8T9C5Bi075349; Wed, 29 Sep 2010 11:12:06 +0200 (CEST) (envelope-from freebsd-questions@pp.dyndns.biz) Message-ID: <4CA302E5.9050004@pp.dyndns.biz> Date: Wed, 29 Sep 2010 11:12:05 +0200 From: =?ISO-8859-1?Q?Morgan_Wesstr=F6m?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100910 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: Aaron References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org 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 09:12:09 -0000 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 equals 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 drives 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 space is used for parity data. So a filesystem using the whole pool will report having 3.7 * 0.75 = 2.7TiB available which is in agreement with your numbers. A raidz filesystem will always lose 1 disk worth of space and will never report that space as available to you since it will always be occupied 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 what'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 since 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