Project

General

Profile

Bug #2988

nfssrv: need ability to go to submounts for v3 and v2 protocols

Added by Vitaliy Gusev over 8 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
nfs - NFS server and client
Start date:
2012-07-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

RFCs of NFSv3,v2 protocols don't have mentions for submounts, but for NFSv4 does.

illumos nfs server doesn't go to submounts automatically. Therefore nfs v2,v3-clients need
to be configured with automounter to use exported submounts.

It can be problematic for some nfs-clients. For instance, ESX-server (it uses nfs v3).

Solution: add option for exported NFS-share: "nohide". If share has this option, this exported sub-share will be seen by NFS v2,v3 clients.

By default "nohide" is off.

#1

Updated by Vitaliy Gusev over 8 years ago

So admin should do:

share -F nfs -o nohide  {SHARE}
#2

Updated by Vitaliy Gusev over 8 years ago

Each resource must be shared.

Example:

zfs set -o sharenfs    pool/dataset
zfs set -o sharenfs=nohide  pool/dataset/subdataset
#3

Updated by Marcel Telka almost 6 years ago

  • Category set to nfs - NFS server and client
#5

Updated by Yuri Pankov over 5 years ago

Andrew Stormont wrote:

This change should be RTI'd: https://github.com/Nexenta/illumos-nexenta/commit/efbfae72dc9d4466fa85868000ef73bd4081263c

Along with fixes for a lot of mem leaks this commit introduced.

#6

Updated by Vitaliy Gusev over 5 years ago

Yuri Pankov wrote:

Along with fixes for a lot of mem leaks this commit introduced.

What leaks?

#8

Updated by Vitaliy Gusev over 5 years ago

Yuri Pankov wrote:

https://github.com/Nexenta/illumos-nexenta/commit/41bdbbaeaed5d6e456b8d42c37b12032cc9fa254

It looks like it is modification of commit 2007c08f9799 "2986 nfs: exi refcounter leak at rfs3_lookup".

So using "nohide" feature requires to take the last sources version.

#9

Updated by Dan McDonald 12 months ago

The fix for this is comprised of four fixes from illumos-nexenta:

rb11254 - nfs nohide - "nfssrv: need ability to go to submounts for v3 and v2 protocols"
closes #12112 rb3823 - nfs-nohide: lookup("..") for submount should be correct
NEX-3095 Issues related to NFS nohide
NEX-5196 share_nfs(1M): "nohide" description missing

It has been in production in Nexenta since 2016 or 2017, it seems.

#10

Updated by Vitaliy Gusev 12 months ago

Yes, seems it could be upstreamed.

With linux client and its automount it works fine like for nfs4, i.e. no need to specify each exported path manually.

#11

Updated by Vitaliy Gusev 12 months ago

One of setup was a VMware ESX server and bsros NFS server. Testing cases included
1. Create dataset 'data/b', all was shared and 'data/b' shared with nohide
1. Setup NFS datastore and specify data as NFS share .
2. Create VMs in 'data/b' and start VMs, stop VMs, susped VMs, start "fio".

#12

Updated by Electric Monk 11 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit f7db5903887928b2b43995473632ef63d130bbd4

commit  f7db5903887928b2b43995473632ef63d130bbd4
Author: Vitaliy Gusev <gusev.vitaliy@nexenta.com>
Date:   2019-11-27T19:57:21.000Z

    2988 nfssrv: need ability to go to submounts for v3 and v2 protocols
    Portions contributed by: Marcel Telka <marcel.telka@nexenta.com>
    Portions contributed by: Jean McCormack <jean.mccormack@nexenta.com>
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
    Reviewed by: Dan Fields <dan.fields@nexenta.com>
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF