|
| 1 | +--- |
| 2 | +title: Configure NFSv4.1 default domain for Azure NetApp Files | Microsoft Docs |
| 3 | +description: Describes how to configure the NFS client for using NFSv4.1 with Azure NetApp Files. |
| 4 | +documentationcenter: '' |
| 5 | +author: b-juche |
| 6 | +manager: '' |
| 7 | +editor: '' |
| 8 | + |
| 9 | +ms.assetid: |
| 10 | +ms.service: azure-netapp-files |
| 11 | +ms.workload: storage |
| 12 | +ms.tgt_pltfrm: na |
| 13 | +ms.devlang: na |
| 14 | +ms.topic: conceptual |
| 15 | +ms.date: 11/08/2019 |
| 16 | +ms.author: b-juche |
| 17 | +--- |
| 18 | +# Configure NFSv4.1 default domain for Azure NetApp Files |
| 19 | + |
| 20 | +NFSv4 introduces the concept of an authentication domain. Azure NetApp Files currently supports root-only user mapping from the service to the NFS client. To use the NFSv4.1 functionality with Azure NetApp Files, you need to update the NFS client. |
| 21 | + |
| 22 | +## Default behavior of user/group mapping |
| 23 | + |
| 24 | +Root mapping defaults to the `nobody` user because the NFSv4 domain is set to `localdomain`. When you mount an Azure NetApp Files NFSv4.1 volume as root, you will see file permissions as follows: |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +As the above example shows, the user for `file1` should be `root`, but it maps to `nobody` by default. This article shows you how to set the `file1` user to `root`. |
| 29 | + |
| 30 | +## Steps |
| 31 | + |
| 32 | +1. Edit the `/etc/idmapd.conf` file on the NFS client. |
| 33 | + Uncomment the line `#Domain` (that is, remove the `#` from the line), and change the value `localdomain` to `defaultv4iddomain.com`. |
| 34 | + |
| 35 | + Initial configuration: |
| 36 | + |
| 37 | +  |
| 38 | + |
| 39 | + Updated configuration: |
| 40 | + |
| 41 | +  |
| 42 | + |
| 43 | +2. Unmount any currently mounted NFS volumes. |
| 44 | +3. Update the `/etc/idmapd.conf` file. |
| 45 | +4. Restart the `rpcbind` service on your host (`service rpcbind restart`), or simply reboot the host. |
| 46 | +5. Mount the NFS volumes as required. |
| 47 | + |
| 48 | + See [Mount or unmount a volume for Windows or Linux virtual machines](azure-netapp-files-mount-unmount-volumes-for-virtual-machines.md). |
| 49 | + |
| 50 | +The following example shows the resulting user/group change: |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +As the example shows, the user/group has now changed from `nobody` to `root`. |
| 55 | + |
| 56 | +## Behavior of other (non-root) users and groups |
| 57 | + |
| 58 | +Azure NetApp Files supports local users (users created locally on a host) who have permissions associated with files or folders in NFSv4.1 volumes. However, the service does not currently support mapping the users/groups across multiple nodes. Therefore, users created on one host do not map by default to users created on another host. |
| 59 | + |
| 60 | +In the following example, `Host1` has three existing test user accounts (`testuser01`, `testuser02`, `testuser03`): |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +On `Host2`, note that the test user accounts have not been created, but the same volume is mounted on both hosts: |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +## Next step |
| 69 | + |
| 70 | +[Mount or unmount a volume for Windows or Linux virtual machines](azure-netapp-files-mount-unmount-volumes-for-virtual-machines.md) |
| 71 | + |
0 commit comments