If you need to export ZFS volumes through CIFS, follow this simple step by step procedure.
Step 1 : install the packages
(This step is optional if you already have them installed on the machine)
kattoo@backup3:~$ pfexec pkg install SUNWsmbskr
DOWNLOAD PKGS FILES XFER (MB)
Completed 2/2 35/35 2.0/2.0
PHASE ACTIONS
Install Phase 90/90
At this point, you’ll need to perform a reboot (if you can’t afford that, check in the references for a link to the full procedure).
Step 2 : Join a WORKGROUP
kattoo@backup3:~$ pfexec smbadm join -w SAKANA
After joining SAKANA the smb service will be restarted automatically.
Would you like to continue? [no]: yes
Successfully joined SAKANA
kattoo@backup3:~$
Step 3 : Set passwords for users who will access the shares
Add the following line into /etc/pam.conf :
kattoo@backup3:~$ grep smb /etc/pam.conf
other password required pam_smb_passwd.so.1 nowarn
Now reset the passwords for the users who will be access the shares :
kattoo@backup3:~$ pfexec passwd kattoo
New Password:
Re-enter new Password:
passwd: password successfully changed for kattoo
Step 4 : Share the filesystems
You can then share any zfs filesystem with the following :
kattoo@backup3:~$ pfexec zfs set sharesmb=on backup
To check what is exported, you can do this :
kattoo@backup3:~$ sharemgr show -pv
default nfs=()
zfs
zfs/backup smb=()
backup=/backup
backup_roadrunner=/backup/roadrunner
backup_thekla=/backup/thekla
zfs/storage smb=()
storage=/storage
kattoo@backup3:~$
Here, the backup_roadrunner and backup_thekla were automatically exported because the property sharesmb was inherited from backup.
References :