Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Solaris 11.2: SMB shares in a non-global zone

1,101 views
Skip to first unread message

Michael Weis

unread,
Jul 5, 2015, 10:30:49 AM7/5/15
to
Hi there,

I've problems to create CIFS(SMB) shares in a ZFS root pool of a
non-global zone.

The situation:

global_zone:~# zfs list
...
rpool/zones/ngzone 11,8G 287G 35K /zones/ngzone
rpool/zones/ngzone/rpool 11,8G 287G 31K /zones/ngzone/root/rpool
rpool/zones/ngzone/rpool/ROOT 11,8G 287G 31K legacy
rpool/zones/ngzone/rpool/ROOT/be_4 1,55G 287G 8,52G /zones/ngzone/root
...

ngzone:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 11,8G 287G 31K /rpool
rpool/ROOT 11,8G 287G 31K legacy
rpool/ROOT/be_4 1,55G 287G 8,52G /

let's say there's a user hugo with homedir /home/hugo, which I wanna share.


It's not possible from within the ng zone:
ngzone# zfs set share.smb=on rpool
cannot set property for 'rpool': 'share.smb' cannot be set in a
non-global zone

It's also not possible from global zone, because 'zoned' property is set
at the ngzone root fs:

global_zone:~# zfs set share.smb=on rpool/zones/ngzone/rpool/ROOT/be_4
cannot set property for 'rpool/zones/be_4/rpool/ROOT/be_4': 'share.smb'
cannot be set on a 'zoned' dataset from the global zone.

So I tried to use plain old samba packages: it also doesn't work, as
that's only possible with ZFS filesystems mounted 'legacy'.

Any hints?

Thank you & regards,

Michael




cindy.sw...@gmail.com

unread,
Jul 5, 2015, 12:50:20 PM7/5/15
to
Hi Michael,

If I'm following this correctly, you need to delegate a file system to the non-global zone that you want to share over SMB. Create the file system that you want to share in the global zone, delegate it to non-global zone, and then share it over SMB.

http://docs.oracle.com/cd/E36784_01/html/E36835/gbbst.html

Thanks, Cindy

Ronald Kuehn

unread,
Jul 5, 2015, 2:57:15 PM7/5/15
to
Hi,

non-global zones cannot share file systems via SMB.
Sharing via SMB is only possible in the global zone.
You also can't share datasets from the global zone that
have been assigned to a non-global zone.
So you need to use a dataset of the global zone to share it
via SMB. The same dataset can then also be mounted in the
non-global zone via lofs if needed (using "add fs" with "set type=lofs"
in the zone configuration).

Regards,
Ronald

--
* The whole problem with the world is that fools and fanatics are always
* so certain of themselves, but wiser people so full of doubts.
* --Bertrand Russell

John D Groenveld

unread,
Jul 5, 2015, 4:42:29 PM7/5/15
to
In article <mnbf2k$4i5$1...@newsreader4.netcologne.de>,
Michael Weis <crawf...@gmx.de> wrote:
>So I tried to use plain old samba packages: it also doesn't work, as
>that's only possible with ZFS filesystems mounted 'legacy'.

What error do you get when you just share NGZ's /tmp per
the Samba docs?
<URL:https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/install.html>

John
groe...@acm.org

Andrew Gabriel

unread,
Jul 5, 2015, 5:40:42 PM7/5/15
to
In article <mnbum5$rg7$1...@news.m-online.net>,
That's true for the kernel CIFS server implementation, but you can
use Samba in a non-global zone.

Alternatively, you can use one of the recent Illumos distros which
do allow the kernel CIFS server to be shared from non-global zones.

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]

cindy.sw...@gmail.com

unread,
Jul 6, 2015, 12:33:24 PM7/6/15
to
I was indeed confused so I'll clarify:

1. SMB client services are supported in non-global zones in S11 releases
2. SMB server/client services are supported in kernel zones in S11 releases
3. NFS client/services are available in non-global zones/kernel zones in S11 releases

Thanks, Cindy

John D Groenveld

unread,
Jul 6, 2015, 2:43:12 PM7/6/15
to
In article <a27afb3e-4eae-4d4d...@googlegroups.com>,
<cindy.sw...@gmail.com> wrote:
>I was indeed confused so I'll clarify:
>
>1. SMB client services are supported in non-global zones in S11 releases
>2. SMB server/client services are supported in kernel zones in S11 releases
>3. NFS client/services are available in non-global zones/kernel zones in
>S11 releases

Has pkg://solaris/service/network/samba been EOLd?

Regardless, Samba 4.2.2 still builds and runs in a S11 NGZ.

John
groe...@acm.org

Casper H.S. Dik

unread,
Jul 6, 2015, 2:56:22 PM7/6/15
to
groe...@cse.psu.edu (John D Groenveld) writes:

>In article <a27afb3e-4eae-4d4d...@googlegroups.com>,
> <cindy.sw...@gmail.com> wrote:
>>I was indeed confused so I'll clarify:
>>
>>1. SMB client services are supported in non-global zones in S11 releases
>>2. SMB server/client services are supported in kernel zones in S11 releases
>>3. NFS client/services are available in non-global zones/kernel zones in
>>S11 releases

>Has pkg://solaris/service/network/samba been EOLd?

It is still part of Solaris. (though it seems we are shipping
samba 3.6.something)

>Regardless, Samba 4.2.2 still builds and runs in a S11 NGZ.

Samba should work regardless as it works directly on the POSIX
file interfaces and not inside the kerenl.

Casper


Andrew Gabriel

unread,
Jul 6, 2015, 3:52:13 PM7/6/15
to
In article <559acf52$0$2840$e4fe...@news2.news.xs4all.nl>,
The samba shipped with Solaris was modified to store Windows ACLs
properly in ZFS ACLs when running on ZFS, rather than trying to
squash them into more restrictive unix/posix file permissions.

Michael Weis

unread,
Jul 9, 2015, 1:29:48 AM7/9/15
to
Hi all,


thank you all for your answers. Sorry for my late response, currently
I'm at another customer site and have only limited access to the group.

I will answer as soon as possible to your questions and hints.

Regards,

Michael

sjaga...@cps.edu

unread,
May 26, 2017, 11:08:26 AM5/26/17
to
Hi

Can anyone give me the steps to configure SMB client on Solaris 11. I have a windows share on windows machines and they have given permission to "everyone" in Linux we have used /etc/.smbcred file to add a win user and map it with unix local user. But could not figure out how to do that with SOlaris and which file we need to provide the user and password. And do we need to use the idmap to map winuser and unix user? what would be the simple way..Help me out.

sjaga...@cps.edu

unread,
May 26, 2017, 1:48:31 PM5/26/17
to
++++++++++++++====

Hi
I am able to configure SMB client on the Guest DOmain - Global zone, but how to configure it on the NON Global zones.

ARZ Lab

unread,
Jul 12, 2017, 4:12:58 AM7/12/17
to
I run Samba 3 from NGZ in Solaris 11.3. No need to share any filesystems - smbd just reads smb.conf and "exports" them
As Casper mentioned, there should be no difference with third-party Samba 4.x package in this sense (maybe there is a precompiled one on sunfreeware.com).
ZFS filesystems that I want to expose via smbd, are just loopback-mounted at booting the zone, before starting smbd.
0 new messages