ZFS: Difference between revisions

m Undo revision 21396 by Musicmatze (talk) (Not a typo. 'made' is correct here.)
Tag: Undo
Tie-ling (talk | contribs)
m fix error
 
(6 intermediate revisions by 2 users not shown)
Line 65: Line 65:
== Guides ==
== Guides ==


=== OpenZFS Documentation for installing ===
=== Root on ZFS with disko ===
{{warning|This guide is not endorsed by NixOS and some features like immutable root do not have upstream support and could break on updates. If an issue arises while following this guide, please consult the guides support channels.}}


One guide for a NixOS installation with ZFS is maintained at [https://openzfs.github.io/openzfs-docs/Getting%20Started/NixOS/ OpenZFS Documentation (''Getting Started'' for ''NixOS'')]
disko[https://github.com/nix-community/disko/blob/master/example/zfs.nix] can partition disks declaratively and handle mount points at install time.


It is about:
Don't follow the Root on ZFS guide found in OpenZFS documentation. It was abandoned and has not been updated in years. See commit log for the openzfs-docs repo for details.
* [https://openzfs.github.io/openzfs-docs/Getting%20Started/NixOS/index.html#installation Enabling ZFS on an existing NixOS installation]
* [https://openzfs.github.io/openzfs-docs/Getting%20Started/NixOS/#root-on-zfs (Installing NixOS with) Root on ZFS].
 
It is not about:
* Giving understandable, easy to follow instructions which are close to the standard installation guide
* Integrating ZFS into your existing config


=== Simple NixOS ZFS on root installation ===
=== Simple NixOS ZFS on root installation ===
Line 441: Line 434:
</syntaxhighlight>
</syntaxhighlight>
Only this line is needed. Configure firewall if necessary, as described in [[NFS]] article.
Only this line is needed. Configure firewall if necessary, as described in [[NFS]] article.
{{warning|<code>zfs share</code> or <code>sharenfs</code> does not work if the <code>mountpoint</code> is set to <code>legacy</code> (or <code>none</code>, of course). I was unable to find a source for this behaviour, but I was stuck on the problem for days, until I realized the problem.  ::Reply: sharenfs controlls what
is written into <code>/etc/exports</code>.  If ZFS does not know the mountpoint, as is the case in
mountpoint legacy or none, the contents of <code>/etc/exports</code> would be wrong}}


Then, set <code>sharenfs</code> property:
Then, set <code>sharenfs</code> property:
Line 467: Line 464:
       tls_trust_file = "/etc/ssl/certs/ca-certificates.crt";
       tls_trust_file = "/etc/ssl/certs/ca-certificates.crt";
       tls = "on";
       tls = "on";
       auth = "login";
       auth = "plain";
       tls_starttls = "off";
       tls_starttls = "off";
     };
     };