zfs sharing

Sun workstations/servers and operating systems (SunOS, Solaris and OpenSolaris)
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
hamei
Posts: 9888
Joined: Tue Feb 24, 2004 5:10 pm

zfs sharing

Unread postby hamei » Sun May 06, 2012 6:47 pm

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 :)

User avatar
josehill
Moderator
Moderator
Posts: 2981
Joined: Mon Jun 06, 2005 9:53 pm
Location: USA
Contact:

Re: zfs sharing

Unread postby josehill » Sun May 06, 2012 7:22 pm

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

hamei
Posts: 9888
Joined: Tue Feb 24, 2004 5:10 pm

Re: zfs sharing

Unread postby hamei » Sun May 06, 2012 11:10 pm

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.

kubatyszko
Posts: 351
Joined: Sat Nov 12, 2011 4:18 am
Location: Tokyo
Contact:

Re: zfs sharing

Unread postby kubatyszko » Mon May 07, 2012 2:06 am

Code: Select all

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: :Fuel: |:O2: | :Indy: || PL: [ :Fuel: :O2: :O2+: :Indy: ]

hamei
Posts: 9888
Joined: Tue Feb 24, 2004 5:10 pm

Re: zfs sharing

Unread postby hamei » Mon May 07, 2012 4:38 am

kubatyszko wrote:

Code: Select all

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: Select all

zfs set sharenfs=rw pool/dataset

but if I try to pin it down a little, as in

Code: Select all

zfs set sharenfs=rw=@xxx.xxx.xxx.xxx 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.

kubatyszko
Posts: 351
Joined: Sat Nov 12, 2011 4:18 am
Location: Tokyo
Contact:

Re: zfs sharing

Unread postby kubatyszko » Mon May 07, 2012 4:56 am

How about making sure the share(1) gets what it wants ? ( man share ) :

Code: Select all

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: :Fuel: |:O2: | :Indy: || PL: [ :Fuel: :O2: :O2+: :Indy: ]

User avatar
recondas
Moderator
Moderator
Posts: 5248
Joined: Sun Jun 06, 2004 5:55 pm
Location: NC - USA

Re: zfs sharing

Unread postby recondas » Mon May 07, 2012 4:59 am

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: Select all

# 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: Select all

# 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 *
***********************************************************************

User avatar
zmttoxics
Posts: 893
Joined: Mon Aug 31, 2009 9:11 am

Re: zfs sharing

Unread postby zmttoxics » Mon May 07, 2012 5:38 am

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.

hamei
Posts: 9888
Joined: Tue Feb 24, 2004 5:10 pm

Re: zfs sharing

Unread postby hamei » Tue May 08, 2012 6:01 am

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: Select all

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 :-(

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

User avatar
zmttoxics
Posts: 893
Joined: Mon Aug 31, 2009 9:11 am

Re: zfs sharing

Unread postby zmttoxics » Tue May 08, 2012 6:08 am

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.

hamei
Posts: 9888
Joined: Tue Feb 24, 2004 5:10 pm

Re: zfs sharing

Unread postby hamei » Tue May 08, 2012 6:32 pm

zmttoxics wrote:This guide looks reasonable ...

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

User avatar
zmttoxics
Posts: 893
Joined: Mon Aug 31, 2009 9:11 am

Re: zfs sharing

Unread postby zmttoxics » Wed May 09, 2012 4:13 am

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.

hamei
Posts: 9888
Joined: Tue Feb 24, 2004 5:10 pm

Re: zfs sharing

Unread postby hamei » Wed May 09, 2012 4:22 am

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.

User avatar
zmttoxics
Posts: 893
Joined: Mon Aug 31, 2009 9:11 am

Re: zfs sharing

Unread postby zmttoxics » Wed May 09, 2012 4:30 am

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.

hamei
Posts: 9888
Joined: Tue Feb 24, 2004 5:10 pm

Re: zfs sharing

Unread postby hamei » Thu May 10, 2012 12:47 am

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 -
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 :)


Return to “Sun”

Who is online

Users browsing this forum: No registered users and 2 guests