2007-06-28 10:57:36 +01:00
|
|
|
{modprobe, lvm2, devicemapper}:
|
2006-12-24 01:07:28 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "lvm";
|
|
|
|
|
|
|
|
job = "
|
|
|
|
start on udev
|
|
|
|
#start on new-devices
|
|
|
|
|
|
|
|
script
|
|
|
|
|
|
|
|
# Load the device mapper.
|
2007-03-04 01:16:24 +00:00
|
|
|
${modprobe}/sbin/modprobe dm_mod || true
|
2006-12-24 01:07:28 +00:00
|
|
|
|
2007-06-28 10:57:36 +01:00
|
|
|
${devicemapper}/sbin/dmsetup mknodes
|
2006-12-24 01:07:28 +00:00
|
|
|
# Scan for block devices that might contain LVM physical volumes
|
|
|
|
# and volume groups.
|
2007-06-28 10:57:36 +01:00
|
|
|
${lvm2}/sbin/vgscan --mknodes
|
2006-12-24 01:07:28 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
";
|
|
|
|
|
|
|
|
}
|