NFS Quota Commands

I'm running the /home dir over NFS and have had no luck finding the commands needed to keep quotas running. I am assuming some of the commands will need to be passwordless ssh? Any help would be great.

Thanks

Status: 
Closed (fixed)

Comments

I don't actually know of any solutions here, sorry. You might be able to change the quota commands to use SSH, at Webmin -> System -> Disk Quotas -> Module Config, but that would only work if the NFS server shares users and groups with the Virtualmin system. And even then I can't guarantee it would work..

I'm using LDAP configured through Webmin and the NFS server is a client of that so the users and groups are the same between the two. I read in a post that someone had posted the commands to do what I am trying to do, but have had no luck finding the post they are referring to. On the webmin site, It states that the quota module was updated to use external commands, but gives no examples how to do so. I see the some of the NFS commands offer a -r (remote) flag, but I can't find anything on that either.

I guess it would be possible to retrieve and set the limits via ssh, but I would have to know how webmin passes the variables to the command. For example, quota -u $USER_NAME or something

Thanks for the reply, if you come across something please let me know. If I get it working correctly I will post it here.

Would be nice if that information could just be set and retrieved via ldap. Then it wouldn't matter where the files where.

You probably don't want to use the external commands feature, as that was developed to support totally different quota systems, such as those used by ZFS.

Did you try changing the quota commands at Disk Quotas -> Module Config to use ssh? That may work .. for example, you could change the "Command to list users on a filesystem" to something like :

ssh root@fileserver repquota -u -v

This assumes that you have password-less SSH setup for root though.

Regarding LDAP, sadly that is not possible as quotas are stored in special files in the root of the filesystem, not in LDAP.

I believe that would work accept quotas have been disabled with the following message:

Quotas are not enabled on the filesystem /home which contains home directories under /home and email files under /home. Quota editing has been disabled.

Also, there seems to be another place to edit Quota commands: Virtualmin->System Settings->Module Config->Quota Commands

Here you can set to use external commands. I just came across this and will give it a try.

Thanks Again.

From Virtualmin->System Settings->Module Config->Quota Commands you can click the needed command for a list of vars that will be passed into a script. With that knowledge I created some quick php scripts to try it out. It works, but no where near as well as the standard quota system. I opted to just add physical drives for the time being.

Perhaps adding more documentation and examples would be a good thing for the future. It doesn't sound like an obscure setup; a server attached to an NFS share.

Thanks for your help with this. Great Product!