From sacadmin Tue Sep 25 09:42:45 2007
Received: from sfbaymail2sca.sfbay.sun.com (sfbaymail2sca [129.145.155.42])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l8PGgjOQ007712
	for <psarc-record@sac.sfbay.sun.com>; Tue, 25 Sep 2007 09:42:45 -0700 (PDT)
Received: from sca-es-mail-2.sun.com (sca-es-mail-2.Sun.COM [192.18.43.133])
	by sfbaymail2sca.sfbay.sun.com (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id l8PGdgB8002060
	for <psarc-record@sac.sfbay.sun.com>; Tue, 25 Sep 2007 09:39:42 -0700 (PDT)
Received: from fe-sfbay-10.sun.com ([192.18.43.129])
	by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l8PGdbxc024739
	for <psarc-record@sac.sfbay.sun.com>; Tue, 25 Sep 2007 09:39:37 -0700 (PDT)
Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JOX00E01N9GMG00@fe-sfbay-10.sun.com>
 (original mail from John.Plocher@Sun.COM) for psarc-record@sac.sfbay.sun.com;
 Tue, 25 Sep 2007 09:39:37 -0700 (PDT)
Received: from wp668.sfbay.sun.com ([129.146.58.87])
 by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb
 28 2007)) with ESMTPSA id <0JOX00EOENM0VTC0@fe-sfbay-10.sun.com> for
 psarc-record@sac.sfbay.sun.com; Tue, 25 Sep 2007 09:39:37 -0700 (PDT)
Date: Tue, 25 Sep 2007 09:39:32 -0700
From: John Plocher <John.Plocher@Sun.COM>
Subject: [Fwd: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack
 timeout 10/03/2007]]
Sender: John.Plocher@Sun.COM
To: psarc-record@sac.sfbay.sun.com
Message-id: <46F939C4.6020207@Sun.Com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728)
Status: RO
Content-Length: 4058



-------- Original Message --------
Subject: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack timeout 10/03/2007]
Date: Tue, 25 Sep 2007 10:35:34 -0600 (MDT)
From: Mark Maybee <maybee@moosylvania.central.sun.com>
To: PSARC-ext@sun.com
CC: zfs-eng@sun.com


Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
This information is Copyright 2007 Sun Microsystems
1. Introduction
     1.1. Project/Component Working Name:
	 zfs fs-only quotas and reservations
     1.2. Name of Document Author/Supplier:
	 Author:  Chris Kirby
     1.3  Date of This Document:
	25 September, 2007
4. Technical Description

This case adds two new properties to ZFS. The stability of the properties
is committed, and the release binding is patch/micro.

SUMMARY:

         This proposal is to provide ZFS with filesystem-only
         quotas and reservations.

PROBLEM:

         Quotas and reservations in ZFS currently include the space
         consumed by snapshots. While this model works well for
         users who administer their own storage pools (and for users
         with delegated administration rights), it is non-intuitive
         for certain classes of users.

         For example, in a university setting, an admin might be taking
         snapshots without the knowledge of the end user.  This can
         result in a situation where a user is at his or her quota
         limit, removes some files that happen to be part of a snapshot,
         and is then confused about why there is still no space available
         for writing.

PROPOSED SOLUTION:

         The proposed solution is as follows:

         1) Create two new ZFS properties: "refquota" and "refreserv".
            These will apply to the number of bytes in the "referenced"
            dataset property. The existing "quota" and "reservation"
            properties will continue to apply to the "used" property.

            Note that "referenced" quotas and reservations are
            independent from their "used" counterparts.  The values
            of both "refquota" and "quota" will be tested in over-quota
            checks.  The value of "refreserv" is a guarantee of a
            minimum amount of space without including snapshots, while
            "reservation" continues to include snapshots in its
            minimum guarantee.

         2) Update the man page for zfs to include the new properties.

ISSUES:
         none

MANPAGE CHANGES:

System Administration Commands                          zfs(1M)

[...]

   Native Properties

[...]

+    refquota=size | none
+
+     Limits the amount of space a dataset can consume. This property
+     enforces a hard limit on the amount of space used. This does
+     not include space used by descendents, including file systems
+     and snapshots.

[...]

+    refreserv=size | none
+
+     The minimum amount of space guaranteed to a dataset, not including
+     its descendents. When the amount of space used is below this value,
+     the dataset is treated as if it were taking up the amount of space
+     specified by refreserv.  The refreserv reservation is accounted
+     for in the parent datasets' space used, and counts against the
+     parent datasets' quotas and reservations.
+
+     If refreserv is set, a snapshot will only be allowed if there is
+     enough free pool space outside of this reservation to accommodate the
+     current number of "referenced" bytes in the dataset.

     Example 7 Listing ZFS Properties
