[Bug 976632] Re: nfs4 mounts are not mapping userids, uses nobody/nogroup

TJ ubuntu at iam.tj
Wed Jan 30 23:13:18 UTC 2013


Experienced the same issue here and found a solution:

Server A: 12.04.1, 3.2.0-34-generic, NFSv4 exports to sub-net
Client B: 12.04.2, 3.6.0-030600rc4-generic
Client C: 12.04.2, 3.6.0-030600-generic

All systems have the same user accounts with identical IDs.

Client B would see the correct file ownership:

$ ls -al /home/all/Library/
total 40
drwxrwxr-x 10 tj users 4096 Jan 22 13:33 .
drwxrwxr-x  9 tj     users 4096 Sep 19 14:59 ..
drwxrwxr-x  8 tj users 4096 Mar  8  2012 Backup
drwxrwxr-x  7 tj users 4096 Nov 22 22:40 BLOB
drwxrwxr-x  3 tj users 4096 Jan 22 14:29 Downloads
drwxrwxr-x 10 tj users 4096 Sep 29 20:56 iso-image
drwxrwxr-x 12 tj users 4096 Jul 24  2012 Media
drwxrwxr-x  5 tj users 4096 Jan 26 15:10 Projects
drwxrwxr-x 16 tj users 4096 Jan 30 22:35 SourceCode
drwxrwxr-x  3 tj users 4096 Aug 18 07:49 VirtualMachines

Client C would not:

$ ls -al /home/all/Library/
total 40
drwxrwxr-x 10 nobody users 4096 Jan 22 13:33 .
drwxrwxr-x  9 tj     users 4096 Sep 19 14:59 ..
drwxrwxr-x  8 nobody users 4096 Mar  8  2012 Backup
drwxrwxr-x  7 nobody users 4096 Nov 22 22:40 BLOB
drwxrwxr-x  3 nobody users 4096 Jan 22 14:29 Downloads
drwxrwxr-x 10 nobody users 4096 Sep 29 20:56 iso-image
drwxrwxr-x 12 nobody users 4096 Jul 24  2012 Media
drwxrwxr-x  5 nobody users 4096 Jan 26 15:10 Projects
drwxrwxr-x 16 nobody users 4096 Jan 30 22:35 SourceCode
drwxrwxr-x  3 nobody users 4096 Aug 18 07:49 VirtualMachines

Server A has several LVs that are rbind-mounted to the NFS root via
/etc/fstab:

/home/all/Library /srv/Library none defaults,rbind,noauto 0 0

and exported:

/srv         			10.254.0.0/16(rw,sync,no_subtree_check,crossmnt,fsid=0)
/srv/Library 			10.254.0.0/16(rw,sync,no_subtree_check,crossmnt)
/srv/Library/Backup 		10.254.0.0/16(rw,sync,no_subtree_check)
/srv/Library/BLOB		10.254.0.0/16(rw,sync,no_subtree_check)
/srv/Library/Media		10.254.0.0/16(rw,sync,no_subtree_check,crossmnt)
/srv/Library/iso-image		10.254.0.0/16(rw,sync,no_subtree_check)
/srv/Library/VirtualMachines	10.254.0.0/16(rw,sync,no_subtree_check)
/srv/Library/SourceCode		10.254.0.0/16(rw,sync,no_subtree_check)
/srv/Library/Projects           10.254.0.0/16(rw,sync,no_subtree_check)

Clients B and C have identical /etc/fstab entries:

10.254.251.1:/Library /home/all/Library nfs4 _netdev,auto,exec 0 0

and /etc/idmapd.conf:

[General]
Verbosity = 0
Pipefs-Directory = /run/rpc_pipefs
Domain = lan.eddie.tj
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup

Server A has the same idmapd.conf with the addition of:

[Translation]
Method = nsswitch

I found the solution here was to add the [Translation] stanza to client
C's configuration (and restart the idmapd service).

I don't understand why client B can correctly translate the user IDs
without having the [Translation] stanza, though.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/976632

Title:
  nfs4 mounts are not mapping userids, uses nobody/nogroup

Status in “util-linux” package in Ubuntu:
  Confirmed

Bug description:
  I have:
  machine A - NFS4 server, Ubuntu 11.10
  machine B - NFS4 client, Ubuntu 11.10
  machine C - NFS4 client, Ubuntu 12.04 (development)

  All machines have the same userids and group ids.

  Machine 4 exports are the following:

  /export/dir1  10.0.0.0/24(rw,nohide,insecure,no_subtree_check,async)
  /export/dir2 10.0.0.0/24(rw,nohide,insecure,no_subtree_check,async)
  /export/dir3        10.0.0.0/24(rw,nohide,insecure,no_subtree_check,async)

  On both Machine B and C, the mounts are defined in fstab as:

  10.0.0.1:/dir1        /mnt/mydir      nfs4    _netdev,soft,retry=2,auto    0       0
  10.0.0.1:/dir2       /mnt/mydir2     nfs4    _netdev,soft,retry=2,auto    0       0
  10.0.0.1:/dir3      /mnt/startrek   nfs4    _netdev,soft,retry=2,auto    0       0

  These NFS shares have been configured for about 6 months, no change to
  the configuration.

  However, on the newly upgraded machine C, when the NFS4 filesystems
  are mounted, *all files* (with different users on machine A) map to
  nobody/nogroup. I even tried changing some options on machine A (like
  adding no_all_squash then re-exporting it) to no avail. I also tried
  manually mounting the filesystems using the "mount" command on machine
  C and the same thing happened. Before upgrading, the mounts were
  working correctly. On machine B with Ubuntu 11.10, they also work
  correctly.

  mount is version 2.20.1-1ubuntu3, nfs-common (which has
  /sbin/mount.nfs4) is version 1:1.2.5-3ubuntu2.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: mount 2.20.1-1ubuntu3
  ProcVersionSignature: Ubuntu 3.2.0-22.35-generic 3.2.14
  Uname: Linux 3.2.0-22-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.0-0ubuntu4
  Architecture: amd64
  Date: Sun Apr  8 11:55:58 2012
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426)
  SourcePackage: util-linux
  UpgradeStatus: Upgraded to precise on 2012-04-06 (2 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/976632/+subscriptions




More information about the foundations-bugs mailing list