Date: Wed, 29 Sep 2010 11:12:05 +0200 From: =?ISO-8859-1?Q?Morgan_Wesstr=F6m?= <freebsd-questions@pp.dyndns.biz> To: Aaron <drizzt321@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Disappearing available space with ZFS...what am I missing? Message-ID: <4CA302E5.9050004@pp.dyndns.biz> In-Reply-To: <AANLkTinRWacA8%2BYjy91S_P==o2QZbc4nmqweXiEyHm9L@mail.gmail.com> References: <AANLkTinRWacA8%2BYjy91S_P==o2QZbc4nmqweXiEyHm9L@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CA302E5.9050004>