Breaking NFS’ 16 group membership limit

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

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:

  1. 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.
  2. Restart your nfs daemon by running
    systemctl restart nfs
  3. Reload your shares by running
    exportfs -r
  4. On your clients, run
    mount -o remount <your_shares>
  5. Log out and re-login your user, now the user is no longer limited by the 16 group membership limit.
  6. To verify, log in your NFS server, run
    date +%s &gt /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.

Be the first to comment!

Leave a Reply