ZFS: Difference between revisions

imported>Vater
No edit summary
imported>Artturin
remove unneeded info Undo revision 6819 by Vater
Line 1: Line 1:
'''[https://openzfs.org/ ZFS]''' ([[wikipedia:en:ZFS]]), also known as '''OpenZFS''' ([[wikipedia:en:OpenZFS]]), is a software for a file system[[category:file system]].
[[NixOS]] has native support for ZFS ([[wikipedia:ZFS]]). It uses the code from the [http://zfsonlinux.org/ ZFS on Linux project], including kernel modules and userspace utilities. The installation isos also come with zfs.
<!--
 
[[ZFS]] is not part of the manual.[[category:manual]]<ref>https://nixos.org/manual/nixos/stable/index.html#ch-file-systems</ref>
-->
 
[[ZFS]] is a package[[category:package]].<ref>https://search.nixos.org/packages?type=packages&query=zfs</ref>.
 
[[ZFS]] is a service[[category:service]].<ref>https://search.nixos.org/options?query=zfs</ref>
 
[[ZFS]] is written in [[C]][[category:c]].
 
[[ZFS]] is maintained by [[OpenZFS Project]][[category:OpenZFS Project]].
 
[[ZFS]] is a file system [[NixOS]] runs on. So [[NixOS]] can be installed with and on [[ZFS]].
 
== Source ==
 
[[NixOS]] uses the code from the [http://zfsonlinux.org/ ZFS on Linux project], including kernel modules and userspace utilities. The installation isos also come with zfs.


== What works ==
== What works ==
Line 38: Line 20:


{{note|For now, setting <code><nowiki>boot.kernelParams = [ "nohibernate" ];</nowiki></code>is necessary to avoid the issue described above.}}
{{note|For now, setting <code><nowiki>boot.kernelParams = [ "nohibernate" ];</nowiki></code>is necessary to avoid the issue described above.}}


== Caveats ==  
== Caveats ==  
Line 45: Line 28:
* By default, all ZFS pools available to the system will be forcibly imported during boot, regardless if you had imported them before or not. You should be careful not to have any other system accessing them at the same time, otherwise it will corrupt your pools. Normally (for the common desktop user) this should not be a problem, as a hard disk is usually only directly connected to one machine. This behaviour can be disabled by setting <code>boot.zfs.forceImportAll = false</code>.
* By default, all ZFS pools available to the system will be forcibly imported during boot, regardless if you had imported them before or not. You should be careful not to have any other system accessing them at the same time, otherwise it will corrupt your pools. Normally (for the common desktop user) this should not be a problem, as a hard disk is usually only directly connected to one machine. This behaviour can be disabled by setting <code>boot.zfs.forceImportAll = false</code>.
* If you create a zpool in the installer, make sure you run `zpool export <pool name>` after `nixos-install`, or else when you reboot into your new system, zfs will fail to import the zpool.
* If you create a zpool in the installer, make sure you run `zpool export <pool name>` after `nixos-install`, or else when you reboot into your new system, zfs will fail to import the zpool.


== How to use it ==
== How to use it ==