Breaking NFS’ 16 group membership limit
The 16 group limit with auth_sys is not tuneable. It is defined in RFC_5331 and cannot be adjusted or patched.
However for linux running nfs-utils version over 1.0.12 and kernel version over 2.6.21, you can make rpc.mountd to manage gid to avoid this limitation.
To do this:
- On all your nfs server, edit /etc/nfs.conf, add two lines:
[mountd]
manage-gids=y
To be noted that the hint in nfs.conf is WRONG, which uses manage_gids instead of manage-gids.
Save nfs.conf. - Restart your nfs daemon by running
systemctl restart nfs - Reload your shares by running
exportfs -r - On your clients, run
mount -o remount <your_shares> - Log out and re-login your user, now the user is no longer limited by the 16 group membership limit.
- To verify, log in your NFS server, run
date +%s > /proc/net/rpc/auth.unix.gid/flush
cat /proc/net/rpc/auth.unix.gid/content
You will see things like
#uid cnt: gids…
0 9: 0 4 20 24 46 100 112 121 127
This means that the rpc.mountd is now managing the GIDs.