Hi all I've finally started to use sharemgr instead of /etc/dfs/dfstab. Ugh!
I really want to ask why this beast was created but I'll refrain for now...


First, when creating a group, It won't let me do

[kmcdonald at Galileo] 114>pfexec sharemgr create -P nfs -p ro=* -p 
rw=MyNetGroup Test1
Property syntax error: ro requires -Srw,  requires -S

<Note the mangled error message? hmm.>

Ok so it needs a -S (the usage, and manpage don't show that as legal but...)

Let's try it in the beginning:

[kmcdonald at Galileo] 115>pfexec sharemgr create -S sys -P nfs -p ro=* -p 
rw=MyNetGroup Test1
create: illegal option -- S
usage: create [-nvh] [-P proto [-p property=value]] group

on the end:

[kmcdonald at Galileo] 116>pfexec sharemgr create -P nfs -p ro=* -p 
rw=MyNetGroup -S sys Test1
create: illegal option -- S
usage: create [-nvh] [-P proto [-p property=value]] group

That's strange ro, rw, etc. are some of the most popular options... why can't I 
specify them at creation time?

Let's try creating it with no options, and then add them later:

[kmcdonald at Galileo] 117>pfexec sharemgr create -P nfs Test1
[kmcdonald at Galileo] 118>pfexec sharemgr set -S sys -p ro=* -p rw=MyNetGroup 
Test1
Property syntax error: ro not supported with -Srw,  not supported with -S
usage: set [-nvh] -P proto [-S optspace] [-p property=value]* [-s sharepath] 
[-r resource]] group
        protocol must be specified

Ok, I forgot the -P nfs, but that error message isn't exactly pointing that out 
now is it?

Let's try again:

[kmcdonald at Galileo] 119>pfexec sharemgr set -P nfs -S sys -p ro=* -p 
rw=MyNetGroup Test1

Finally.

Now let's add a share:

[kmcdonald at Galileo] 124>pfexec sharemgr add-share -r Test1 -d "Test1" -s 
/export/Test1 Test1

Ok that worked. Strange that I can't add per-share options at creation time, 
but not the end of the world.

Now we have:

[kmcdonald at Galileo] 126>pfexec sharemgr show -pv
default nfs=()
zfs
Test1 nfs=() nfs:sys=(ro="*" rw="MyNetGroup")
          Test1=/export/Test1   "Test1"

Now let's add some properties:

[kmcdonald at Galileo] 128>pfexec sharemgr set -P nfs -S sys -p root=NetGroup 
-p anon=12345 -s /export/Test1 Test1
Property syntax error: anon not supported with -S
usage: set [-nvh] -P proto [-S optspace] [-p property=value]* [-s sharepath] 
[-r resource]] group

That's strange, I always used to be able to list anon= multiple times with 
different security modes. Why not here?

Let's do them separately:

[kmcdonald at Galileo] 129>pfexec sharemgr set -P nfs -S sys -p root=NetGroup 
-s /export/Test1 Test1
[kmcdonald at Galileo] 130>pfexec sharemgr set -P nfs -p anon=12345 -s 
/export/Test1 Test1

Ok that worked, let's see what happenned:

[kmcdonald at Galileo] 131>pfexec sharemgr show -pv
default nfs=()
zfs
Test1 nfs=() nfs:sys=(ro="*" rw="MyNetGroup")
          Test1=/export/Test1   "Test1"  nfs=(anon="12345") 
nfs:sys=(root="NetGroup")

Wait. The anon= is applying to all (or only sec=none?) security modes? Not 
surprising given that it wouldn't let me use '-S'. How do I get the old 
behavior?

And Oops. That put the options on the share, I meant for them to go on the 
group.
Let's put them on the group:

[kmcdonald at Galileo] 132>pfexec sharemgr set -S sys -P nfs -p anon=1 Test1
Property syntax error: anon not supported with -S
usage: set [-nvh] -P proto [-S optspace] [-p property=value]* [-s sharepath] 
[-r resource]] group

Still can't use -S with anon=.
Try again:

[kmcdonald at Galileo] 133>pfexec sharemgr set -P nfs -p anon=1 Test1

That worked. Let's see:

[kmcdonald at Galileo] 134>pfexec sharemgr show -pv
default nfs=()
zfs
Test1 nfs=(anon="1") nfs:sys=(ro="*" rw="MyNetGroup")
          Test1=/export/Test1   "Test1"  nfs=(anon="12345") 
nfs:sys=(root="NetGroup")

Again it appears in the nfs=() not the nfs:sec=()

Now let's remove the options from the share:

[kmcdonald at Galileo] 135>pfexec sharemgr unset -P nfs -S sys -p root=NetGroup 
-s /export/Test1 Test1
Property syntax error: root=NetGroup not supported with -S
Could not unset property root=NetGroup: not set

Ok, I goofed. I should delete the =value. The second error message (though 
cryptic) is correct, but what's the first one ("Property syntax error: 
root=NetGroup not supported with -S") doing there?

Try again:

[kmcdonald at Galileo] 136>pfexec sharemgr unset -P nfs -S sys -p root -s 
/export/Test1 Test1
Could not unset property: system error

That's strange. Not helpful. I checked the man page and the usage, and 
apparently 'unset' doesn't support the '-s share' option, so you can set 
properties on shares but can't remove them?? That's not good.

Ok, that was for 'root=', lets see if it's the same for 'anon=':

(/export/Install/Files/etc/ssh)
[kmcdonald at Galileo] 138>pfexec sharemgr unset -P nfs -p anon -s 
/export/Test1 Test1

Oh WOW, did that work? Let's see:

(/export/Install/Files/etc/ssh)
[kmcdonald at Galileo] 139>pfexec sharemgr show -pv
default nfs=()
zfs
Test1 nfs=(anon="1") nfs:sys=(ro="*" rw="MyNetGroup")
          Test1=/export/Test1   "Test1"  nfs=() nfs:sys=()

It did. OK, so maybe 'unset' does support the '-s'??
Heck it even got rid of the 'root=' from the nfs:sys().... but I didn't use '-S 
sys'.

Maybe the one that complained about the 'system error' actually worked??? Let's 
see:

[kmcdonald at Galileo] 140>pfexec sharemgr set -P nfs -S sys -p root=NetGroup 
-s /export/Test1 Test1
[kmcdonald at Galileo] 141>pfexec sharemgr show -pv
default nfs=()
zfs
Test1 nfs=(anon="1") nfs:sys=(ro="*" rw="MyNetGroup")
          Test1=/export/Test1   "Test1"  nfs=() nfs:sys=(root="NetGroup")

OK, it's there now:

[kmcdonald at Galileo] 142>pfexec sharemgr unset -P nfs -S sys -p root -s 
/export/Test1 Test1
Could not unset property: system error

Ok same error, did it go away though?

[kmcdonald at Galileo] 143>pfexec sharemgr show -pv
default nfs=()
zfs
Test1 nfs=(anon="1") nfs:sys=(ro="*" rw="MyNetGroup")
          Test1=/export/Test1   "Test1"  nfs=() nfs:sys=()

It did. Wierd.

Another thing that I'd like to do (which the man page doeesn't say I should so 
maybe I'm SOL) is this:

[kmcdonald at Galileo] 145>sharemgr set -P nfs -p vers=3 Test1
Could not add property vers: no such property

So this thing, can do things it claims it can't, won't do things it says it 
can, and things it says it didn't do, and doesn't do things it should be able 
to. ;)

UGH! Why can't I keep using /etc/dfs/dfstab?

Should each of these things be separate bugs? What category?

  -Kyle



   


Reply via email to