ZFS: Difference between revisions
imported>Pmarreck Add how to change runtime zfs tuning options via modprobe config |
imported>Ryantm No edit summary |
||
Line 11: | Line 11: | ||
Common ZFS installation guides are now maintained at [https://openzfs.github.io/openzfs-docs/Getting%20Started/NixOS/index.html OpenZFS Documentation] website. Visit there for details and if an issue arises, submit an issue or pull request. | Common ZFS installation guides are now maintained at [https://openzfs.github.io/openzfs-docs/Getting%20Started/NixOS/index.html OpenZFS Documentation] website. Visit there for details and if an issue arises, submit an issue or pull request. | ||
==Importing on boot== | |||
If you create a zpool, it will not be imported on the next boot unless you either add a fileSystems entry: | |||
<syntaxhighlight lang="nix"> | |||
## In /etc/nixos/configuration.nix: | |||
fileSystems."/mount/point" = { | |||
device = "zpool_name"; | |||
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ]; | |||
}; | |||
</syntaxhighlight> | |||
or add the zpool name to <syntaxhighlight lang="nix" inline>boot.zfs.extraPools</syntaxhighlight> and set the mount point in zfs: | |||
<syntaxhighlight lang="nix"> | |||
## In /etc/nixos/configuration.nix: | |||
boot.zfs.extraPools = [ "zpool_name"]; | |||
</syntaxhighlight> | |||
<syntaxhighlight> | |||
# zfs set canmount=on zpool_name | |||
# zfs set mountpoint=/mount/point zpool_name | |||
</syntaxhighlight> | |||
== Root on ZFS == | == Root on ZFS == |