[...]

     # zfs get -o property,value,source all pool/home/bob

           PROPERTY       VALUE                      SOURCE
[...]
           aclinherit     secure                     default
           xattr          on                         default
           refquota       10M                        local
           refreserv      none                       default

6. Resources and Schedule
     6.4. Steering Committee requested information
    	6.4.1. Consolidation C-team Name:
		ON
     6.5. ARC review type: FastTrack
     6.6. ARC Exposure: open


From Darren.Moffat@sun.com Wed Sep 26 02:50:49 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l8Q9omi1001492
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 26 Sep 2007 02:50:48 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l8Q9lfVS006603;
	Wed, 26 Sep 2007 10:47:45 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JOY00N03Z7J4P00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 26 Sep 2007 02:47:43 -0700 (PDT)
Received: from gmp-eb-mail-1.sun.com ([192.18.6.21])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JOY008YOZ7IRBB0@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 26 Sep 2007 02:47:43 -0700 (PDT)
Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12])
	by gmp-eb-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l8Q9lfw9012885;
 Wed, 26 Sep 2007 09:47:41 +0000 (GMT)
Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JOY00601YJYG300@fe-emea-10.sun.com>
 (original mail from Darren.Moffat@Sun.COM); Wed,
 26 Sep 2007 10:47:41 +0100 (BST)
Received: from [192.168.112.53] (85-18-54-179.ip.fastwebnet.it [85.18.54.179])
 by fe-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <0JOY0031PZ7B4Q10@fe-emea-10.sun.com>; Wed,
 26 Sep 2007 10:47:36 +0100 (BST)
Date: Wed, 26 Sep 2007 10:47:35 +0100
From: Darren J Moffat <Darren.Moffat@sun.com>
Subject: Re: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack
 timeout 10/03/2007]
In-reply-to: <200709251635.l8PGZY8j010934@moosylvania.Central.Sun.COM>
Sender: Darren.Moffat@sun.com
To: Mark Maybee <maybee@moosylvania.central.sun.com>
Cc: PSARC-ext@sun.com, zfs-eng@sun.com
Message-id: <46FA2AB7.9090709@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200709251635.l8PGZY8j010934@moosylvania.Central.Sun.COM>
User-Agent: Thunderbird 2.0.0.4 (X11/20070723)
Status: RO
Content-Length: 1070

Mark Maybee wrote:
> +    refreserv=size | none

Do you really need to abbreviate this, I had to read this three times 
before I could work out what it was (I kept thinking serve what ?). 
Maybe "refreserved" instead (ie create not creat :-)).

I'm also having a hard time working out what the interaction between the 
existing "quota" and "reserveration" properties are and these ones.  I 
don't think the text in the man page is sufficient to allow people to 
work out what combinations of quota/refquota they need to set.   Maybe 
some more examples would help.

Is there a case where you would want to set both quota and refquota ? 
If not would it make sense to have a "quotatype" property instead that 
determined if the quota included snapshots and descendents.

I know that "referenced" is the correct ZFS term but I'm not sure it is 
a term that users/admins can easily relate to.  I can't at the moment 
come up with a better naming scheme though - so unless anyone else can 
I'm okay for this case to be approved with the current naming.

-- 
Darren J Moffat

From chris.kirby@sun.com Wed Sep 26 06:22:27 2007
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l8QDMRFE005162
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 26 Sep 2007 06:22:27 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l8QDJPAV014396;
	Wed, 26 Sep 2007 06:19:25 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JOZ00E0B90BSN00@nwk-avmta-2.sfbay.sun.com>; Wed,
 26 Sep 2007 06:19:23 -0700 (PDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JOZ001S190AL4A0@nwk-avmta-2.sfbay.sun.com>; Wed,
 26 Sep 2007 06:19:23 -0700 (PDT)
Received: from fe-amer-10.sun.com ([192.18.109.80])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l8QDJMN0016551; Wed,
 26 Sep 2007 13:19:22 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JOZ00C018YN7O00@mail-amer.sun.com>
 (original mail from chris.kirby@sun.com); Wed, 26 Sep 2007 07:19:22 -0600 (MDT)
Received: from [192.168.1.100] ([129.150.35.231])
 by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28
 2007)) with ESMTPSA id <0JOZ0070L902XQ30@mail-amer.sun.com>; Wed,
 26 Sep 2007 07:19:15 -0600 (MDT)
