ZFS: Difference between revisions

imported>Makefu
No edit summary
imported>Fadenb
m whitespace removal
Line 21: Line 21:


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
  boot.supportedFilesystems = [ "zfs" ];
boot.supportedFilesystems = [ "zfs" ];
</syntaxhighlight>
</syntaxhighlight>


Line 27: Line 27:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
  nixos-rebuild switch
nixos-rebuild switch
  modprobe zfs
modprobe zfs
</syntaxhighlight>
</syntaxhighlight>


Line 38: Line 38:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
  zfs set mountpoint=legacy <pool>/<fs>
zfs set mountpoint=legacy <pool>/<fs>
  mount -t zfs <pool>/<fs> <mountpoint>
mount -t zfs <pool>/<fs> <mountpoint>


  # This will regenerate your /etc/nixos/hardware-configuration.nix file:
# This will regenerate your /etc/nixos/hardware-configuration.nix file:
  nixos-generate-config
nixos-generate-config


  nixos-rebuild switch
nixos-rebuild switch
</syntaxhighlight>
</syntaxhighlight>


Line 94: Line 94:
You can also disable a given type of snapshots on a per-dataset basis by setting a ZFS property, like this:
You can also disable a given type of snapshots on a per-dataset basis by setting a ZFS property, like this:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="console">
$ zfs set com.sun:auto-snapshot:weekly=false <pool>/<fs>
$ zfs set com.sun:auto-snapshot:weekly=false <pool>/<fs>
</syntaxhighlight>
</syntaxhighlight>