2009-10-12 18:36:19 +02:00
|
|
|
{ config, pkgs, ... }:
|
2006-12-24 02:07:28 +01:00
|
|
|
|
2009-03-06 13:27:28 +01:00
|
|
|
{
|
2006-12-24 02:07:28 +01:00
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
###### implementation
|
2009-03-06 13:27:28 +01:00
|
|
|
|
2009-10-12 18:36:19 +02:00
|
|
|
config = {
|
2009-03-06 13:27:28 +01:00
|
|
|
|
2009-10-12 20:09:34 +02:00
|
|
|
jobs.lvm =
|
2009-10-12 18:36:19 +02:00
|
|
|
{ startOn = " udev"; # !!! or on new-devices
|
|
|
|
|
|
|
|
script =
|
|
|
|
''
|
2009-03-06 13:27:28 +01:00
|
|
|
# Load the device mapper.
|
2009-10-12 18:36:19 +02:00
|
|
|
${config.system.sbin.modprobe}/sbin/modprobe dm_mod || true
|
2009-03-06 13:27:28 +01:00
|
|
|
|
|
|
|
${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
|
2009-10-12 18:36:19 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
task = true;
|
|
|
|
};
|
|
|
|
|
2009-03-06 13:27:28 +01:00
|
|
|
};
|
2009-10-12 18:36:19 +02:00
|
|
|
|
2006-12-24 02:07:28 +01:00
|
|
|
}
|