Project

General

Profile

Bug #7750

Attempting to mount a kNFS export of a sub-directory of a CephFS filesystem fails with -ESTALE

Added by David McBride about 10 years ago. Updated about 7 years ago.

Status:
Can't reproduce
Priority:
High
Assignee:
-
Category:
NFS (Linux Kernel)
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Hi,

I have run into the following issue when trying to export a subset of a CephFS filesystem via NFS:

Machine A:
  • mounts CephFS in e.g. /mnt/cephfs.
  • creates a subdirectory, e.g. /mnt/cephfs/nfs.
  • umounts CephFS.
  • mkdir /srv/nfs
  • mounts the nfs/ subdirectory in CephFS on /srv/nfs
  • exports /srv/nfs using kNFS.

This all succeeds; however, when an NFS client attempts to mount /srv/nfs:

# mount -v machine-a:/srv/nfs nfs -t nfs -o vers=3
mount.nfs: timeout set for Mon Mar 17 19:55:28 2014
mount.nfs: trying text-based options 'vers=3,addr=172.28.208.130'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 172.28.208.130 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 172.28.208.130 prog 100005 vers 3 prot UDP port 48472
mount.nfs: mount(2): Stale file handle

The client is always returned -ESTALE. This error does not occur if the root of CephFS, as opposed to some subdirectory of it, is exported.

I understand that the new stable-inode code relies on being able to follow backpointers back to the root of the CephFS hierarchy; while this seems to work when exporting the entire CephFS tree via NFS, it appears not to be successful when only exporting a subtree.

The server in this case is running:
  • Ubuntu 14.04 (pre-release)
  • kernel 3.13.0-5-generic
  • ceph version 0.72.2 (commit:a913ded2ff138aefb8cb84d347d72164099cfd60)

History

#1 Updated by John Spray about 10 years ago

  • Project changed from Ceph to CephFS
  • Category changed from 1 to NFS (Linux Kernel)

#2 Updated by Sage Weil about 10 years ago

  • Priority changed from Normal to High

#3 Updated by Zheng Yan over 9 years ago

  • Status changed from New to Can't reproduce

can't reproduce on 3.16 kernel

#4 Updated by Kostya Velychkovsky over 7 years ago

I've reproduced this bug in CephFS jewel. Can't mount via NFS NON root CephFS dir.
Get error on client 'Stale NFS file handle'

My kernel 4.4
NFS client - FreeBSD machine (nfs3)

#5 Updated by Zheng Yan over 7 years ago

I still can't reproduce it. This does not seem like kernel issue. which version of nfs-utils do you use?

#6 Updated by Kostya Velychkovsky over 7 years ago

NFS-Utils-1.2.8
NFS server on Ubuntu 16.04

#7 Updated by c sights about 7 years ago

Happens for me also:
Debian Jessie with backported kernel
Linux drbl 4.8.0-0.bpo.2-amd64 #1 SMP Debian 4.8.15-2~bpo8+2 (2017-01-17) x86_64 GNU/Linux

nfs-kernel-server 1.2.8-9

#8 Updated by c sights about 7 years ago

Actually, does fail with stale. Instead the NFS mount command eventually times out.
mount.nfs: Connection timed out

Also available in: Atom PDF