mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
eba8f94069
svn path=/nixos/trunk/; revision=17769
35 lines
750 B
Nix
35 lines
750 B
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
###### implementation
|
|
|
|
config = {
|
|
|
|
jobs.lvm =
|
|
{ startOn = " udev"; # !!! or on new-devices
|
|
|
|
script =
|
|
''
|
|
# Load the device mapper.
|
|
${config.system.sbin.modprobe}/sbin/modprobe dm_mod || true
|
|
|
|
${pkgs.devicemapper}/sbin/dmsetup mknodes
|
|
# Scan for block devices that might contain LVM physical volumes
|
|
# and volume groups.
|
|
${pkgs.lvm2}/sbin/vgscan --mknodes
|
|
|
|
# Make all logical volumes on all volume groups available, i.e.,
|
|
# make them appear in /dev.
|
|
${pkgs.lvm2}/sbin/vgchange --available y
|
|
|
|
initctl emit new-devices
|
|
'';
|
|
|
|
task = true;
|
|
};
|
|
|
|
};
|
|
|
|
}
|