再起動せずに/etc/idmapd.conf に NFSv4 ドメインを設定する方法
Environment
- Red Hat Enterprise Linux
- NFSv4
Issue
- NFSv4 マウントを正しく機能させるには、
/etc/idmapd.conf
ファイルで NFS ドメインを設定する必要があります。
Resolution
- NFS ドメインを /etc/idmapd.conf ファイルに追加した後、
nfsidmap -c
のコマンドを実行する必要があります。
次に、ファイルシステムをアンマウントして再マウントします。 - この問題は、カーネル内に古い ID マップがあるために発生します。
上記のコマンドを発行すると、ID マップの結果のキャッシュに使用されるキーリング内のキーがクリアされます。
Diagnostic Steps
[診断手順]
* 次の行を追加すると、
Domain = nfsdomain
- ファイルに所有者がいないことがわかります。
bash-4.2$ dd if=/dev/zero of=/mnt/test/myfile bs=1M count=10
bash-4.2$ ls -l /mnt/test/myfile
-rw-r--r--. 1 nobody 1200162317 10485760 Nov 10 09:21 /mnt/test/myfile
- このファイルは、ファイルを作成したユーザーではなく、所有者がいません。
- システムを再起動すると、以下のようになります。
bash-4.2$ dd if=/dev/zero of=/mnt/test/myfile2 bs=1M count=10
bash-4.2$ ls -l /mnt/test/myfile2
-rw-r--r--. 1 testuser 1200162317 10485760 Nov 10 09:11 /mnt/test/myfile2
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments