Sun

zfs sharing

Anyone here know offhand if it's possible to share the same directory tree (e.g. zfs/files) twice, once with nfs and once with smb ? Solaris 10.

I know, just try it ... but if I knew it worked, I'd try harder :)
Unless I am misunderstanding the question, why wouldn't you be able to do that?
josehill wrote:
Unless I am misunderstanding the question, why wouldn't you be able to do that?

Because we are talking about Solaris ?

I would have thought that you should be able to create two nfs shares of one file system to different users with different settings, also. But it warn't true. I fought that one for about two days before I found a note in the fine print that said nfs was designed to not do that. Sigh.
Code:
zfs set sharenfs=on zfs/foo/bar
zfs set sharesmb=on zfs/foo/bar


Those bits are independent and I see no reason why it wouldn't work simultaneously...
you may need to add some extra parameters to suit your needs to the commands above.

_________________
[click for links to hinv] JP: [ :O200: :Fuel: :Octane2: :Octane: :O2: :Indy: :Indy: ] PL: [ :Fuel: :O2: :O2+: :Indy: ]
For Sale: 2*O200 M/B, 2*O200 PSU, 6*256MB O200 RAM, 2*O200 SCSI Backplane, 2*O200 MSC, DMediaPro DM-2 ( 030-1653-002 Rev. H , XT-DIGVID) with Octane XIO pull (Origin pull optionally available)
kubatyszko wrote:
Code:
zfs set sharenfs=on zfs/foo/bar
zfs set sharesmb=on zfs/foo/bar

Those bits are independent and I see no reason why it wouldn't work simultaneously...
you may need to add some extra parameters to suit your needs to the commands above.

I hope it does but so far not having much luck with the smb portion. nfs works fine if I do
Code:
zfs set sharenfs=rw pool/dataset

but if I try to pin it down a little, as in
Code:
zfs set [email protected] pool/dataset

things quit working, even though everything looks correct.

Also, the smb dataset shows as being shared but the Windows box won't see it.

Back to duckduckgo, I guess. Was mostly just wondering if someone had actually done this and knows that it for-sure works.
How about making sure the share(1) gets what it wants ? ( man share ) :
Code:
zfs set sharenfs='rw=10.0.0.1' pool/dataset
zfs set sharenfs='rw=10.0.0.0/16' pool/dataset

depending on whether you want a single host or a subnet...

_________________
[click for links to hinv] JP: [ :O200: :Fuel: :Octane2: :Octane: :O2: :Indy: :Indy: ] PL: [ :Fuel: :O2: :O2+: :Indy: ]
For Sale: 2*O200 M/B, 2*O200 PSU, 6*256MB O200 RAM, 2*O200 SCSI Backplane, 2*O200 MSC, DMediaPro DM-2 ( 030-1653-002 Rev. H , XT-DIGVID) with Octane XIO pull (Origin pull optionally available)
hamei wrote:
Anyone here know offhand if it's possible to share the same directory tree (e.g. zfs/files) twice, once with nfs and once with smb ? Solaris 10.
Since it gets lumped in under my solaris ten-foot-pole rule, I've never used zfs. So take the following with an appropriately sized grain of salt (especially if you've already btdt with this reference).

