LVM: Difference between revisions

imported>Zaechus
m Zaechus moved page Lvm to LVM: LVM is an acronym and should be in all caps
imported>Hyperfekt
Added thin/cache bootup tools option
Line 30: Line 30:
</syntaxHighlight>
</syntaxHighlight>


== Special LVM Modes ==
== Booting with special LVM Modes ==
LVM provides a number of special features such as creating snapshots, raid for single Logical Volumes and much more. If you want to use these devices on bootup, the associated <code>dm-*</code>  kernel module must be provided in the initrd (see for example {{Issue|33646}}) . This is a non-exhaustive list of features and the corresponding kernel module to put into your <code>configuration.nix</code>:
LVM provides a number of special features such as creating snapshots, raid for single Logical Volumes and much more. If you want to use these devices on bootup, the associated <code>dm-*</code>  kernel module must be provided in the initrd (see for example {{Issue|33646}}) . This is a non-exhaustive list of features and the corresponding kernel module and other options to put into your <code>configuration.nix</code>:
<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
boot.initrd.kernelModules = [
boot.initrd.kernelModules = [
   "dm-snapshot" # when you are using snapshots
   "dm-snapshot" # when you are using snapshots
   "dm-raid" # e.g. when you are configuring raid1 via: `lvconvert -m1 /dev/pool/home`
   "dm-raid" # e.g. when you are configuring raid1 via: `lvconvert -m1 /dev/pool/home`
  "dm-cache" # when using volumes set up with lvmcache
];
];
services.lvm.boot.thin.enable = true; # when using thin provisioning or caching
</syntaxHighlight>
</syntaxHighlight>