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