2009-10-12 16:36:19 +00:00
|
|
|
{ config, pkgs, ... }:
|
2006-12-24 01:07:28 +00:00
|
|
|
|
2009-03-06 12:27:28 +00:00
|
|
|
{
|
2006-12-24 01:07:28 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
###### implementation
|
2009-03-06 12:27:28 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
config = {
|
2009-03-06 12:27:28 +00:00
|
|
|
|
2010-01-10 19:14:42 +00:00
|
|
|
jobs.lvm =
|
|
|
|
{ startOn = "started udev or new-devices";
|
|
|
|
|
|
|
|
script =
|
|
|
|
''
|
|
|
|
# Scan for block devices that might contain LVM physical volumes
|
|
|
|
# and volume groups.
|
2010-01-10 20:07:23 +00:00
|
|
|
${pkgs.lvm2}/sbin/vgscan
|
2010-01-10 19:14:42 +00:00
|
|
|
|
|
|
|
# Make all logical volumes on all volume groups available, i.e.,
|
|
|
|
# make them appear in /dev.
|
|
|
|
${pkgs.lvm2}/sbin/vgchange --available y
|
|
|
|
|
|
|
|
initctl emit -n new-devices
|
|
|
|
'';
|
|
|
|
|
|
|
|
task = true;
|
|
|
|
};
|
|
|
|
|
2010-01-07 16:14:50 +00:00
|
|
|
environment.systemPackages = [ pkgs.lvm2 ];
|
2010-01-07 15:55:05 +00:00
|
|
|
|
2010-01-07 22:39:35 +00:00
|
|
|
services.udev.packages = [ pkgs.lvm2 ];
|
|
|
|
|
2009-03-06 12:27:28 +00:00
|
|
|
};
|
2009-10-12 16:36:19 +00:00
|
|
|
|
2006-12-24 01:07:28 +00:00
|
|
|
}
|