quotas in jails

Valeri Galtsev galtsev at kicp.uchicago.edu
Tue Nov 12 20:48:27 UTC 2019



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
++++++++++++++++++++++++++++++++++++++++


More information about the freebsd-questions mailing list