* LVM support (in stage 2; having / on LVM is not yet supported). LVM

triggers a new-devices event so that the filesystems job mounts file
  systems on the logical volumes.

svn path=/nixos/trunk/; revision=7478
This commit is contained in:
Eelco Dolstra 2006-12-24 01:07:28 +00:00
parent cb4e81d38f
commit 162181ffba
3 changed files with 36 additions and 0 deletions

View File

@ -152,6 +152,7 @@ rec {
pkgs.gzip
pkgs.iputils
pkgs.less
pkgs.lvm2
pkgs.module_init_tools
pkgs.nano
pkgs.netcat

View File

@ -26,6 +26,11 @@ import ../upstart-jobs/gather.nix {
inherit (pkgs) writeText cleanSource udev procps;
})
# Makes LVM logical volumes available.
(import ../upstart-jobs/lvm.nix {
inherit (pkgs) kernel module_init_tools lvm2;
})
# Hardware scan; loads modules for PCI devices.
(import ../upstart-jobs/hardware-scan.nix {
inherit (pkgs) kernel module_init_tools;

30
upstart-jobs/lvm.nix Normal file
View File

@ -0,0 +1,30 @@
{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
";
}