Date: Wed, 26 Sep 2007 08:19:13 -0500
From: Chris Kirby <chris.kirby@sun.com>
Subject: Re: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack
 timeout 10/03/2007]
In-reply-to: <46FA2AB7.9090709@Sun.COM>
Sender: Christopher.Kirby@sun.com
To: Darren J Moffat <Darren.Moffat@sun.com>
Cc: Mark Maybee <maybee@moosylvania.central.sun.com>, PSARC-ext@sun.com,
        zfs-eng@sun.com
Message-id: <46FA5C51.6010308@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
X-PMX-Version: 5.2.0.264296
References: <200709251635.l8PGZY8j010934@moosylvania.Central.Sun.COM>
 <46FA2AB7.9090709@Sun.COM>
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
Status: RO
Content-Length: 1745

Darren J Moffat wrote:
> Mark Maybee wrote:
> 
>> +    refreserv=size | none
> 
> 
> Do you really need to abbreviate this, I had to read this three times 
> before I could work out what it was (I kept thinking serve what ?). 
> Maybe "refreserved" instead (ie create not creat :-)).

How about "refreservation", which matches the current "reservation"
property and the "refquota"/"quota" scheme?


> 
> I'm also having a hard time working out what the interaction between the 
> existing "quota" and "reserveration" properties are and these ones.  I 
> don't think the text in the man page is sufficient to allow people to 
> work out what combinations of quota/refquota they need to set.   Maybe 
> some more examples would help.
> 
> Is there a case where you would want to set both quota and refquota ? If 
> not would it make sense to have a "quotatype" property instead that 
> determined if the quota included snapshots and descendents.

Setting both quota and refquota would be useful in a university
environment, where refquota is what limits a user's active dataset,
and the (presumably larger) quota limits the dataset+snapshots.

One way to think of this is that quota/reservation are for sysadmins
and refquota/refreservation are for end users.


> 
> I know that "referenced" is the correct ZFS term but I'm not sure it is 
> a term that users/admins can easily relate to.  I can't at the moment 
> come up with a better naming scheme though - so unless anyone else can 
> I'm okay for this case to be approved with the current naming.
> 

We wanted to link the naming to the "referenced" property, since
that's what shows up in "zfs list" and "zfs get" output, and
the byte count comparisions are done against that value.

-Chris

From Darren.Moffat@sun.com Wed Sep 26 06:38:46 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l8QDcjnm005643
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 26 Sep 2007 06:38:46 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l8QDZVZ6002168;
	Wed, 26 Sep 2007 14:35:42 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JOZ00M3K9RHDS00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 26 Sep 2007 06:35:41 -0700 (PDT)
Received: from gmp-eb-mail-2.sun.com ([192.18.6.24])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JOZ00KAG9RFX680@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 26 Sep 2007 06:35:40 -0700 (PDT)
Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe2.eu.sun.com [192.18.6.11])
	by gmp-eb-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l8QDZdv9010857;
 Wed, 26 Sep 2007 13:35:39 +0000 (GMT)
Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JOZ009019IDJE00@fe-emea-10.sun.com>
 (original mail from Darren.Moffat@Sun.COM); Wed,
 26 Sep 2007 14:35:38 +0100 (BST)
Received: from [192.168.112.53] (85-18-54-179.ip.fastwebnet.it [85.18.54.179])
 by fe-emea-10.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <0JOZ0030J9R54Q20@fe-emea-10.sun.com>; Wed,
 26 Sep 2007 14:35:30 +0100 (BST)
Date: Wed, 26 Sep 2007 14:35:29 +0100
From: Darren J Moffat <Darren.Moffat@sun.com>
Subject: Re: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack
 timeout 10/03/2007]
In-reply-to: <46FA5C51.6010308@sun.com>
Sender: Darren.Moffat@sun.com
To: Chris Kirby <chris.kirby@sun.com>
Cc: Mark Maybee <maybee@moosylvania.central.sun.com>, PSARC-ext@sun.com,
        zfs-eng@sun.com
Message-id: <46FA6021.3070205@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200709251635.l8PGZY8j010934@moosylvania.Central.Sun.COM>
 <46FA2AB7.9090709@Sun.COM> <46FA5C51.6010308@sun.com>
User-Agent: Thunderbird 2.0.0.4 (X11/20070723)
Status: RO
Content-Length: 1950

