nfsnfsclient

How to set quota or limits on NFS share on the client?


I am running Debian GNU/Linux 7 VM

mount.nfs version

mount.nfs: (linux nfs-utils 1.2.6)

I want to set quota on a NFS mount. The NFS server doesnt have quotas set. I installed quota, quotatool as per this wiki

enabled it using the below command

quotaon -avug

Then tried the nfs mount with quota option and it failed with the below error

mount -t nfs -o usrquota,grpquota nfs-server:/export/home/storage  /mnt/storage
mount.nfs: an incorrect mount option was specified

also tried running quotaon

quotaon /mnt/storage/
quotaon: Mountpoint (or device) /mnt/storage not found or has no quota enabled.

none of them seem to work.

Is it possible to set quota for NFS share on client side?


Solution

  • As far as I know the quota must be set on the NFS server, that's why mount.nfs does not recognize the usrquota,grpquota options.

    See also: https://serverfault.com/questions/644749/can-nfs-server-limit-the-amount-of-disk-space-that-the-nfs-client-can-use