From owner-freebsd-questions@freebsd.org Tue Nov 12 20:30:39 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 024291B9DAA for ; Tue, 12 Nov 2019 20:30:39 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from kicp.uchicago.edu (kicp.uchicago.edu [128.135.20.70]) by mx1.freebsd.org (Postfix) with ESMTP id 47CKBP33pwz442x for ; Tue, 12 Nov 2019 20:30:37 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from point.uchicago.edu (point.uchicago.edu [128.135.52.6]) (Authenticated sender: galtsev) by kicp.uchicago.edu (Postfix) with ESMTPSA id 963D84E673; Tue, 12 Nov 2019 14:30:36 -0600 (CST) Subject: Re: quotas in jails To: Ernie Luzar Cc: freebsd-questions@freebsd.org References: <5DC48E00.30203@gmail.com> <5DCAF630.3090302@gmail.com> From: Valeri Galtsev Message-ID: Date: Tue, 12 Nov 2019 14:30:36 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <5DCAF630.3090302@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47CKBP33pwz442x X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=uchicago.edu (policy=none); spf=none (mx1.freebsd.org: domain of galtsev@kicp.uchicago.edu has no SPF policy when checking 128.135.20.70) smtp.mailfrom=galtsev@kicp.uchicago.edu X-Spamd-Result: default: False [-1.80 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[uchicago.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-0.97)[-0.969,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.06)[ip: (0.20), ipnet: 128.135.0.0/16(0.10), asn: 160(0.08), country: US(-0.05)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[70.20.135.128.list.dnswl.org : 127.0.10.0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:160, ipnet:128.135.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2019 20:30:39 -0000 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 # set quota for range of userids same as that of user: prototypeuser edquota -u -e /path/to/data:100G:110G:1000000:1100000 prototypeuser 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 ++++++++++++++++++++++++++++++++++++++++