Chris Kirby wrote:
> Darren J Moffat wrote:
>> Mark Maybee wrote:
>>
>>> +    refreserv=size | none
>>
>>
>> Do you really need to abbreviate this, I had to read this three times 
>> before I could work out what it was (I kept thinking serve what ?). 
>> Maybe "refreserved" instead (ie create not creat :-)).
> 
> How about "refreservation", which matches the current "reservation"
> property and the "refquota"/"quota" scheme?

Seems fine to me.

> 
>>
>> I'm also having a hard time working out what the interaction between 
>> the existing "quota" and "reserveration" properties are and these 
>> ones.  I don't think the text in the man page is sufficient to allow 
>> people to work out what combinations of quota/refquota they need to 
>> set.   Maybe some more examples would help.
>>
>> Is there a case where you would want to set both quota and refquota ? 
>> If not would it make sense to have a "quotatype" property instead that 
>> determined if the quota included snapshots and descendents.
> 
> Setting both quota and refquota would be useful in a university
> environment, where refquota is what limits a user's active dataset,
> and the (presumably larger) quota limits the dataset+snapshots.
> 
> One way to think of this is that quota/reservation are for sysadmins
> and refquota/refreservation are for end users.

Could you provide an example please.

Is it an error to set refquota higher than quota ?

>> I know that "referenced" is the correct ZFS term but I'm not sure it 
>> is a term that users/admins can easily relate to.  I can't at the 
>> moment come up with a better naming scheme though - so unless anyone 
>> else can I'm okay for this case to be approved with the current naming.
>>
> 
> We wanted to link the naming to the "referenced" property, since
> that's what shows up in "zfs list" and "zfs get" output, and
> the byte count comparisions are done against that value.

Okay fair enough.

-- 
Darren J Moffat

From chris.kirby@Sun.COM Wed Sep 26 07:21:19 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l8QELIdb007333
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 26 Sep 2007 07:21:18 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l8QEI86M023957;
	Wed, 26 Sep 2007 22:18:14 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JOZ00305BQD4A00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 26 Sep 2007 07:18:13 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JOZ001OJBQCJW20@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 26 Sep 2007 07:18:12 -0700 (PDT)
Received: from fe-amer-09.sun.com ([192.18.109.79])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l8QEICp0006941; Wed,
 26 Sep 2007 14:18:12 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JOZ00F01BLLVZ00@mail-amer.sun.com>
 (original mail from chris.kirby@sun.com); Wed, 26 Sep 2007 08:18:12 -0600 (MDT)
Received: from [192.168.1.100] ([129.150.35.231])
 by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28
 2007)) with ESMTPSA id <0JOZ00KZ3BQ9OS30@mail-amer.sun.com>; Wed,
 26 Sep 2007 08:18:10 -0600 (MDT)
Date: Wed, 26 Sep 2007 09:18:09 -0500
From: Chris Kirby <chris.kirby@Sun.COM>
Subject: Re: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack
 timeout 10/03/2007]
In-reply-to: <46FA6021.3070205@Sun.COM>
Sender: Christopher.Kirby@Sun.COM
To: Darren J Moffat <Darren.Moffat@Sun.COM>
Cc: Mark Maybee <maybee@moosylvania.central.sun.com>, PSARC-ext@Sun.COM,
        zfs-eng@Sun.COM
Message-id: <46FA6A21.9080207@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
X-PMX-Version: 5.2.0.264296
References: <200709251635.l8PGZY8j010934@moosylvania.Central.Sun.COM>
 <46FA2AB7.9090709@Sun.COM> <46FA5C51.6010308@sun.com>
 <46FA6021.3070205@Sun.COM>
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
Status: RO
Content-Length: 936

Darren J Moffat wrote:
> Chris Kirby wrote:

>> Setting both quota and refquota would be useful in a university
>> environment, where refquota is what limits a user's active dataset,
>> and the (presumably larger) quota limits the dataset+snapshots.
>>
>> One way to think of this is that quota/reservation are for sysadmins
>> and refquota/refreservation are for end users.
> 
> 
> Could you provide an example please.

