All of lore.kernel.org
 help / color / mirror / Atom feed
* mount.nfs: Stale file handle
@ 2021-05-25 16:14 Scott Andrews
  2021-05-26  5:56 ` NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Andrews @ 2021-05-25 16:14 UTC (permalink / raw)
  To: linux-nfs

Platform Raspberry pi 4

Scratch build linux system.

nfs-utils-2.4.1

./configure --prefix=/usr \
         --sysconfdir=/etc \
         --sbindir=/sbin \
         --disable-nfsv4

systemV init script

         start)  log_info_msg "Exporting NFS Filesystems..."
                 /sbin/exportfs -av 2>&1 > /dev/null
                 evaluate_retval
                 log_info_msg "Starting NFS mountd..."
                 start_daemon /sbin/rpc.mountd
                 evaluate_retval
                 log_info_msg "Starting NFS statd..."
                 start_daemon /sbin/rpc.statd --no-notify
                 evaluate_retval
                 log_info_msg "Starting NFS nfsd..."
                 start_daemon /sbin/rpc.nfsd 8
                 evaluate_retval


On the server to test.......

lsmod

nfsd                  442368  11


rpcinfo -p localhost

    program vers proto   port  service

     100000    4   tcp    111  portmapper
     100000    3   tcp    111  portmapper
     100000    2   tcp    111  portmapper
     100000    4   udp    111  portmapper
     100000    3   udp    111  portmapper
     100000    2   udp    111  portmapper
     100005    1   udp  35667  mountd
     100005    1   tcp  58403  mountd
     100005    2   udp  41019  mountd
     100005    2   tcp  52587  mountd
     100005    3   udp  51412  mountd
     100005    3   tcp  52519  mountd
     100024    1   udp  33165  status
     100024    1   tcp  56603  status
     100003    3   tcp   2049  nfs
     100003    4   tcp   2049  nfs
     100227    3   tcp   2049  nfs_acl
     100021    1   udp  47813  nlockmgr
     100021    3   udp  47813  nlockmgr
     100021    4   udp  47813  nlockmgr
     100021    1   tcp  36915  nlockmgr
     100021    3   tcp  36915  nlockmgr
     100021    4   tcp  36915  nlockmgr


root [ ~ ]# ps aux | grep rpc
root        62  0.0  0.0      0     0 ?        I<   11:12 0:00 [rpciod]
root       698  0.0  0.0   2320  1400 ?        Ss   11:12   0:00 
/sbin/rpcbind
root      1477  0.0  0.0   4316  3132 ?        Ss   11:28   0:00 
/sbin/rpc.mountd
nobody    1497  0.0  0.0   2992  2236 ?        Ss   11:28   0:00 
/sbin/rpc.statd --no-notify


ps aux | grep nfs
root        66  0.0  0.0      0     0 ?        I<   11:12 0:00 [nfsiod]
root      1518  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1519  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1520  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1521  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1522  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1523  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1524  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1525  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]


root [ ~ ]# cat /etc/exports
/home *(rw,no_root_squash,subtree_check)


root [ ~ ]# exportfs -v

/home 
<world>(sync,wdelay,hide,sec=sys,rw,secure,no_root_squash,no_all_squash)


root [ ~ ]# cat /proc/fs/nfs/exports

# Version 1.1
# Path Client(Flags) # IP

root [ ~ ]# mount -v -t nfs localhost:/home /mnt
mount.nfs: timeout set for Tue May 25 11:40:03 2021
mount.nfs: trying text-based options 
'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Stale file handle
mount.nfs: trying text-based options 
'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Stale file handle
mount.nfs: trying text-based options 
'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Stale file handle

cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/ 
*(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,uuid=6b179096:b8b5495a:873908b5:a2b35faa,sec=390003:390004:390005:1)
/home 
*(rw,no_root_squash,sync,wdelay,uuid=6b179096:b8b5495a:873908b5:a2b35faa,sec=1)


Can someone help with this issue?

Thanks for any help/direction you may have

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mount.nfs: Stale file handle
  2021-05-25 16:14 mount.nfs: Stale file handle Scott Andrews
@ 2021-05-26  5:56 ` NeilBrown
  0 siblings, 0 replies; 3+ messages in thread
From: NeilBrown @ 2021-05-26  5:56 UTC (permalink / raw)
  To: Scott Andrews; +Cc: linux-nfs

On Wed, 26 May 2021, Scott Andrews wrote:
> 
> cat /proc/fs/nfs/exports
> # Version 1.1
> # Path Client(Flags) # IPs
> / 
> *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,uuid=6b179096:b8b5495a:873908b5:a2b35faa,sec=390003:390004:390005:1)
> /home 
> *(rw,no_root_squash,sync,wdelay,uuid=6b179096:b8b5495a:873908b5:a2b35faa,sec=1)
> 

Apart from the error, this is the only place that anything looks odd.
When / is exported a v4root, there doesn't need to be a uuid=.
It is the same uuid as for /home.
When I experiment I don't get a uuid= for /.

