* 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:
parent
cb4e81d38f
commit
162181ffba
|
@ -152,6 +152,7 @@ rec {
|
|||
pkgs.gzip
|
||||
pkgs.iputils
|
||||
pkgs.less
|
||||
pkgs.lvm2
|
||||
pkgs.module_init_tools
|
||||
pkgs.nano
|
||||
pkgs.netcat
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
";
|
||||
|
||||
}
|
Loading…
Reference in New Issue