From owner-freebsd-stable@FreeBSD.ORG Wed Nov 14 00:13:52 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F2D7E16 for ; Wed, 14 Nov 2012 00:13:52 +0000 (UTC) (envelope-from takeda@chinatsu.takeda.tk) Received: from chinatsu.takeda.tk (mail.takeda.tk [74.0.89.210]) by mx1.freebsd.org (Postfix) with ESMTP id 236758FC13 for ; Wed, 14 Nov 2012 00:13:51 +0000 (UTC) Received: from chinatsu.takeda.tk (localhost.takeda.tk [127.0.0.1]) by chinatsu.takeda.tk (8.14.5/8.14.5) with ESMTP id qADNme1W061715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 13 Nov 2012 15:48:41 -0800 (PST) (envelope-from takeda@chinatsu.takeda.tk) Received: (from takeda@localhost) by chinatsu.takeda.tk (8.14.5/8.14.5/Submit) id qADNmc1w061714 for freebsd-stable@freebsd.org; Tue, 13 Nov 2012 15:48:38 -0800 (PST) (envelope-from takeda) Date: Tue, 13 Nov 2012 15:48:38 -0800 From: Derek Kulinski To: freebsd-stable@freebsd.org Subject: Problems with ZFS's user quota. Message-ID: <20121113234838.GA60930@chinatsu.takeda.tk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.6 at chinatsu.takeda.tk X-Virus-Status: Clean X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 00:13:52 -0000 Hi everyone, I'm having problem using user quotas in ZFS, I think something is broken, but it very possible that I'm just doing something wrong. I have two problems actually: 1. When trying to define quota for a filesystem that has sub filesystem the zfs userspace behaves weird: [chinatsu]:/tank/system# zfs userspace tank/system TYPE NAME USED QUOTA POSIX User root 9,16K none [chinatsu]:/tank/system# zfs set userquota@takeda=7G tank/system [chinatsu]:/tank/system# zfs userspace tank/system TYPE NAME USED QUOTA POSIX User root 9,16K none POSIX User takeda 7G [chinatsu]:/tank/system# zfs set userquota@takeda=1PB tank/system [chinatsu]:/tank/system# zfs userspace tank/system TYPE NAME USED QUOTA POSIX User root 9,16K none POSIX User takeda 1P [chinatsu]:/tank/system# zfs set userquota@takeda=none tank/system Is it possible to set quota that would also be inherited by subfilesystem? For example if I have 2 filesystems under tank/system I want them to share the quota, so when I set 7GB the total data use would be 7GB max (and not 7GB per filesystem) 2. Setting quota works fine on filesystem that has files by given users, but does not seem to be enforced (I enabled quota in the kenrel even though I don't belive it is ecessary). [chinatsu]:/tank/system# zfs userspace tank/system/home TYPE NAME USED QUOTA [...] POSIX User takeda 6,06G none [...] POSIX User www 1,34G none [chinatsu]:/tank/system# zfs set userquota@takeda=7G tank/system/home [chinatsu]:/tank/system# zfs userspace tank/system/home TYPE NAME USED QUOTA [...] POSIX User takeda 6,06G 7G [...] POSIX User www 1,34G none [chinatsu]:/tank/system# sudo su - takeda chinatsu :: ~ » dd if=/dev/zero of=bigfile bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes transferred in 7.882992 secs (136209934 bytes/sec) chinatsu :: ~ » [chinatsu]:/tank/system# zfs userspace tank/system/home TYPE NAME USED QUOTA [...] POSIX User takeda 7,06G 7G [...] POSIX User www 1,34G none [chinatsu]:/tank/system# It looks like ZFS does not allow me set quota in fractions (for example 6.5GB, but I guess that's not that big of a deal). Thank you, Derek