{"id":1316,"date":"2019-03-05T18:47:21","date_gmt":"2019-03-06T00:47:21","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=1316"},"modified":"2019-03-05T18:47:22","modified_gmt":"2019-03-06T00:47:22","slug":"zfs-on-linux-smb-sharing","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/zfs-on-linux-smb-sharing\/","title":{"rendered":"ZFS on Linux SMB Sharing"},"content":{"rendered":"\n
Having worked on and liked ZFS for a long time I am now using ZFS on my main Linux desktop. I thought it would be nice if I can just turn on SMB sharing using ZFS but after playing with this for a while I gave up. Seems like one person on the Internet said it best just let ZFS take care of the file-system and let Samba take care of SMB sharing. I came to the same conclusion. I am recording some of my notes and commands for my reference maybe someone else find it useful.<\/p>\n\n\n\n
Un-mount the old ext4 partition and create a pool. Of course don't create a pool on a disk you have DATA on!<\/p>\n\n\n
\n# umount \/DATA \n# fdisk -l | grep sd\n# zpool create -m \/DATA DATA \/dev\/sdb1\n# zpool create -f -m \/DATA DATA \/dev\/sdb1\n<\/pre><\/div>\n\n\nTurn sharing on the ZFS way.<\/p>\n\n\n
\n# apt install samba\n# zfs set sharesmb=on DATA\n# pdbedit -a rrosso\n<\/pre><\/div>\n\n\nI get parameter is incorrect from a Windows client. Gave up on this and shared using smb.conf.<\/p>\n\n\n
\n# zfs set sharesmb=off DATA\n# zfs get sharesmb DATA\nNAME PROPERTY VALUE SOURCE\nDATA sharesmb off local\n\n# tail -10 \/etc\/samba\/smb.conf \n[DATA]\npath = \/DATA\npublic = yes\nwritable = yes\ncreate mask = 0775\ndirectory mask = 0775\n\n# systemctl restart smbd\n# net usershare list\n\n# testparm \n{..}\n[DATA]\n\tcreate mask = 0775\n\tdirectory mask = 0775\n\tguest ok = Yes\n\tpath = \/DATA\n\tread only = No\n<\/pre><\/div>\n\n\nNote some commands and locations for troubleshooting.<\/p>\n\n\n
\n# smbstatus \n# testparm\n# cat \/etc\/dfs\/sharetab \n# net usershare list\n# ls \/var\/lib\/samba\/usershares\/\n# cat \/var\/lib\/samba\/usershares\/data \n# pdbedit -L\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"Having worked on and liked ZFS for a long time I am now using ZFS on my main Linux desktop.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1316","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=1316"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1316\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=1316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=1316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=1316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}