6 Replies Latest reply on May 9, 2014 11:19 PM by Cindys-Oracle

    Share with samba a ZFS FS in a zone


      Hi all,


      Here is my configuration :


      root@sfhvsun10p:~# zoneadm list -iv

        ID NAME             STATUS     PATH                           BRAND    IP

         0 global           running    /                              solaris  shared

         1 sfhvrep10        running    /zones/sfhvrep10               solaris  excl


      I want to share /toolbox with samba on my zone.


      In my zone, I have the following output :


      root@sfhvrep10:~# zfs set share=name=toolbox,path=/toolbox,prot=smb sfhvrep10_data/toolbox

      error validating share: SMB: not supported in non-global zone


      In sfhvsun10p, which managed sfhvrep10, I have the following output :


      root@sfhvsun10p:~# zfs set share=name=toolbox,path=/zones/sfhvrep10/root/toolbox,prot=smb sfhvrep10_data/toolbox

      permission denied: shares managed from non-global zone.


      So how can I share my fs ?


        • 1. Re: Share with samba a ZFS FS in a zone
          Pascal Kreyer-Oracle

          Are you looking on this page if you found a solution and check for the limitations ? Sharing and Unsharing ZFS File Systems - Oracle Solaris Administration: ZFS File Systems

          • 2. Re: Share with samba a ZFS FS in a zone

            I was reading this page, but I don't understand why it doesn't work.


            Here is the configuration of my dataset :


            root@sfhvsun10p:~# zfs get all sfhvrep10_data/toolbox

            NAME                    PROPERTY              VALUE                          SOURCE

            sfhvrep10_data/toolbox  aclinherit            restricted                     default

            sfhvrep10_data/toolbox  aclmode               discard                        default

            sfhvrep10_data/toolbox  atime                 on                             default

            sfhvrep10_data/toolbox  available             18.5G                          -

            sfhvrep10_data/toolbox  canmount              on                             default

            sfhvrep10_data/toolbox  casesensitivity       mixed                          -

            sfhvrep10_data/toolbox  checksum              on                             default

            sfhvrep10_data/toolbox  compression           off                            default

            sfhvrep10_data/toolbox  compressratio         1.00x                          -

            sfhvrep10_data/toolbox  copies                1                              default

            sfhvrep10_data/toolbox  creation              Wed May 15 15:19 2013          -

            sfhvrep10_data/toolbox  dedup                 off                            default

            sfhvrep10_data/toolbox  devices               off                            temporary

            sfhvrep10_data/toolbox  encryption            off                            -

            sfhvrep10_data/toolbox  exec                  on                             default

            sfhvrep10_data/toolbox  keychangedate         -                              default

            sfhvrep10_data/toolbox  keysource             none                           default

            sfhvrep10_data/toolbox  keystatus             none                           -

            sfhvrep10_data/toolbox  logbias               latency                        default

            sfhvrep10_data/toolbox  mlslabel              none                           -

            sfhvrep10_data/toolbox  mounted               yes                            -

            sfhvrep10_data/toolbox  mountpoint            /zones/sfhvrep10/root/toolbox  local

            sfhvrep10_data/toolbox  multilevel            off                            -

            sfhvrep10_data/toolbox  nbmand                off                            default

            sfhvrep10_data/toolbox  normalization         none                           -

            sfhvrep10_data/toolbox  primarycache          all                            default

            sfhvrep10_data/toolbox  quota                 none                           default

            sfhvrep10_data/toolbox  readonly              off                            default

            sfhvrep10_data/toolbox  recordsize            128K                           default

            sfhvrep10_data/toolbox  referenced            287M                           -

            sfhvrep10_data/toolbox  refquota              none                           default

            sfhvrep10_data/toolbox  refreservation        none                           default

            sfhvrep10_data/toolbox  rekeydate             -                              default

            sfhvrep10_data/toolbox  reservation           none                           default

            sfhvrep10_data/toolbox  rstchown              on                             default

            sfhvrep10_data/toolbox  secondarycache        all                            default

            sfhvrep10_data/toolbox  setuid                on                             default

            sfhvrep10_data/toolbox  shadow                none                           -

            sfhvrep10_data/toolbox  share.*               ...                            local

            sfhvrep10_data/toolbox  snapdir               hidden                         default

            sfhvrep10_data/toolbox  sync                  standard                       default

            sfhvrep10_data/toolbox  type                  filesystem                     -

            sfhvrep10_data/toolbox  used                  287M                           -

            sfhvrep10_data/toolbox  usedbychildren        0                              -

            sfhvrep10_data/toolbox  usedbydataset         287M                           -

            sfhvrep10_data/toolbox  usedbyrefreservation  0                              -

            sfhvrep10_data/toolbox  usedbysnapshots       0                              -

            sfhvrep10_data/toolbox  utf8only              off                            -

            sfhvrep10_data/toolbox  version               6                              -

            sfhvrep10_data/toolbox  vscan                 off                            default

            sfhvrep10_data/toolbox  xattr                 on                             default

            sfhvrep10_data/toolbox  zoned                 on                             inherited from sfhvrep10_data


            my ZFS file system's mountpoint property is NOT set to legacy.

            So I should use the new ZFS syntax.

            • 3. Re: Share with samba a ZFS FS in a zone
              Pascal Kreyer-Oracle

              And what is the zone configuration ?

              • 4. Re: Share with samba a ZFS FS in a zone

                Here is the configuration :


                root@sfhvsun10p:~# zonecfg -z sfhvrep10 export

                create -b

                set brand=solaris

                set zonepath=/zones/sfhvrep10

                set autoboot=true

                set ip-type=exclusive

                add anet

                set linkname=net0

                set lower-link=auto

                set allowed-address=

                set configure-allowed-address=true

                set defrouter=

                set link-protection=mac-nospoof

                set mac-address=random

                set vlan-id=3


                add dataset

                set name=sfhvrep10_data


                • 5. Re: Share with samba a ZFS FS in a zone
                  Pascal Kreyer-Oracle

                  A RFE exists for this : 15529309

                  Currently we can only export NFS shares in a non-global zone. Maybe is it possible with a kernel zone available with the next version of Solaris 11 labeled 11.2.

                  But currently, if you want to export it with the SMB/CIFS protocol, then you can either use Samba or you can try to export it directly from the global zone.

                  • 6. Re: Share with samba a ZFS FS in a zone

                    Hi Pechane/Pascal,


                    We have recently clarified the file sharing and over-the-wire protocols that are available and not available in a NGZ. See below.


                    Pascal, you are correct that you can share files over SMB in a kernel zone in S11.2. I just tried it.


                    The Solaris 11.2 beta release is available here:


                    Oracle Solaris 11.2 Beta - Downloads | Oracle Technology Network | Oracle


                    Be sure to check the system requirements first.


                    Thanks, Cindy


                    Non-global zones support the following file sharing services:

                    NFS client
                    NFS server
                    SMB client


                    Non-global zones do not support the following file sharing or over-the-wire
                    protocol services:
                    FC services
                    FCoE services



                    iSCSI initiator
                    iSCSI target



                    SMB server