I don't know that this would cause a problem, but maybe it does.

Two extra pieces of debugging info that might be useful:

1/ Get a network trace for port 2049 traffic between client and server
 with tcpdump.
 Be sure to use "-s 0" and provide the binary packet capture - compress
 it and attach it to the email.

2/ Before attempting the mount, and after restarting rpc.mountd on the
server and running "exportfs -f", run "strace -s 1000 -o /tmp/somefile -p ..." on the
rpc.mountd process, then try the mount, then kill strace.
Then provide /tmp/somefile.

NeilBrown


> 
> Can someone help with this issue?
> 
> Thanks for any help/direction you may have
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* mount.nfs: Stale file handle
@ 2021-05-25 16:03 Scott Andrews
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Andrews @ 2021-05-25 16:03 UTC (permalink / raw)
  To: linux-nfs

Platform Raspberry pi 4

Scratch build linux system.

nfs-utils-2.4.1

./configure --prefix=/usr \
         --sysconfdir=/etc \
         --sbindir=/sbin \
         --disable-nfsv4

systemV init script

         start)  log_info_msg "Exporting NFS Filesystems..."
                 /sbin/exportfs -av 2>&1 > /dev/null
                 evaluate_retval
                 log_info_msg "Starting NFS mountd..."
                 start_daemon /sbin/rpc.mountd
                 evaluate_retval
                 log_info_msg "Starting NFS statd..."
                 start_daemon /sbin/rpc.statd --no-notify
                 evaluate_retval

                 log_info_msg "Starting NFS nfsd..."

                 start_daemon /sbin/rpc.nfsd 8

                 evaluate_retval


On the server to test.......

lsmod

nfsd                  442368  11


rpcinfo -p localhost

    program vers proto   port  service

     100000    4   tcp    111  portmapper
     100000    3   tcp    111  portmapper
     100000    2   tcp    111  portmapper
     100000    4   udp    111  portmapper
     100000    3   udp    111  portmapper
     100000    2   udp    111  portmapper
     100005    1   udp  35667  mountd
     100005    1   tcp  58403  mountd
     100005    2   udp  41019  mountd
     100005    2   tcp  52587  mountd
     100005    3   udp  51412  mountd
     100005    3   tcp  52519  mountd
     100024    1   udp  33165  status
     100024    1   tcp  56603  status
     100003    3   tcp   2049  nfs
     100003    4   tcp   2049  nfs
     100227    3   tcp   2049  nfs_acl
     100021    1   udp  47813  nlockmgr
     100021    3   udp  47813  nlockmgr
     100021    4   udp  47813  nlockmgr
     100021    1   tcp  36915  nlockmgr
     100021    3   tcp  36915  nlockmgr
     100021    4   tcp  36915  nlockmgr


root [ ~ ]# ps aux | grep rpc
root        62  0.0  0.0      0     0 ?        I<   11:12 0:00 [rpciod]
root       698  0.0  0.0   2320  1400 ?        Ss   11:12   0:00 
/sbin/rpcbind
root      1477  0.0  0.0   4316  3132 ?        Ss   11:28   0:00 
/sbin/rpc.mountd
nobody    1497  0.0  0.0   2992  2236 ?        Ss   11:28   0:00 
/sbin/rpc.statd --no-notify


ps aux | grep nfs
root        66  0.0  0.0      0     0 ?        I<   11:12 0:00 [nfsiod]
root      1518  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1519  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1520  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1521  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1522  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1523  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1524  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]
root      1525  0.0  0.0      0     0 ?        S    11:28   0:00 [nfsd]


root [ ~ ]# cat /etc/exports
/home *(rw,no_root_squash,subtree_check)


root [ ~ ]# exportfs -v

/home 
<world>(sync,wdelay,hide,sec=sys,rw,secure,no_root_squash,no_all_squash)


root [ ~ ]# cat /proc/fs/nfs/exports

# Version 1.1
# Path Client(Flags) # IP

root [ ~ ]# mount -v -t nfs localhost:/home /mnt
mount.nfs: timeout set for Tue May 25 11:40:03 2021
mount.nfs: trying text-based options 
'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Stale file handle
mount.nfs: trying text-based options 
'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Stale file handle
mount.nfs: trying text-based options 
'vers=4.2,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): Stale file handle

cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/ 
*(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,uuid=6b179096:b8b5495a:873908b5:a2b35faa,sec=390003:390004:390005:1)
/home 
*(rw,no_root_squash,sync,wdelay,uuid=6b179096:b8b5495a:873908b5:a2b35faa,sec=1)


Can someone help with this issue?

Thanks for any help/direction  you may have



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-26  5:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 16:14 mount.nfs: Stale file handle Scott Andrews
2021-05-26  5:56 ` NeilBrown
  -- strict thread matches above, loose matches on Subject: below --
2021-05-25 16:03 Scott Andrews

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.