{"id":1316,"date":"2025-02-04T14:20:31","date_gmt":"2025-02-04T13:20:31","guid":{"rendered":"https:\/\/marzocchi.net\/wp\/?p=1316"},"modified":"2025-08-29T15:01:28","modified_gmt":"2025-08-29T14:01:28","slug":"omnios-installation-and-basic-setup","status":"publish","type":"post","link":"https:\/\/marzocchi.net\/wp\/2025\/02\/omnios-installation-and-basic-setup\/","title":{"rendered":"OmniOS: Installation and Basic Setup"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">From the CD\/DVD to the working system, no extras<\/h4>\n\n\n\n<p>This article is part of a series focused on the building and setup of a home-NAS based on ZFS and OmniOS. The index is located here:&nbsp;<a href=\"https:\/\/marzocchi.net\/wp\/tag\/omnios\/\" data-type=\"post_tag\" data-id=\"65\">An OmniOS ZFS Fileserver<\/a>.<\/p>\n\n\n\n<p>First of all, this article must be considered always &#8220;in progress&#8221; because I will update it in the future whenever I find a better configuration or better setup commands, especially for the file permissions. As result, you can check&nbsp;<a href=\"http:\/\/www.marzocchi.net\/Olafsen\/Software\/InstallationOfOmniOSAndBasicSetup?action=diff\">the history<\/a>&nbsp;of the article and the date of the latest revision down at the end.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installation and user setup<\/h2>\n\n\n\n<p>At this point I had two SSD disks installed together, but I not yet set as hardware mirror.<\/p>\n\n\n\n<p>I installed OmniOS on the first SSD using the CD\/DVD and an external USB2 DVD-RW drive. Once installed I logged in using the virtual KVM provided by iLO3 (a terrible experience: without license it stops working every 30-60 seconds).<br>Once logged in I added the network interfaces, since they are not set automatically during installation:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$ dladm show-phys\n$ ipadm create-if e1000g0\n$ ipadm show-if\n$ ipadm create-addr\u00a0-T\u00a0static\u00a0-a\u00a010.0.0.5\/8\u00a0e1000g0\/v4\n$ route\u00a0-p\u00a0add default 10.0.0.1\n$\u00a0echo\u00a0'nameserver 8.8.8.8'\u00a0&gt;&gt;\u00a0\/etc\/resolv.conf\n$\u00a0echo\u00a0'nameserver 8.8.4.4'\u00a0&gt;&gt;\u00a0\/etc\/resolv.conf\n$\u00a0cp\u00a0\/etc\/nsswitch.dns\u00a0\/etc\/nsswitch.conf\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">dladm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">show-phys<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ipadm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create-if<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">e1000g0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ipadm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">show-if<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ipadm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create-addr\u00a0-T\u00a0static\u00a0-a\u00a010.0.0.5\/8\u00a0e1000g0\/v4<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">route\u00a0-p\u00a0add<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">default<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">10.0<\/span><span style=\"color: #A3BE8C\">.0.1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0echo\u00a0<\/span><span style=\"color: #88C0D0\">&#39;nameserver 8.8.8.8&#39;<\/span><span style=\"color: #88C0D0\">\u00a0&gt;&gt;\u00a0\/etc\/resolv.conf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0echo\u00a0<\/span><span style=\"color: #88C0D0\">&#39;nameserver 8.8.4.4&#39;<\/span><span style=\"color: #88C0D0\">\u00a0&gt;&gt;\u00a0\/etc\/resolv.conf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0cp\u00a0\/etc\/nsswitch.dns\u00a0\/etc\/nsswitch.conf<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>As DNS I provided the one offered by Google, since they are very fast. A second and equivalent alternative are the ones provided by OpenDNS, also very fast. I didn&#8217;t bother setting up IPv6, it&#8217;s not needed on my local network (for the time being).<\/p>\n\n\n\n<p>Since I had already set up my ZFS data disks using OpenIndiana I simply imported them using:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0zfs import\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">import<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>and then I recreated users and groups as I had in the old system as explained further below.<\/p>\n\n\n\n<p>In case I had no disks, I would have created the ZFS datasets this way:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$ format\u00a0-e\u00a0&lt;\u00a0\/dev\/null\n$\u00a0man\u00a0zpool\n$ zpool create\u00a0-O\u00a0casesensitivity=mixed\u00a0-O\u00a0utf8only=on\u00a0-O\u00a0normalization=formD\u00a0-O\u00a0nbmand=off tank mirror vdev0a vdev0b mirror vdev1a vdev1b\n$ zfs\u00a0set\u00a0compression=lz4 tank\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">format\u00a0-e\u00a0<\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #A3BE8C\">\u00a0\/dev\/null<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0man\u00a0zpool<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zpool<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create\u00a0-O\u00a0casesensitivity=mixed\u00a0-O\u00a0utf8only=on\u00a0-O\u00a0normalization=formD\u00a0-O\u00a0nbmand=off<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">tank<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">mirror<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">vdev0a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">vdev0b<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">mirror<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">vdev1a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">vdev1b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zfs\u00a0set\u00a0compression=lz4<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">tank<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>where &#8220;format -e&#8221; provides a list of disk device names available on the system (stop immediately with Control-C after seeing the list), &#8220;man zpool&#8221; is useful to check whether my commands are correct (I cannot verify them right now), then the next command &#8220;zpool create &#8230;&#8221; creates the pool named &#8220;tank&#8221; out of 4 hard disks: vdev0a and vdev0b are mirrored, vdev1a and vdev1b are mirrored and the two mirrors are striped. As result, a RAID10 is created.<br>Concerning the options for zpool, check by yourself. Some of them won&#8217;t be editable later and have to be set now, some others can be edited later, but they will be inherited and the firther commands are simplified.<br>I decided to use &#8220;nbmand=off&#8221; because, from what I understood, it is useful when both AFP and SMB are being used. In my case I&#8217;m using only SMB at the time being.<br>I activated &#8220;compression=lz4&#8221; because it offers some compression and better performances than uncompressed data and it simply has no real disadvantages.<\/p>\n\n\n\n<p>In my case I had the two SSD, but the pool was already there thanks to the installation and I had to add the second disk. I followed the instructions from&nbsp;<a href=\"https:\/\/constantin.glez.de\/posts\/2011-03-14-how-to-set-up-a-zfs-root-pool-mirror-in-oracle-solaris-11-express\/\">How to Set Up a ZFS Root Pool Mirror in Oracle Solaris 11 Express<\/a>. These the steps but check them accurately before executing them, in case I have typos.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$ cfgadm\u00a0-s\u00a0&quot;select=type(disk)&quot;\nAp_Id \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0Type \u00a0 \u00a0 \u00a0 \u00a0 Receptacle \u00a0 Occupant \u00a0 \u00a0 Condition\nsata0\/0::dsk\/c14t0d0p0 \u00a0 \u00a0 \u00a0 \u00a0 disk \u00a0 \u00a0 \u00a0 \u00a0 connected \u00a0 \u00a0configured \u00a0 ok\nsata0\/1::dsk\/c14t1d0p0 \u00a0 \u00a0 \u00a0 \u00a0 disk \u00a0 \u00a0 \u00a0 \u00a0 connected \u00a0 \u00a0configured \u00a0 ok\n$ zpool status rpool\n\u00a0 pool: rpool\n\u00a0state: ONLINE\n\u00a0 scan: none requested\nconfig:\n\n\u00a0 \u00a0 \u00a0 \u00a0 NAME \u00a0 \u00a0 \u00a0 \u00a0STATE \u00a0 \u00a0 READ WRITE CKSUM\n\u00a0 \u00a0 \u00a0 \u00a0 rpool \u00a0 \u00a0 \u00a0 ONLINE \u00a0 \u00a0 \u00a0\u00a00\u00a0\u00a00\u00a0\u00a00\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 c14t0d0p0 ONLINE \u00a0 \u00a0 \u00a0\u00a00\u00a0\u00a00\u00a0\u00a00\n\n$\u00a0fdisk\u00a0-W\u00a0- c14t0d0p0\n$\u00a0fdisk\u00a0-W\u00a0- c14t1d0p0\n$\u00a0fdisk\u00a0-A\u00a0191:128:199:8:0:254:63:1023:12544:104855296\u00a0c14t1d0p0\n\n$ prtvtoc\u00a0\/dev\/rdsk\/c14t0d0s0\u00a0|\u00a0fmthard\u00a0-s\u00a0-\u00a0\/dev\/rdsk\/c14t1d0s0\n\n$ zpool attach\u00a0-f\u00a0rpool c14t0d0s0 c14t1d0s0\n$ zpool status\n\n$ installgrub\u00a0\/boot\/grub\/stage1\u00a0\/boot\/grub\/stage2\u00a0\/dev\/rdsk\/c14t1d0s0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">cfgadm\u00a0-s\u00a0<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">select=type(disk)<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">Ap_Id<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0Type<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Receptacle<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Occupant<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Condition<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">sata0\/0::dsk\/c14t0d0p0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">disk<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">connected<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0configured<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ok<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">sata0\/1::dsk\/c14t1d0p0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">disk<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">connected<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0configured<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ok<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zpool<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">status<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">rpool<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">pool:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">rpool<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">\u00a0state:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ONLINE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">scan:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">none<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">requested<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">config:<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">NAME<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0STATE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">READ<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">WRITE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">CKSUM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">rpool<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ONLINE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0\u00a00\u00a0\u00a00\u00a0\u00a00<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">c14t0d0p0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">ONLINE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\u00a0\u00a00\u00a0\u00a00\u00a0\u00a00<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0fdisk\u00a0-W\u00a0-<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">c14t0d0p0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0fdisk\u00a0-W\u00a0-<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">c14t1d0p0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0fdisk\u00a0-A\u00a0191:128:199:8:0:254:63:1023:12544:104855296\u00a0c14t1d0p0<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">prtvtoc\u00a0\/dev\/rdsk\/c14t0d0s0\u00a0<\/span><span style=\"color: #81A1C1\">|<\/span><span style=\"color: #88C0D0\">\u00a0fmthard\u00a0-s\u00a0-\u00a0\/dev\/rdsk\/c14t1d0s0<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zpool<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">attach\u00a0-f\u00a0rpool<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">c14t0d0s0<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">c14t1d0s0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zpool<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">status<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">installgrub\u00a0\/boot\/grub\/stage1\u00a0\/boot\/grub\/stage2\u00a0\/dev\/rdsk\/c14t1d0s0<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>The first step is to check device names to be used later; the second step checks which one is already in use; the third step applies the Solaris partition configuration to the second disk; the fourth step copies SMI labels (I got some warnings here); the fifth step adds the second disk to the pool as mirror; the last step installs the bootloader on the second disk too.<br>A similar procedure can be found on&nbsp;<a href=\"http:\/\/www.1stbyte.com\/2009\/08\/08\/opensolaris-zfs-rpool-mirror\/\">OpenSolaris ZFS rpool mirror<\/a>&nbsp;and&nbsp;<a href=\"http:\/\/wiki.openindiana.org\/oi\/2.1+Post-installation\">OpenIndiana &#8211; How to mirror the root disk<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Define a strategy for the folder permissions<\/h3>\n\n\n\n<p>I used again the structure suggested by&nbsp;<a href=\"http:\/\/breden.org.uk\/2009\/05\/10\/home-fileserver-zfs-file-systems\/\">http:\/\/breden.org.uk\/2009\/05\/10\/home-fileserver-zfs-file-systems\/<\/a>, that means common folders are placed in the root of the pool and are represented by a separate dataset, and all the users&#8217; homes are located in &#8220;\/tank\/home&#8221;. Each shared folder belongs to root and to a different group, so that I can define read\/write permissions by adding and removing the users to the different groups. The media folders have a more complex setup, described later.<\/p>\n\n\n\n<p>The commands used to create the datasets are:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$ zfs create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=passthrough tank\/home\n$ zfs create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=passthrough tank\/home\/olaf\n$ zfs create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=discard tank\/media\n$ zfs create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=passthrough tank\/media\/Music\n$ zfs create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=passthrough tank\/Temporary\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=passthrough<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">tank\/home<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=passthrough<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">tank\/home\/olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=discard<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">tank\/media<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=passthrough<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">tank\/media\/Music<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create\u00a0-o\u00a0aclinherit=passthrough-x\u00a0-o\u00a0aclmode=passthrough<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">tank\/Temporary<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>I then proceeded with the creation of the groups:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$ groupadd\u00a0-g\u00a0501\u00a0olaf\n$ groupadd\u00a0-g\u00a0509\u00a0music\n$ groupadd\u00a0-g\u00a0505\u00a0temps\n$ groupadd\u00a0-g\u00a0512\u00a0musicr\n\n$\u00a0chgrp\u00a0olaf\u00a0\/tank\/home\/olaf\n$\u00a0chgrp\u00a0music\u00a0\/tank\/media\/Music\n$\u00a0chgrp\u00a0temps\u00a0\/tank\/Temporary\n\n$\u00a0chmod\u00a0g+rwx\u00a0\/tank\/home\/olaf\n$\u00a0chmod\u00a0g+rwx\u00a0\/tank\/Temporary\n$\u00a0chmod\u00a0g+rwx\u00a0\/tank\/media\/Music\n$\u00a0chmod\u00a0g+s\u00a0\/tank\/media\/Music\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">groupadd\u00a0-g\u00a0501\u00a0olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">groupadd\u00a0-g\u00a0509\u00a0music<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">groupadd\u00a0-g\u00a0505\u00a0temps<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">groupadd\u00a0-g\u00a0512\u00a0musicr<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chgrp\u00a0olaf\u00a0\/tank\/home\/olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chgrp\u00a0music\u00a0\/tank\/media\/Music<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chgrp\u00a0temps\u00a0\/tank\/Temporary<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chmod\u00a0g+rwx\u00a0\/tank\/home\/olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chmod\u00a0g+rwx\u00a0\/tank\/Temporary<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chmod\u00a0g+rwx\u00a0\/tank\/media\/Music<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chmod\u00a0g+s\u00a0\/tank\/media\/Music<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>and I finally added a real user:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0mkdir\u00a0\/export\/home\/olaf\n$ zfs create rpool\/export\/home\/olaf\n$ useradd\u00a0-u\u00a0501\u00a0-g\u00a0olaf\u00a0-s\u00a0\/bin\/bash\u00a0-d\u00a0\/export\/home\/olaf\u00a0-c\u00a0&quot;Olaf Marzocchi&quot;\u00a0-m\u00a0olaf\n$ usermod\u00a0-G\u00a0music,temps olaf\n$\u00a0chown\u00a0olaf:olaf\u00a0\/export\/home\/olaf\n$\u00a0chown\u00a0olaf\u00a0\/tank\/home\/olaf\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0mkdir\u00a0\/export\/home\/olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">rpool\/export\/home\/olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">useradd\u00a0-u\u00a0501\u00a0-g\u00a0olaf\u00a0-s\u00a0\/bin\/bash\u00a0-d\u00a0\/export\/home\/olaf\u00a0-c\u00a0<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Olaf Marzocchi<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">\u00a0-m\u00a0olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">usermod\u00a0-G\u00a0music,temps<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chown\u00a0olaf:olaf\u00a0\/export\/home\/olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chown\u00a0olaf\u00a0\/tank\/home\/olaf<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>And then, in order to be able to use the &#8220;pfexec&#8221; command that gives specific permissions (administrator or root, in my case) without the need of issuing &#8220;su&#8221; or &#8220;sudo&#8221;, I issued:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0usermod\u00a0-P\u00a0'Primary Administrator'\u00a0olaf\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0usermod\u00a0-P\u00a0<\/span><span style=\"color: #88C0D0\">&#39;Primary Administrator&#39;<\/span><span style=\"color: #88C0D0\">\u00a0olaf<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>At this point I only needed SMB shares, so I pasted &#8220;other password required pam_smb_passwd.so.1 nowarn&#8221; at the end of pam.conf and I executed:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0passwd\u00a0olaf\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0passwd\u00a0olaf<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>to be able to use SMB to share data: SMB uses a different password so I had to reset the user password. What is left is the settings for the specific shares. On each dataset I executed:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0zfs\u00a0<strong&gt;set<\/strong&gt;\u00a0sharesmb=on dataset\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0zfs\u00a0&lt;strong&gt;set&lt;\/strong&gt;\u00a0sharesmb<\/span><span style=\"color: #D8DEE9FF\">=on <\/span><span style=\"color: #A3BE8C\">dataset<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>to effectively enable sharing. In case a different share name is desired, the line becomes:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0zfs\u00a0<strong&gt;set<\/strong&gt;\u00a0sharesmb=name=desired_share_name dataset\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0zfs\u00a0&lt;strong&gt;set&lt;\/strong&gt;\u00a0sharesmb<\/span><span style=\"color: #D8DEE9FF\">=name=desired_share_name <\/span><span style=\"color: #A3BE8C\">dataset<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>At this point I updated the system and rebooted:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$ pkg update\u00a0-nv\n$ pkg update\n$ reboot\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">pkg<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">update\u00a0-nv<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">pkg<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">update<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">reboot<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Concerning the media folders (Music) I wanted a more exotic configuration:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>some users must be able to read and add files (the users that correspond to a real person)<\/li>\n\n\n\n<li>some users must only have read rights, no permission to add, delete or modify files (these users are the media players on tablets and televisions)<\/li>\n\n\n\n<li>my user should have full power<\/li>\n\n\n\n<li>everyone else should not have any access.<\/li>\n<\/ul>\n\n\n\n<p>The solution is to use (non-trivial) ACLs and for this goal I created the musicr user group: read-only.<br>To apply the permissions, I executed:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0chmod\u00a0-R\u00a0A=user:olaf:full_set:fd:allow,owner@:full_set: fd:allow, group@:read_set\/add_file\/add_subdirectory\/execute\u00a0\/synchronize:fd:allow, group:musicr:read_set\/execute\/synchronize:fd:allow, everyone@:full_set:fd:deny\u00a0\/tank\/media\/Music\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chmod\u00a0-R\u00a0A<\/span><span style=\"color: #D8DEE9FF\">=user:olaf:full_set:fd:allow,owner@:full_set: <\/span><span style=\"color: #A3BE8C\">fd:allow,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">group@:read_set\/add_file\/add_subdirectory\/execute\u00a0\/synchronize:fd:allow,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">group:musicr:read_set\/execute\/synchronize:fd:allow,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">everyone@:full_set:fd:deny\u00a0\/tank\/media\/Music<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This way the restricted users have only read rights (read_set\/execute\/synchronize:fd:allow), normal users can create and read files (read_set\/add_file \/add_subdirectory\/execute \/synchronize:fd:allow), the file owner and I have full power (full_set:fd:allow), while everyone else has nothing (full_set:fd:deny). Since only the owner has the right to delete files, I avoid the risk of having someone deletes other people&#8217;s data.<br>Important note: the synchronize attribute should not be implemented, but it is translated to the NTFS equivalent when the file is shared via CIFS and has the following effect (from&nbsp;<a href=\"http:\/\/www.ntfs.com\/ntfs-permissions-file-advanced.htm\">ntfs.com<\/a>): &#8220;Allows or denies different threads to wait on the handle for the file or folder and synchronize with another thread that may signal it. This permission applies only to multithreaded, multiprocessing programs&#8221;.<br>I tested it myself and, depending on the application (MX Player, Oplayer, MplayerX, WD TV Live) and platform (OS X, Android, iOS, WD TV Live) the file could or could not be played\/read. With the attribute set, no problems at all.<\/p>\n\n\n\n<p>I also created the WD TV Live user:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0mkdir\u00a0\/var\/WDTVlive\n$ groupadd\u00a0-g\u00a0511\u00a0wdtvlive\n$\u00a0less\u00a0\/etc\/group\n$ useradd\u00a0-g\u00a0511\u00a0-G\u00a0musicr,temps\u00a0-u\u00a0511\u00a0-d\u00a0\/var\/WDTVlive\u00a0-s\u00a0\/bin\/false\u00a0wdtvlive\n$\u00a0passwd\u00a0wdtvlive\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0mkdir\u00a0\/var\/WDTVlive<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">groupadd\u00a0-g\u00a0511\u00a0wdtvlive<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0less\u00a0\/etc\/group<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">useradd\u00a0-g\u00a0511\u00a0-G\u00a0musicr,temps\u00a0-u\u00a0511\u00a0-d\u00a0\/var\/WDTVlive\u00a0-s\u00a0\/bin\/<\/span><span style=\"color: #81A1C1\">false<\/span><span style=\"color: #A3BE8C\">\u00a0wdtvlive<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0passwd\u00a0wdtvlive<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Of course, do not apply these instructions to production machines without checking each command line by yourself.<\/p>\n\n\n\n<p>If you have questions or comments, please drop me an email. I will answer and eventually update this page.<\/p>\n\n\n\n<p>Further information are also available on the&nbsp;<a href=\"http:\/\/omnios.omniti.com\/wiki.php\/GeneralAdministration\">OmniOS Admin Guide<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Update (2015-10-10)<\/h3>\n\n\n\n<p>With the previous configuration, the home folder did not have any ACL set beyond the standard ones (there is a specific term for these, I forgot it), and that always worked fine because I was using Netatalk, that relies on UNIX permissions.<\/p>\n\n\n\n<p>Since I switched to SMB (kernel CIFS) for file sharing, ACL were needed: SMB users appear as &#8220;user[user]:[permissions]&#8221;, and SMB groups appear as &#8220;group:[numerical code]:[permissions]&#8221;. I added the required ACLs and I set them to be inherited, but then dovecot was not able to properly access mail, located in \/tank\/home\/olaf\/Maildir. The issue was specifically with lock files, and I was getting a lot of errors like these about &#8220;rename&#8221; and &#8220;unlink&#8221; and permissions denied.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"dovecot: [ID 583609 mail.error] imap(olaf): Error: rename(\/tank\/home\/olaf\/Maildir\/.Mailing Lists.Social.Facebook\/dovecot-uidlist.tmp, \/tank\/home\/olaf\/Maildir\/.Mailing Lists.Social.Facebook\/dovecot-uidlist) failed: Permission denied\ndovecot: [ID 583609 mail.error] imap(olaf): Error: unlink(\/tank\/home\/olaf\/Maildir\/.Mailing Lists.Social.Facebook\/dovecot-uidlist.tmp) failed: Permission denied\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">dovecot:<\/span><span style=\"color: #D8DEE9FF\"> [ID <\/span><span style=\"color: #B48EAD\">583609<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">mail.error]<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">imap<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">olaf<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #A3BE8C\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Error:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">rename<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">\/tank\/home\/olaf\/Maildir\/.Mailing<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Lists.Social.Facebook\/dovecot-uidlist.tmp,<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">\/tank\/home\/olaf\/Maildir\/.Mailing<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Lists.Social.Facebook\/dovecot-uidlist<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">failed:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Permission<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">denied<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">dovecot:<\/span><span style=\"color: #D8DEE9FF\"> [ID <\/span><span style=\"color: #B48EAD\">583609<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">mail.error]<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">imap<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">olaf<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #A3BE8C\">:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Error:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">unlink<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">\/tank\/home\/olaf\/Maildir\/.Mailing<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Lists.Social.Facebook\/dovecot-uidlist.tmp<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">failed:<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">Permission<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">denied<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>At the end I made another ZFS dataset with standard settings and permissions and now it works again.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$ zfs create\u00a0-o\u00a0compression=on tank\/mail\n$\u00a0chgrp\u00a0mail\u00a0\/tank\/mail\n$\u00a0mkdir\u00a0\/tank\/mail\/olaf\n$\u00a0mv\u00a0\/tank\/home\/olaf\/Maildir\u00a0\/tank\/mail\/olaf\/\n$\u00a0chown\u00a0-R\u00a0olaf:olaf\u00a0\/tank\/mail\/olaf\n$\u00a0find\u00a0Maildir\u00a0-type\u00a0d\u00a0-exec\u00a0chmod\u00a0700\u00a0{}\u00a0\\;\n$\u00a0find\u00a0Maildir\u00a0-type\u00a0f\u00a0-exec\u00a0chmod\u00a0600\u00a0{}\u00a0\\;\n$ svcadm\u00a0enable\u00a0dovecot\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create\u00a0-o\u00a0compression=on<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">tank\/mail<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chgrp\u00a0mail\u00a0\/tank\/mail<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0mkdir\u00a0\/tank\/mail\/olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0mv\u00a0\/tank\/home\/olaf\/Maildir\u00a0\/tank\/mail\/olaf\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0chown\u00a0-R\u00a0olaf:olaf\u00a0\/tank\/mail\/olaf<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0find\u00a0Maildir\u00a0-type\u00a0d\u00a0-exec\u00a0chmod\u00a0700\u00a0<\/span><span style=\"color: #D8DEE9FF\">{}<\/span><span style=\"color: #88C0D0\">\u00a0\\<\/span><span style=\"color: #D8DEE9FF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0find\u00a0Maildir\u00a0-type\u00a0f\u00a0-exec\u00a0chmod\u00a0600\u00a0<\/span><span style=\"color: #D8DEE9FF\">{}<\/span><span style=\"color: #88C0D0\">\u00a0\\<\/span><span style=\"color: #D8DEE9FF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">$<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">svcadm\u00a0enable\u00a0dovecot<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Update (2016-06-12)<\/h3>\n\n\n\n<p>With OmniOS r151018 SMBv2 has become available. This gives much better performances and lower CPU requirements on the clients, so I installed it.<\/p>\n\n\n\n<p>I found that the server did not appear anymore in the network servers shown by Windows, and that the addresses &#8220;.local&#8221; like &#8220;OmniOS.local:9091&#8221; (that would be the TransmissionBT client) also didn&#8217;t work anymore. The source of the problem is the lack of NetBios in the default configuration of the new release. It can be solved with<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"$\u00a0pfexec sharectl\u00a0<strong&gt;set<\/strong&gt;\u00a0-p\u00a0netbios_enable=<strong&gt;true<\/strong&gt;\u00a0smb\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">$\u00a0pfexec<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">sharectl\u00a0<\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #A3BE8C\">stron<\/span><span style=\"color: #D8DEE9FF\">g<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #A3BE8C\">set<\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #A3BE8C\">\/stron<\/span><span style=\"color: #D8DEE9FF\">g<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #A3BE8C\">\u00a0-p\u00a0netbios_enable=<\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #A3BE8C\">stron<\/span><span style=\"color: #D8DEE9FF\">g<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #81A1C1\">true<\/span><span style=\"color: #81A1C1\">&lt;<\/span><span style=\"color: #A3BE8C\">\/stron<\/span><span style=\"color: #D8DEE9FF\">g<\/span><span style=\"color: #81A1C1\">&gt;<\/span><span style=\"color: #A3BE8C\">\u00a0smb<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>I also found that some folders could not be read anymore. It turned out it was my mistake due to a misunderstanding of the way ACLs work.<\/p>\n\n\n\n<p>The solution was to remove &#8220;everyone@:full_set:fd:deny&#8221; from the set of permissions granted to the folders.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Update 2018-03-31<\/h3>\n\n\n\n<p>During a complete reinstall of OmniOS, with datasets ready and so on, the creation of the user, after the groups are ready, was performed like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"zfs create rpool\/export\nzfs\u00a0set\u00a0mountpoint=\/export\u00a0rpool\/export\nzfs create rpool\/export\/home\nuseradd\u00a0-u\u00a0501\u00a0-g\u00a0olaf\u00a0-s\u00a0\/bin\/bash\u00a0-d\u00a0\/export\/home\/olaf\u00a0-c\u00a0&quot;Olaf Marzocchi&quot;\u00a0-m\u00a0olaf\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">rpool\/export<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">zfs\u00a0set\u00a0mountpoint<\/span><span style=\"color: #D8DEE9FF\">=\/export\u00a0rpool\/export<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">zfs<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">create<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">rpool\/export\/home<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">useradd\u00a0-u\u00a0501\u00a0-g\u00a0olaf\u00a0-s\u00a0\/bin\/bash\u00a0-d\u00a0\/export\/home\/olaf\u00a0-c\u00a0<\/span><span style=\"color: #88C0D0\">&quot;Olaf Marzocchi&quot;<\/span><span style=\"color: #88C0D0\">\u00a0-m\u00a0olaf<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>First revision: 2013-09-24.<br>Last revision: 2018-04-02.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>From the CD\/DVD to the working system, no extras This article is part of a series focused on the building and setup of a home-NAS based on ZFS and OmniOS. The index is located here:&nbsp;An OmniOS ZFS Fileserver. First of all, this article must be considered always &#8220;in progress&#8221; because I will update it in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[67,65,66],"class_list":["post-1316","post","type-post","status-publish","format-standard","hentry","category-software","tag-home-server","tag-omnios","tag-zfs"],"_links":{"self":[{"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/posts\/1316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/comments?post=1316"}],"version-history":[{"count":3,"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/posts\/1316\/revisions"}],"predecessor-version":[{"id":1570,"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/posts\/1316\/revisions\/1570"}],"wp:attachment":[{"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/media?parent=1316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/categories?post=1316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marzocchi.net\/wp\/wp-json\/wp\/v2\/tags?post=1316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}