The "Troubleshooting ZFS Share Problems" (located under the "legacy zfs sharing syntax") section of the Oracle Solaris Administration Guide to ZFS File Systems seems to indicate you can, and gives specifics for legacy versions of zfs (I'm guessing solaris 10 would constitute legacy).

Oracle wrote:
You can create a file system share with both NFS and SMB protocols by using the zfs set share command.
Code:
# zfs set share=name=ds,path=/ds,prot=nfs,prot=smb rpool/ds
name=ds,path=/ds,prot=nfs,prot=smb
If you want to create a file system share with both NFS and SMB protocols by using the legacy share command, you must specify the command twice. For example:
Code:
# share -F nfs /rpool/ds
# share -F smb /rpool/ds
# zfs get share rpool/df
name=rpool_ds,path=/rpool/ds,prot=nfs,prot=smb
A share path or description that includes a comma (,) must be quoted with double quotes.
If they're right, the original reference can be found here: http://docs.oracle.com/cd/E23824_01/htm ... html#glixo

_________________
***********************************************************************
Welcome to ARMLand - 0/0x0d00
running...(sherwood-root 0607201829)
* InfiniteReality/Reality Software, IRIX 6.5 Release *
***********************************************************************
The old ways are sometimes still the best. On S10, feel free to edit /etc/dfs/dfstab and add your share commands there. SMB shares will still require you to setup smb users and settings etc using the smb* commands and editing the /etc/sfw/smb.conf fie.

Edit: don't forget to enable / restart the servers after the changes.

_________________
Stuff.
Thanks to all for the assistance. I am tending towards recondas' ten-foot-pole approach but ....

josehill wrote:
Unless I am misunderstanding the question, why wouldn't you be able to do that?

Surprise surprise, after searching through 537 pages of directions on how to enable zfs set sharesmb=on, I came across this little gem :
oracle wrote:
Note that the Oracle Solaris SMB service is not supported in the Oracle Solaris 10 release.

So much for my vain hope to get away from Mickeysoft's really really bad Services for Ooonix :(

But the fine print says that smb is not supported on Solaris 10, which is quite different from "doesn't work.". Hmmm .... still got some un-smashed areas on head ....

kubatyszko wrote:
How about making sure the share(1) gets what it wants ? ( man share ) :
Code:
zfs set sharenfs='rw=10.0.0.1' pool/dataset

One of the really nice things about Solaris is that if you look for a while, you will find several different command line arguments which all are supposed to do the same thing. This one didn't work in the same fashion that mine didn't work :)

But just for the heck of it and because there was nothing left to lose, I replaced the ip with the hostname. Wa ! That worked, although I didn't see it described anywhere . Honey, you ain't nothin if you ain't free. Success, yay !

recondas wrote:
Since it gets lumped in under my solaris ten-foot-pole rule ...

Point taken. In fact, in my next life I will not have a computer. I will be a Boston terrier with big bulgy eyes and play with my tennis ball all day, everyday until the end of time. I will also snore when sleeping and fart. Quiet, subtle, deathly awful farts.

zmttoxics wrote:
The old ways are sometimes still the best. On S10, feel free to edit /etc/dfs/dfstab and add your share commands there.

Don't encourage me. I was avoiding that since all the lit recommends sticking to zfs commands for zfs filesystems but ... zfs is actually pretty nice but the damned Sun Disease is deep in the bones over there. They can't leave anything alone, can they ? If I were God, I'd make sure that every day when Sun employees went home, their houses would all be moved to different streets and painted different colors. Same wives, tho :-(

Quote:
SMB shares will still require you to setup smb users and settings etc using the smb* commands and editing the /etc/sfw/smb.conf fie.

Would you happen to know if sharesmb works on Solaris 10 Sparc ? I could care less if it's supported or not. If it doesn't work, no point in getting all carried away struggling.

thanks again, Solarians :D
The sharesmb zfs commands have varying levels of success depending on the update release you are using. Setting this up on SPARC shouldn't make a difference.

This guide looks reasonable with some stuff that can be ignored (like the tcpwrappers stuff (hosts.allow)).
http://support.moonpoint.com/os/unix/so ... docusp.php

If you get stuck, post your config!

_________________
Stuff.
zmttoxics wrote:
This guide looks reasonable ...

Thanks. Actually, that's for Samba, so I think I'll just give it a rest for now ....
hamei wrote:
zmttoxics wrote:
This guide looks reasonable ...

Thanks. Actually, that's for Samba, so I think I'll just give it a rest for now ....

Right... Didn't you want to setup both SMB and NFS?

_________________
Stuff.
zmttoxics wrote:
Right... Didn't you want to setup both SMB and NFS?

Solaris CIFS type smb, not samba. I got bitten by a samba when small, been afraid of them ever since.
Ok, well, not sure what you were reading or attempting anymore, but CIFS on Solaris 10 is SMB. The newer stuff is on OSOL and Solaris 11.

_________________
Stuff.
zmttoxics wrote:
Ok, well, not sure what you were reading or attempting anymore

the in-kernel cifs support for smb but as you say below -
Quote:
The newer stuff is on OSOL and Solaris 11.

So to heck with it, I've had enough fun and nfs sharing works as advertised so away we go.

thanks :)