如何在客户端上设置 NFS 共享的配额或限制?

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

我是 运行 Debian GNU/Linux 7 VM

mount.nfs版本

mount.nfs: (linux nfs-utils 1.2.6)

我想在 NFS 挂载上设置配额。 NFS 服务器没有设置配额。我按照 this wiki

安装了 quota, quotatool

使用以下命令启用它

quotaon -avug

然后尝试使用配额选项挂载 nfs,但失败并出现以下错误

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

也尝试了 运行 quotaon

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

none 其中似乎有效。

是否可以在客户端为 NFS 共享设置配额?

据我所知必须在 NFS 服务器上设置配额,这就是 mount.nfs 无法识别 usrquota,grpquota 选项的原因。

另请参阅:https://serverfault.com/questions/644749/can-nfs-server-limit-the-amount-of-disk-space-that-the-nfs-client-can-use