* 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.gzip
|
||||||
pkgs.iputils
|
pkgs.iputils
|
||||||
pkgs.less
|
pkgs.less
|
||||||
|
pkgs.lvm2
|
||||||
pkgs.module_init_tools
|
pkgs.module_init_tools
|
||||||
pkgs.nano
|
pkgs.nano
|
||||||
pkgs.netcat
|
pkgs.netcat
|
||||||
|
@ -26,6 +26,11 @@ import ../upstart-jobs/gather.nix {
|
|||||||
inherit (pkgs) writeText cleanSource udev procps;
|
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.
|
# Hardware scan; loads modules for PCI devices.
|
||||||
(import ../upstart-jobs/hardware-scan.nix {
|
(import ../upstart-jobs/hardware-scan.nix {
|
||||||
inherit (pkgs) kernel module_init_tools;
|
inherit (pkgs) kernel module_init_tools;
|
||||||
|
30
upstart-jobs/lvm.nix
Normal file
30
upstart-jobs/lvm.nix
Normal 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
|
||||||
|
|
||||||
|
";
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user