Sure (and I'll add something more detailed to the man page):

# zfs create tank/fs1
# zfs set quota=30m tank/fs1
# zfs set refquota=10m tank/fs1

Now there's room for the sysadmin to take a couple of
snapshots, and the user can hit the refquota and remove
files even if there is a snapshot.

> 
> Is it an error to set refquota higher than quota ?

Not really, but the over-quota check would never fail
against refquota since we'd hit quota first.  Perhaps
I should add a note to the Best Practices Guide.

-Chris


From eschrock@zion.sfbay.sun.com Wed Sep 26 08:49:01 2007
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l8QFn0Dk010139
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 26 Sep 2007 08:49:01 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l8QFjgSC000886;
	Wed, 26 Sep 2007 16:45:56 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JOZ00A11FRZBT00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 26 Sep 2007 08:45:35 -0700 (PDT)
Received: from zion.sfbay.sun.com ([129.146.17.75])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JOZ001G4FRYJXE0@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 26 Sep 2007 08:45:34 -0700 (PDT)
Received: from zion.sfbay.sun.com (localhost [127.0.0.1])
	by zion.sfbay.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l8QFjYIV182667; Wed,
 26 Sep 2007 15:45:34 +0000 (GMT)
Received: (from eschrock@localhost)
	by zion.sfbay.sun.com (8.14.1+Sun/8.14.1/Submit) id l8QFjYs1182666; Wed,
 26 Sep 2007 08:45:34 -0700 (PDT)
Date: Wed, 26 Sep 2007 08:45:34 -0700
From: Eric Schrock <eric.schrock@sun.com>
Subject: Re: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack
 timeout 10/03/2007]
In-reply-to: <46FA5C51.6010308@sun.com>
To: Chris Kirby <chris.kirby@sun.com>
Cc: Darren J Moffat <Darren.Moffat@sun.com>,
        Mark Maybee <maybee@moosylvania.central.sun.com>, PSARC-ext@sun.com,
        zfs-eng@sun.com
Message-id: <20070926154534.GA182533@eng.sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.2.0.264296
References: <200709251635.l8PGZY8j010934@moosylvania.Central.Sun.COM>
 <46FA2AB7.9090709@Sun.COM> <46FA5C51.6010308@sun.com>
User-Agent: Mutt/1.4.2.1i
Status: RO
Content-Length: 879

On Wed, Sep 26, 2007 at 08:19:13AM -0500, Chris Kirby wrote:
> Darren J Moffat wrote:
> >Mark Maybee wrote:
> >
> >>+    refreserv=size | none
> >
> >
> >Do you really need to abbreviate this, I had to read this three times 
> >before I could work out what it was (I kept thinking serve what ?). 
> >Maybe "refreserved" instead (ie create not creat :-)).
> 
> How about "refreservation", which matches the current "reservation"
> property and the "refquota"/"quota" scheme?
> 

Note that we already allow abbreviations in property names, by allowing
the canonical name or the 'zfs list' column name.  For example, 'zfs
list -o referenced,refer' will print two identical columns of output.
We can have 'refreservation' as the full name, but use 'refres' or
'refreserv' as the column header.

- Eric

--
Eric Schrock, Solaris Kernel Development       http://blogs.sun.com/eschrock

From Darren.Moffat@Sun.COM Wed Sep 26 09:06:35 2007
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l8QG6Z1O011122
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 26 Sep 2007 09:06:35 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id l8QG3Vmk004655;
	Wed, 26 Sep 2007 09:03:32 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JOZ00L0DGLWZ200@nwk-avmta-2.sfbay.sun.com>; Wed,
 26 Sep 2007 09:03:32 -0700 (PDT)
Received: from gmp-eb-mail-2.sun.com ([192.18.6.24])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JOZ00JMPGLU9250@nwk-avmta-2.sfbay.sun.com>; Wed,
 26 Sep 2007 09:03:31 -0700 (PDT)
Received: from fe-emea-09.sun.com (gmp-eb-lb-2-fe1.eu.sun.com [192.18.6.10])
	by gmp-eb-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id l8QG3Uir000398;
 Wed, 26 Sep 2007 16:03:30 +0000 (GMT)
Received: from conversion-daemon.fe-emea-09.sun.com by fe-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JOZ00G01GDRTU00@fe-emea-09.sun.com>
 (original mail from Darren.Moffat@Sun.COM); Wed,
 26 Sep 2007 17:03:30 +0100 (BST)
Received: from [192.168.112.53] (85-18-54-179.ip.fastwebnet.it [85.18.54.179])
 by fe-emea-09.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <0JOZ00LTKGLRX720@fe-emea-09.sun.com>; Wed,
 26 Sep 2007 17:03:28 +0100 (BST)
Date: Wed, 26 Sep 2007 17:03:27 +0100
From: Darren J Moffat <Darren.Moffat@Sun.COM>
Subject: Re: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack
 timeout 10/03/2007]
