Project

General

Profile

Bug #5953

zfs sharenfs property can result in incorrect sharetab

Added by Nahum Shalman about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
nfs - NFS server and client
Start date:
2015-05-26
Due date:
% Done:

0%

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

Description

I've seen this as far back as Nexenta Core Platform 3, but I was shocked to see it on SmartOS:

# uname -a
SunOS fs-chassis-01 5.11 joyent_20150430T082110Z i86pc i386 i86pc

Steps to reproduce:

# cat /etc/dfs/sharetab 
# zfs create -o mountpoint=/shareme zones/shareme
# zfs create zones/shareme/child1
# zfs create zones/shareme/child2
# zfs create zones/shareme/child3
# zfs set sharenfs=root=foo.example.com,root=bar.example.com zones/shareme
# cat /etc/dfs/sharetab 
/shareme/child2 -       nfs     sec=sys,root=foo.example.com:bar.example.com:foo.example.com:bar.example.com:foo.example.com:bar.example.com:foo.example.com:bar.example.com
/shareme/child1 -       nfs     sec=sys,root=foo.example.com:bar.example.com:foo.example.com:bar.example.com:foo.example.com:bar.example.com:foo.example.com:bar.example.com
/shareme        -       nfs     sec=sys,root=foo.example.com:bar.example.com:foo.example.com:bar.example.com:foo.example.com:bar.example.com:foo.example.com:bar.example.com
/shareme/child3 -       nfs     sec=sys,root=foo.example.com:bar.example.com:foo.example.com:bar.example.com:foo.example.com:bar.example.com:foo.example.com:bar.example.com

Expected Results:

# cat /etc/dfs/sharetab 
# zfs create -o mountpoint=/shareme zones/shareme
# zfs create zones/shareme/child1
# zfs create zones/shareme/child2
# zfs create zones/shareme/child3
# zfs set sharenfs=root=foo.example.com,root=bar.example.com zones/shareme
# cat /etc/dfs/sharetab 
/shareme        -       nfs     sec=sys,root=foo.example.com:bar.example.com
/shareme/child1 -       nfs     sec=sys,root=foo.example.com:bar.example.com
/shareme/child2 -       nfs     sec=sys,root=foo.example.com:bar.example.com
/shareme/child3 -       nfs     sec=sys,root=foo.example.com:bar.example.com

Workaround:

Use "root=foo:bar" rather than "root=foo,root=bar"

# zfs set sharenfs=root=foo.example.com:bar.example.com zones/shareme
# cat /etc/dfs/sharetab 
/shareme        -       nfs     sec=sys,root=foo.example.com:bar.example.com
/shareme/child1 -       nfs     sec=sys,root=foo.example.com:bar.example.com
/shareme/child2 -       nfs     sec=sys,root=foo.example.com:bar.example.com
/shareme/child3 -       nfs     sec=sys,root=foo.example.com:bar.example.com

History

#1

Updated by Marcel Telka about 5 years ago

  • Category set to nfs - NFS server and client

Also available in: Atom PDF