void-packages/templates/lvm2/files/lvm2.rc

28 lines
417 B
Text
Raw Normal View History

#!/sbin/runscript
#
# OpenRC service for LVM.
name="LVM service"
depend()
{
need devfs
before checkfs fsck
}
start()
{
ebegin "Activating LVM volumes"
modprobe -q dm-mod 2>/dev/null
lvm vgscan --ignorelockingfailure --mknodes && \
lvm vgchange --ignorelockingfailure -a y >/dev/null
eend $?
}
stop()
{
ebegin "Deactivating LVM volumes"
lvm vgchange --ignorelockingfailure -an 2>&1 >/dev/null
eend $?
}