forked from mirrors/nixpkgs
162181ffba
triggers a new-devices event so that the filesystems job mounts file systems on the logical volumes. svn path=/nixos/trunk/; revision=7478
31 lines
558 B
Nix
31 lines
558 B
Nix
{kernel, module_init_tools, lvm2}:
|
|
|
|
{
|
|
name = "lvm";
|
|
|
|
job = "
|
|
start on udev
|
|
#start on new-devices
|
|
|
|
script
|
|
|
|
# Load the device mapper.
|
|
export MODULE_DIR=${kernel}/lib/modules/
|
|
${module_init_tools}/sbin/modprobe dm_mod || true
|
|
|
|
# Scan for block devices that might contain LVM physical volumes
|
|
# and volume groups.
|
|
#${lvm2}/sbin/vgscan
|
|
|
|
# Make all logical volumes on all volume groups available, i.e.,
|
|
# make them appear in /dev.
|
|
${lvm2}/sbin/vgchange --available y
|
|
|
|
initctl emit new-devices
|
|
|
|
end script
|
|
|
|
";
|
|
|
|
}
|