Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2019 14:48:25 -0600
From:      Valeri Galtsev <galtsev@kicp.uchicago.edu>
To:        freebsd-questions@freebsd.org
Subject:   Re: quotas in jails
Message-ID:  <e81daaf0-d109-4470-f65a-670a407cdbd4@kicp.uchicago.edu>
In-Reply-To: <d83d30c2-79fa-3194-a039-0f9d09951609@kicp.uchicago.edu>
References:  <5DC48E00.30203@gmail.com> <c96a9d56-c9ba-e59b-563a-5d7c3c1d6d1e@kicp.uchicago.edu> <5DCAF630.3090302@gmail.com> <d83d30c2-79fa-3194-a039-0f9d09951609@kicp.uchicago.edu>

next in thread | previous in thread | raw e-mail | index | archive | help


On 2019-11-12 14:30, Valeri Galtsev wrote:
> 
> 
> On 2019-11-12 12:13, Ernie Luzar wrote:
>> Valeri Galtsev wrote:
>>>
>>>
>>> On 2019-11-07 15:34, Ernie Luzar wrote:
>>>> Has anyone been able to get quotas to work in multiple jails?
>>>
>>> I'm not certain I quite understand what you are asking.
>>>
>>> I'm successfully using UFS-2 filesystem quotas. In my case 
>>> filesystems with quotas set up as you usually would are mounted on 
>>> host system, and nullfs mounted beneath jail's root point (can be on 
>>> various levels).
>>>
>>> Valeri
>> Thank you for your reply Valeri. But I am having trouble comprehending 
>> what your words are saying as related to the system configuration files.
>>
>> I am working with RELEASE 12.0 and quotas is included in the delivered 
>> kernel so need to compile the quota option into the kernel.
> 
> Example:
> 
> In /etc/fstab I have
> 
> /dev/da0p6   /path/to/data ufs     rw,userquota     2       2
> /path/to/data   /jails/jail1/insidejail/data   nullfs  rw  0  0
> 
> # execute
> 
> mount -a
> 
> # set quotas for some user:
> 
> edquota -u -e /home:100G:110G:1000000:1100000 prototypeuser

# correction:

edquota -u -e /path/to/data:100G:110G:1000000:1100000 prototypeuser

> 
> # set quota for range of userids same as that of user: prototypeuser
> 
> edquota -u -e /path/to/data:100G:110G:1000000:1100000 prototypeuser
> 

# correction:

edquota -u -p prototypeuser 500-99999

> 
> You are done.
> 
> 
> Thanks.
> Valeri
> 
> 
>>
>> I used bsdinstall to install the system from scratch and selected to 
>> use the whole hard drive as a single partition. I manually added 
>> quota_enable="YES" to the rc.conf file and rebooted. In the boot 
>> messages I see message that quote started normally.
>>
>> My jail is a directory tree type at path /usr/jails/jailname and I can 
>> start and stop that jail using the jail command with no problems.
>>
>> My goal is for the jail users to issue the quota commands to check on 
>> how much space they have used of the allowed space.
>>
>> The man jail documentation says the path /usr/jails/jailname is called 
>> a filesystem. I this the same thing you are calling a filesystem?
>>
>> An excerpt of the configuration statements and the name of the files 
>> they go in would sure be helpful in understanding how you have your 
>> jail quota environment setup.
>>
>> Thanks in advance for any help.
> 

-- 
++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e81daaf0-d109-4470-f65a-670a407cdbd4>