Supporting VxFS quotas over NFS?

contributed by Philip Kizer

Steve Barber  wrote:
>I'm new to quotas, including UFS quotas, so I'm not 100% sure
>how this normally works, much less how it should work with vxfs.
>
>Is there a way for users to check their quota status from an NFS
>client?

As the other responses mentioned, you cannot query vxfs quotas via rquotad,
that's why I wrote something for our users as having 50k+ users calling our
helpdesk when they couldn't write a file to see if they were over-quota was
not acceptable.

I'll let you decide how ugly it is, but here's what I came up with (those
who have been on the lists since before they moved will have seen this
before):

A modified 'quota' command that would call the normal UFS quota command,
and communicate via a custom protocol to the NFS server asking for VxFS
quotas.  There is a configuration file/link for each piece to point at the
vxrquotad server, and the server config file to say which hosts are allowed
to query and which users are trusted to perform the 'quota -v' equivalent.
A working ident on _trusted_ hosts is required.

To start this off, there's:

Server:

% grep vxrquota /etc/services
vxrquotad       8301/tcp
% grep vx /etc/inetd.conf
vxrquotad stream tcp    nowait  root    /usr/local/sbin/vxquotad vxquotad

% cat /etc/vxrquotad.conf
[priv_host]
localhost
nfs-server.site.loc
admin-wkstn.site.loc

[allow_host]
nfs-client.site.loc

[priv_user]
root
admin1
admin2


And, on the client:

% ls -l /etc/vxquota.conf
lrwxrwxrwx  1 root other  16 Jan  3 12:44 /etc/vxquota.conf -> nfs-svr.site.loc


The scripts follow.


-philip

-- 
Philip Kizer 
Texas A&M CIS Operating Systems Group, Unix


  1. vxquota program
  2. vxrquotad program