I followed an article from DigitalOcean to mount a directory from my backup machine (192.168.100.82
) on my service machine (192.168.100.81
):
mount -vvv 192.168.100.82:/var/nfs/general /nfs/general
But it fails with the following log:
mount.nfs: timeout set for Tue Nov 15 13:17:28 2022
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.100.82,clientaddr=192.168.100.81'
mount.nfs: mount(2): Operation not permitted
mount.nfs: trying text-based options 'addr=192.168.100.82'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.100.82 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.100.82 prog 100005 vers 3 prot UDP port 20048
mount.nfs: mount(2): Stale file handle
mount.nfs: Operation not permitted
Doing chmod 777 /var/nfs/general
, unmounting (with -f
and -l
options), using fsid=0
in export configuration, restarting nfs-client.target
on the service machine, restarting nfs-server.service
and nfs-mountd.service
on the backup machine didn't work.
OS on both machines is Centos 8 and I'm doing all this as root
user.
Here is additional information:
The export configuration from /etc/exports
:
/var/nfs/general 192.168.100.81(rw,sync,no_root_squash,no_subtree_check)
Related logs from /var/log/messages
on the backup machine:
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_exchange_id rqstp=00000000f62bc763 exid=00000000da7bb5db clname.len=18 clname.data=000000005dd36ddb ip_addr=192.168.100.82 flags 101, spa_how 0
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df923)
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_exchange_id seqid 0 flags 20001
Nov 15 13:20:57 Lin-Backup kernel: nfsv4 compound returned 0
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_exchange_id rqstp=00000000f62bc763 exid=00000000da7bb5db clname.len=18 clname.data=000000005dd36ddb ip_addr=192.168.100.82 flags 101, spa_how 0
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_exchange_id seqid 0 flags 20001
Nov 15 13:20:57 Lin-Backup kernel: nfsv4 compound returned 0
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: check_slot_seqid enter. seqid 1 slot_seqid 0
Nov 15 13:20:57 Lin-Backup kernel: NFSD: move_to_confirm nfs4_client 0000000022350332
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: nfsv4 compound returned 0
Nov 15 13:20:57 Lin-Backup kernel: __find_in_sessionid_hashtbl: 1668500682:3273521444:2662:0
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_sequence: slotid 0
Nov 15 13:20:57 Lin-Backup kernel: check_slot_seqid enter. seqid 1 slot_seqid 0
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: cmd: create
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: arg: 4c696e7578204e465376342e3220636f7265
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: env0: NFSDCLTRACK_CLIENT_HAS_SESSION=Y
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: env1: NFSDCLTRACK_GRACE_START=1668500682
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: /sbin/nfsdcltrack return value: 0
Nov 15 13:20:57 Lin-Backup kernel: nfsv4 compound returned 0
Nov 15 13:20:57 Lin-Backup kernel: --> nfsd4_store_cache_entry slot 0000000066b2707e
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: __find_in_sessionid_hashtbl: 1668500682:3273521444:2662:0
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_sequence: slotid 0
Nov 15 13:20:57 Lin-Backup kernel: check_slot_seqid enter. seqid 2 slot_seqid 1
Nov 15 13:20:57 Lin-Backup kernel: nfsv4 compound returned 0
Nov 15 13:20:57 Lin-Backup kernel: --> nfsd4_store_cache_entry slot 0000000066b2707e
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: __find_in_sessionid_hashtbl: 1668500682:3273521444:2662:0
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_sequence: slotid 0
Nov 15 13:20:57 Lin-Backup kernel: check_slot_seqid enter. seqid 3 slot_seqid 2
Nov 15 13:20:57 Lin-Backup kernel: nfsv4 compound returned 1
Nov 15 13:20:57 Lin-Backup kernel: --> nfsd4_store_cache_entry slot 0000000066b2707e
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_destroy_session: 1668500682:3273521444:2662:0
Nov 15 13:20:57 Lin-Backup kernel: __find_in_sessionid_hashtbl: 1668500682:3273521444:2662:0
Nov 15 13:20:57 Lin-Backup kernel: NFSD: warning: no callback path to client Linux NFSv4.2 core: error -22
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: nfsv4 compound returned 0
Nov 15 13:20:57 Lin-Backup kernel: renewing client (clientid 63734cca/c31df924)
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: cmd: remove
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: arg: 4c696e7578204e465376342e3220636f7265
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: env0: (null)
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: env1: (null)
Nov 15 13:20:57 Lin-Backup kernel: nfsd4_umh_cltrack_upcall: /sbin/nfsdcltrack return value: 0
Nov 15 13:20:57 Lin-Backup kernel: nfsv4 compound returned 0
Nov 15 13:20:57 Lin-Backup rpc.mountd[3298271]: authenticated mount request from 192.168.100.81:1018 for /var/nfs/general (/var/nfs/general)
Nov 15 13:20:57 Lin-Backup kernel: nfsd: FSINFO(3) 28: 00070001 0607e3c0 00000000 038c7eae 044b2ce4 ac3b53ab
Nov 15 13:20:57 Lin-Backup kernel: nfsd: FSINFO(3) 28: 00070001 0607e3c0 00000000 038c7eae 044b2ce4 ac3b53ab
Related logs from /var/log/messages
on the service machine:
Nov 15 13:22:59 Lin-Service kernel: --> nfs4_proc_create_session clp=000000003ff426d5 session=00000000cda333b9
Nov 15 13:22:59 Lin-Service kernel: nfs4_init_channel_attrs: Fore Channel : max_rqst_sz=1049620 max_resp_sz=1049480 max_ops=8 max_reqs=64
Nov 15 13:22:59 Lin-Service kernel: nfs4_init_channel_attrs: Back Channel : max_rqst_sz=4096 max_resp_sz=4096 max_resp_sz_cached=0 max_ops=2 max_reqs=16
Nov 15 13:22:59 Lin-Service kernel: slot table setup returned 0
Nov 15 13:22:59 Lin-Service kernel: nfs4_proc_create_session client>seqid 2 sessionid 1668500682:3273521446:2663:0
Nov 15 13:22:59 Lin-Service kernel: <-- nfs4_proc_create_session
Nov 15 13:22:59 Lin-Service kernel: --> nfs41_proc_reclaim_complete
Nov 15 13:22:59 Lin-Service kernel: --> _nfs41_proc_secinfo_no_name
Nov 15 13:22:59 Lin-Service kernel: --> nfs41_call_sync_prepare data->seq_server 00000000a5776490
Nov 15 13:22:59 Lin-Service kernel: --> nfs4_reclaim_complete_done
Nov 15 13:22:59 Lin-Service kernel: nfs41_sequence_process: Error 0 free the slot
Nov 15 13:22:59 Lin-Service kernel: <-- nfs4_reclaim_complete_done
Nov 15 13:22:59 Lin-Service kernel: <-- nfs41_proc_reclaim_complete status=0
Nov 15 13:22:59 Lin-Service kernel: --> nfs41_call_sync_prepare data->seq_server 00000000a5776490
Nov 15 13:22:59 Lin-Service kernel: nfs41_sequence_process: Error 0 free the slot
Nov 15 13:22:59 Lin-Service kernel: <-- _nfs41_proc_secinfo_no_name status=0
Nov 15 13:22:59 Lin-Service kernel: --> nfs41_call_sync_prepare data->seq_server 00000000a5776490
Nov 15 13:22:59 Lin-Service kernel: nfs41_sequence_process: Error 0 free the slot
Nov 15 13:22:59 Lin-Service kernel: --> nfs4_proc_destroy_session
Nov 15 13:22:59 Lin-Service kernel: <-- nfs4_proc_destroy_session
Nov 15 13:22:59 Lin-Service kernel: NFS call fsinfo
Nov 15 13:22:59 Lin-Service kernel: NFS reply fsinfo: -116
Nov 15 13:22:59 Lin-Service kernel: NFS call fsinfo
Nov 15 13:22:59 Lin-Service kernel: NFS reply fsinfo: -116