je tente d'accéder à un NAS synology en NFSv4.
Contenu du /etc/exports sur le NAS (autogénéré par le NAS)
Dans la config du NAS, j'ai activé NFSv4, et j'ai donné le nom de domaine homeNFS/volume1/Documents 192.168.0.46(rw,async,no_wdelay,crossmnt,insecure,no_root_squash,insecure,sec=sys,anonuid=1025,anongid=100)
Mon utilisateur sur le NAS est vincent (ID : 1026) qui fait parti du groupe users (ID : 100).
Sur mon poste archlinux, mon utilisateur est vincent (ID : 1000) dans le groupe users (ID : 100)
Les groupes ont donc les même ID, mais pas les utilisateurs.
Mon fstab contient la ligne :
et j'ai bien les droits sur le répertoire /mnt/NAS192.168.0.37:/volume1/Documents /mnt/NAS nfs defaults,user,auto,noatime,intr 0 0
ça, c'est pour la config.[vincent@PC-Fixe ~]$ ls -l /mnt/
total 4
drwxr-xr-x 24 vincent users 4096 20 juil. 16:42 NAS
j'arrive à monter le répertoire et accéder aux fichiers, mais le mapping des users "vincent" ne fonctionne pas, car je ne peux accéder qu'en lecture à la plupart des fichiers.
Exemple sur le NAS
Sur le post Arch, une fois le répertoire montéDS215J> pwd
/volume1/Documents
DS215J> mkdir testA
DS215J> ls -l | grep test
drwxr-xr-x 2 vincent users 4096 Aug 30 21:44 testA
En lisant le troubleshooting NFS (ici) et une page synology (ici), j'ai cru comprendre que la solution réside d'un un fichier idmapd.conf, dans lequel je dois renseigné le même domaine NFSv4.[vincent@PC-Fixe NAS]$ ls -l |grep test
drwxr-xr-x 2 vincent users 4096 30 août 21:44 testA
[vincent@PC-Fixe NAS]$ touch testA/foo
touch: impossible de faire un touch 'testA/foo': Permission non accordée
Contenu de /etc/idmapd.conf
Le wiki (anglais) recommande de vérifier si le service nfs-idmapd est bien démarré, et c'est là que ça se corsevincent@PC-Fixe NAS]$ cat /etc/idmapd.conf
[General]
Verbosity = 7
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = homeNFS
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
[Translation]
Method = umich_ldap,nsswitch
GSS-Methods = umich_ldap,static
et là, je ne sais pas quoi faire. Déjà, suis-je sur la bonne piste avec idmapd? où est-ce que je me plante?[vincent@PC-Fixe NAS]$ systemctl status nfs-idmapd.service
● nfs-idmapd.service - NFSv4 ID-name mapping service
Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static; vendor preset: disabled)
Active: inactive (dead)
[vincent@PC-Fixe NAS]$ su
[root@PC-Fixe NAS]# systemctl start nfs-idmapd.service
Job for nfs-idmapd.service failed because the control process exited with error code.
See "systemctl status nfs-idmapd.service" and "journalctl -xe" for details.
[root@PC-Fixe NAS]# systemctl status nfs-idmapd.service
● nfs-idmapd.service - NFSv4 ID-name mapping service
Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since mar. 2016-08-30 21:58:52 CEST; 12s ago
Process: 1988 ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS (code=exited, status=1/FAILURE)
août 30 21:58:52 PC-Fixe systemd[1]: Starting NFSv4 ID-name mapping service...
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: conf_parse: last line non-terminated, ignored.
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: conf_parse: last line non-terminated, ignored.
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: libnfsidmap: using domain: homeNFS
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: libnfsidmap: Realms list: 'HOMENFS'
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: libnfsidmap: loaded plugin /usr/lib/libnfsidmap/nsswitch.so for method nsswitch
août 30 21:58:52 PC-Fixe systemd[1]: nfs-idmapd.service: Control process exited, code=exited status=1
août 30 21:58:52 PC-Fixe systemd[1]: Failed to start NFSv4 ID-name mapping service.
août 30 21:58:52 PC-Fixe systemd[1]: nfs-idmapd.service: Unit entered failed state.
août 30 21:58:52 PC-Fixe systemd[1]: nfs-idmapd.service: Failed with result 'exit-code'.
[root@PC-Fixe NAS]# journalctl -xe
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: conf_parse: last line non-terminated, ignored.
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: conf_parse: last line non-terminated, ignored.
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: libnfsidmap: using domain: homeNFS
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: libnfsidmap: Realms list: 'HOMENFS'
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: rpc.idmapd: libnfsidmap: loaded plugin /usr/lib/libnfsidmap/nsswitch.so for method nsswitch
août 30 21:58:52 PC-Fixe systemd[1]: nfs-idmapd.service: Control process exited, code=exited status=1
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: libnfsidmap: using domain: homeNFS
août 30 21:58:52 PC-Fixe systemd[1]: Failed to start NFSv4 ID-name mapping service.
-- Subject: L'unité (unit) nfs-idmapd.service a échoué
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- L'unité (unit) nfs-idmapd.service a échoué, avec le résultat failed.
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: libnfsidmap: Realms list: 'HOMENFS'
août 30 21:58:52 PC-Fixe systemd[1]: nfs-idmapd.service: Unit entered failed state.
août 30 21:58:52 PC-Fixe rpc.idmapd[1988]: libnfsidmap: loaded plugin /usr/lib/libnfsidmap/nsswitch.so for method nsswitch
août 30 21:58:52 PC-Fixe systemd[1]: nfs-idmapd.service: Failed with result 'exit-code'.
août 30 21:58:52 PC-Fixe rpc.idmapd[1989]: Expiration time is 600 seconds.
août 30 21:58:52 PC-Fixe rpc.idmapd[1989]: Opened /proc/net/rpc/nfs4.nametoid/channel
août 30 21:58:52 PC-Fixe rpc.idmapd[1989]: Opened /proc/net/rpc/nfs4.idtoname/channel
août 30 21:58:52 PC-Fixe unknown[1989]:
août 30 21:58:52 PC-Fixe rpc.idmapd[1989]: New client: 0
août 30 21:58:52 PC-Fixe rpc.idmapd[1989]: New client: 1
août 30 21:58:52 PC-Fixe rpc.idmapd[1989]: Opened /var/lib/nfs/rpc_pipefs/nfs/clnt1/idmap
EDIT : j'ai avancé un peu, en modifiant ple idmapd.conf, pour changer la méthode de translation, et supprimer "umich_ldap", j'avais piqué ça quelque part sur le net sans savoir ce dont il s'agit.
Et maintenant :
le message suivant m'étonne[root@PC-Fixe systemd]# systemctl start nfs-idmapd.service
Job for nfs-idmapd.service failed because the control process exited with error code.
See "systemctl status nfs-idmapd.service" and "journalctl -xe" for details.
[root@PC-Fixe systemd]# systemctl status nfs-idmapd.service
● nfs-idmapd.service - NFSv4 ID-name mapping service
Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since mar. 2016-08-30 22:21:39 CEST; 3s ago
Process: 3196 ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS (code=exited, status=1/FAILURE)
août 30 22:21:39 PC-Fixe rpc.idmapd[3196]: rpc.idmapd: libnfsidmap: using domain: homeNFS
août 30 22:21:39 PC-Fixe rpc.idmapd[3196]: rpc.idmapd: libnfsidmap: Realms list: 'HOMENFS'
août 30 22:21:39 PC-Fixe rpc.idmapd[3196]: rpc.idmapd: libnfsidmap: processing 'Method' list
août 30 22:21:39 PC-Fixe rpc.idmapd[3196]: rpc.idmapd: libnfsidmap: Unable to load plugin: /usr/lib/libnfsidmap/dap.so: cannot open shared object file:
août 30 22:21:39 PC-Fixe rpc.idmapd[3196]: rpc.idmapd: libnfsidmap: requested translation method, 'dap', is not available
août 30 22:21:39 PC-Fixe rpc.idmapd[3196]: rpc.idmapd: Unable to create name to user id mappings.
août 30 22:21:39 PC-Fixe systemd[1]: nfs-idmapd.service: Control process exited, code=exited status=1
août 30 22:21:39 PC-Fixe systemd[1]: Failed to start NFSv4 ID-name mapping service.
août 30 22:21:39 PC-Fixe systemd[1]: nfs-idmapd.service: Unit entered failed state.
août 30 22:21:39 PC-Fixe systemd[1]: nfs-idmapd.service: Failed with result 'exit-code'
je ne pige pas grand chose à ces méthodes de translationaoût 30 22:21:39 PC-Fixe rpc.idmapd[3196]: rpc.idmapd: libnfsidmap: Unable to load plugin: /usr/lib/libnfsidmap/dap.so: cannot open shared object file:
août 30 22:21:39 PC-Fixe rpc.idmapd[3196]: rpc.idmapd: libnfsidmap: requested translation method, 'dap', is not available
Merci à vous.
Vincent