Project

General

Profile

Actions

Bug #5090

open

Setting of sharenfs for unshared dataset shouldn't re-share it

Added by Marcel Telka about 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2014-08-14
Due date:
% Done:

0%

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

Description

This is in the zfs(1m) man page:

           When the sharenfs property is changed for a dataset, the dataset
           and any children inheriting the property are re-shared with the new
           options, only if the property was previously off, or if they were
           shared before the property was changed. If the new property is off,
           the file systems are unshared.

If my understanding is correct, then in a case the old sharenfs property value is something else than off and the dataset is currently not shared, the setting of sharenfs to some new value shouldn't cause the dataset re-share (so it should stay unshared). But it does not work that way:

# share
# zfs set sharenfs=on rpool/export/home/admin
# share
rpool_export_h  /export/home/admin   rw   ""  
# zfs unshare rpool/export/home/admin
# share
# zfs get sharenfs rpool/export/home/admin
NAME                     PROPERTY  VALUE     SOURCE
rpool/export/home/admin  sharenfs  on        local
# share
# zfs set sharenfs=rw rpool/export/home/admin
# share
rpool_export_h  /export/home/admin   rw   ""  
#

I'd expect the dataset should stay unshared at the end of the test case.

I'm not sure if the problem is in the zfs(1m) man page, or in the implementation.

No data to display

Actions

Also available in: Atom PDF