In-reply-to: <20070926154534.GA182533@eng.sun.com>
Sender: Darren.Moffat@Sun.COM
To: Eric Schrock <Eric.Schrock@Sun.COM>
Cc: Chris Kirby <chris.kirby@Sun.COM>,
        Mark Maybee <maybee@moosylvania.central.sun.com>, PSARC-ext@Sun.COM,
        zfs-eng@Sun.COM
Message-id: <46FA82CF.70605@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.2.0.264296
References: <200709251635.l8PGZY8j010934@moosylvania.Central.Sun.COM>
 <46FA2AB7.9090709@Sun.COM> <46FA5C51.6010308@sun.com>
 <20070926154534.GA182533@eng.sun.com>
User-Agent: Thunderbird 2.0.0.4 (X11/20070723)
Status: RO
Content-Length: 866

Eric Schrock wrote:
> On Wed, Sep 26, 2007 at 08:19:13AM -0500, Chris Kirby wrote:
>> Darren J Moffat wrote:
>>> Mark Maybee wrote:
>>>
>>>> +    refreserv=size | none
>>>
>>> Do you really need to abbreviate this, I had to read this three times 
>>> before I could work out what it was (I kept thinking serve what ?). 
>>> Maybe "refreserved" instead (ie create not creat :-)).
>> How about "refreservation", which matches the current "reservation"
>> property and the "refquota"/"quota" scheme?
>>
> 
> Note that we already allow abbreviations in property names, by allowing
> the canonical name or the 'zfs list' column name.  For example, 'zfs
> list -o referenced,refer' will print two identical columns of output.
> We can have 'refreservation' as the full name, but use 'refres' or
> 'refreserv' as the column header.

That sounds great.

-- 
Darren J Moffat

From chris.kirby@sun.com Wed Oct  3 10:24:29 2007
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l93HORHE002543
	for <psarc-ext@sac.sfbay.Sun.COM>; Wed, 3 Oct 2007 10:24:28 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id l93HLFuI028142;
	Thu, 4 Oct 2007 01:21:17 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0JPC00B0NIVG2700@brm-avmta-1.central.sun.com>; Wed,
 03 Oct 2007 11:21:16 -0600 (MDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0JPC0014FIVFB370@brm-avmta-1.central.sun.com>; Wed,
 03 Oct 2007 11:21:15 -0600 (MDT)
Received: from fe-amer-10.sun.com ([192.18.109.80])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l93HLFQq014074; Wed,
 03 Oct 2007 17:21:15 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 id <0JPC00801HRNUH00@mail-amer.sun.com>
 (original mail from chris.kirby@sun.com); Wed, 03 Oct 2007 11:21:15 -0600 (MDT)
Received: from [129.147.50.88] by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007))
 with ESMTPSA id <0JPC00AUMIVCFU70@mail-amer.sun.com>; Wed,
 03 Oct 2007 11:21:12 -0600 (MDT)
Date: Wed, 03 Oct 2007 12:21:16 -0500
From: Chris Kirby <chris.kirby@sun.com>
Subject: Re: zfs fs-only quotas and reservations [PSARC/2007/555 FastTrack
 timeout 10/03/2007]
In-reply-to: <46FA6021.3070205@Sun.COM>
Sender: Christopher.Kirby@sun.com
To: Darren J Moffat <Darren.Moffat@sun.com>
Cc: Mark Maybee <maybee@moosylvania.central.sun.com>, PSARC-EXT@sun.com,
        zfs-eng@sun.com
Message-id: <4703CF8C.40502@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
X-PMX-Version: 5.2.0.264296
References: <200709251635.l8PGZY8j010934@moosylvania.Central.Sun.COM>
 <46FA2AB7.9090709@Sun.COM> <46FA5C51.6010308@sun.com>
 <46FA6021.3070205@Sun.COM>
User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)
Status: RO
Content-Length: 614

Darren J Moffat wrote:
> Chris Kirby wrote:
> 
>> Darren J Moffat wrote:
>>
>>> Mark Maybee wrote:
>>>
>>>> +    refreserv=size | none
>>>
>>>
>>>
>>> Do you really need to abbreviate this, I had to read this three times 
>>> before I could work out what it was (I kept thinking serve what ?). 
>>> Maybe "refreserved" instead (ie create not creat :-)).
>>
>>
>> How about "refreservation", which matches the current "reservation"
>> property and the "refquota"/"quota" scheme?
> 
> 
> Seems fine to me.

And just for clarification to the ARC, the new property names
are "refreservation" and ""refquota".

-Chris


