Btrfs directory and NFS export

Hi all,

has anybody been able to share btrfs folder using NFS? I found some post but they are for nfs v4 and it seems the nfs server on omnia support v3

The error I’m getting when trying to mount the exported directory

mount: mounting 192.168.1.1:/mnt on /tmp/test failed: Stale file handle

Any suggestion?
Thanks.

Ok - so it looks like that it is necessary to specify fsid option in the /etc/export file for the exported/shared folder and then it works.

I’ll leave it in case others have the same issue.

FTR, fsid is a NFS v4 parameter. It has no effect for NFS v3 setups.

hmm - then let me understand it. The cat /proc/fs/nfsd/versions returns “-2 +3” so I read it that the nfs server supports just version 3. When I tried to connect without the fsid option I was always getting the “Stale file handle” error when I tried to mount it. When I added the fsid I was able to mount it …

“man exports” doesn’t seem to support that:

   fsid=num|root|uuid
          NFS needs to  be  able  to  identify  each  filesystem  that  it
          exports.  Normally it will use a UUID for the filesystem (if the
          filesystem has such a thing) or the device number of the  device
          holding  the  filesystem  (if  the  filesystem  is stored on the
          device).

          As not all filesystems  are  stored  on  devices,  and  not  all
          filesystems  have UUIDs, it is sometimes necessary to explicitly
          tell NFS how to identify a filesystem.  This is  done  with  the
          fsid= option.

          For NFSv4, there is a distinguished filesystem which is the root
          of all exported filesystem.  This is specified with fsid=root or
          fsid=0 both of which mean exactly the same thing.

          Other  filesystems  can be identified with a small integer, or a
          UUID which should contain 32 hex digits and  arbitrary  punctua‐
          tion.

          Linux  kernels  version 2.6.20 and earlier do not understand the
          UUID setting so a small integer must be used if an  fsid  option
          needs  to  be set for such kernels.  Setting both a small number
          and a UUID is supported so the same configuration can be made to
          work on old and new kernels alike.

OK, might be my mistake. I haven’t used NFS v3 in many, many years. :wink: