From owner-freebsd-current Thu Apr 10 02:36:05 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id CAA25978 for current-outgoing; Thu, 10 Apr 1997 02:36:05 -0700 (PDT) Received: from charm.il.ft.hse.nl (erik@charm.il.ft.hse.nl [145.85.127.2]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA25973 for ; Thu, 10 Apr 1997 02:36:01 -0700 (PDT) Received: (from erik@localhost) by charm.il.ft.hse.nl (8.8.5/8.7.3) id LAA06963; Thu, 10 Apr 1997 11:35:48 +0200 (CEST) From: Erik Manders Message-Id: <199704100935.LAA06963@charm.il.ft.hse.nl> Subject: Re: NFS + Quotas in current In-Reply-To: from James FitzGibbon at "Apr 9, 97 05:22:23 pm" To: james@nexis.net (James FitzGibbon) Date: Thu, 10 Apr 1997 11:35:48 +0200 (MEST) Cc: freebsd-current@freebsd.org X-Location: Somewhere in The Netherlands X-Mailer: ELM [version 2.4ME+ PL27 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk James FitzGibbon is said to have made the following statement: > > James FitzGibbon is said to have made the following statement: > > > > > > Is support for quotas over NFS new in 3.0-current ? I can do it > > > on one of my machines (which is 2.2, upgraded to -current, and > > > has had world made on it in the last two weeks), but it doesn't > > > work with a 2.2.1R machine or a 3.0-970209-SNAP machine freshly > > > installed (having recompiled the kernel with "options QUOTA"). > > > > > > If it is new in the last two months, how stable is it ? I'd > > > appreciate thoughts on the doability of it being merged into > > > RELENG_2_2, or if a diff applied to the /src/sys/nfs tree would be > > > even feasible. > > > > > > Thanks. > > > > > > -- > > > j. > > > On Wed, 9 Apr 1997, Erik Manders wrote: > > > Well, I have got it to work, mostly. The only thing I haven't gotten > > to work yet is the ability to set quotas over the net. This will > > require kernel hacking Quotas seems to be stable to the extent that > > you can export a filesystem with quotas and have the server enforce > > them. It is even possble to have quota(1) report quota and limit > > data to a remote user, but only if the quota file is in the mounted > > filesystem and rpc.rquotad is running on the fileserver. > > This is with a 2.2.x client ? When I try to mount with quotas : > > [nebula:james] ~ (66) # mount -t nfs -o rw,noatime,userquota,-b > nexis.net:/usr/home /mnt > > I get this: > > nfs: -o userquota: option not supported > This is true, sort of. Mount_nfs doesn't support the userquota option. I'm running a slightly patched 2.2.1-RELEASE and my setup is as follows: Server /etc/exports: /var/mail -maproot=root:wheel nfscharm nfstop Server /etc/fstab: /dev/sd1a /var/mail ufs rw,userquota=/usr/quotas/mail.user 1 2 Client /etc/fstab: nfs:/var/mail /var/mail nfs rw,intr 0 0 Both machines have quota code enabled in the kernel, but only the server has check_quotas=YES in /etc/sysconfig. In addition, the server runs rpc.rquotad. I added it to /etc/rc.local, but you can have inetd run it. You basically let the fileserver enforce quotas and tell the clients when limits have been reached. rpc.rquotad runs to let quota(1) work. Quota(1) is NFS-aware and will automatically ask the server's rpc.rquotad for quota information on any NFS filesystems it encounters. However, remember that the 2.2.1-RELEASE rpc.rquotad will only work if the quotafiles are on their relevant filesystems (see my last post for a fix). Also keep in mind that edquota(8) and friends will only work on the fileserver since quotactl(2) hasn't been implemented for NFS. Sample output from quota(1): Disk quotas for user erik (uid 100): Filesystem blocks quota limit grace files quota limit grace /var/mail 88 1024 2048 1 0 0 Something on this subject should be put into the FAQ or the handbook. Hope this helps, Erik Manders erik@il.ft.hse.nl -- It is by caffeine alone that I set my mind in motion; it is by the cans of cola that the thoughts acquire speed, hands acquire shaking, the shaking becomes a warning; it is with caffeine alone that I set my mind in motion. --from the movie `Dune', edited