lvm2: fixed root on LVM. Bump revision.
--HG-- extra : convert_revision : 16248a8cc2d1a31eb220ccdfa1abc1695ab577e5
This commit is contained in:
parent
4cb99e3647
commit
285a4df5d6
3 changed files with 14 additions and 63 deletions
|
@ -15,52 +15,14 @@ prereqs)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
activate_vg()
|
[ ! -e /sbin/lvm ] && exit 0
|
||||||
{
|
[ ! -e /dev/urandom ] && mknod /dev/urandom c 1 9
|
||||||
local dev="$1"
|
|
||||||
|
|
||||||
# Make sure that we have a non-empty argument
|
modprobe -q dm-mod >/dev/null 2>&1
|
||||||
if [ -z "$dev" ]; then
|
if [ -e /sys/class/misc/device-mapper ]; then
|
||||||
return 1
|
echo "Scanning for Logical Volumes..."
|
||||||
fi
|
eval /sbin/lvm vgscan --ignorelockingfailure
|
||||||
|
echo "Activating Logical Volumes..."
|
||||||
# Take care of lilo boot arg, risky activating of all vg
|
eval /sbin/lvm vgchange --ignorelockingfailure -ay
|
||||||
case "$dev" in
|
|
||||||
fe[0-9]*)
|
|
||||||
lvm vgchange -aly --ignorelockingfailure
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
# FIXME: check major
|
|
||||||
/dev/root)
|
|
||||||
lvm vgchange -aly --ignorelockingfailure
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Make sure that we have a d-m path
|
|
||||||
dev="${dev#/dev/mapper/}"
|
|
||||||
if [ "$dev" = "$1" ]; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev")
|
|
||||||
|
|
||||||
if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ]; then
|
|
||||||
lvm lvchange -aly --ignorelockingfailure "$DM_VG_NAME/$DM_LV_NAME"
|
|
||||||
rc=$?
|
|
||||||
if [ $rc = 5 ]; then
|
|
||||||
echo "Unable to find LVM volume $DM_VG_NAME/$DM_LV_NAME"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -e /sbin/lvm ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
exit $?
|
||||||
modprobe -q dm-mod
|
|
||||||
|
|
||||||
activate_vg "$ROOT"
|
|
||||||
activate_vg "$resume"
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
|
@ -2,24 +2,12 @@
|
||||||
#
|
#
|
||||||
# OpenRC service for LVM.
|
# OpenRC service for LVM.
|
||||||
|
|
||||||
name="LVM service"
|
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
need devfs
|
after *
|
||||||
before checkfs fsck
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start()
|
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"
|
ebegin "Deactivating LVM volumes"
|
||||||
lvm vgchange --ignorelockingfailure -an 2>&1 >/dev/null
|
lvm vgchange --ignorelockingfailure -an 2>&1 >/dev/null
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
# Template file for 'lvm2'
|
# Template file for 'lvm2'
|
||||||
pkgname=lvm2
|
pkgname=lvm2
|
||||||
version=2.02.53
|
version=2.02.53
|
||||||
|
revision=1
|
||||||
wrksrc=LVM2.${version}
|
wrksrc=LVM2.${version}
|
||||||
distfiles="ftp://sources.redhat.com/pub/lvm2/LVM2.${version}.tgz"
|
distfiles="ftp://sources.redhat.com/pub/lvm2/LVM2.${version}.tgz"
|
||||||
build_style=gnu_configure
|
build_style=gnu_configure
|
||||||
configure_args="--disable-selinux --enable-readline --with-udev-prefix=
|
configure_args="--disable-selinux --enable-readline --enable-pkgconfig
|
||||||
--enable-pkgconfig --enable-udev_rules --enable-fsadm"
|
--enable-pkgconfig --enable-fsadm"
|
||||||
make_install_target="DESTDIR=$XBPS_DESTDIR/$pkgname-$version
|
make_install_target="DESTDIR=$XBPS_DESTDIR/$pkgname-$version
|
||||||
sbindir=$XBPS_DESTDIR/$pkgname-$version/sbin
|
sbindir=$XBPS_DESTDIR/$pkgname-$version/sbin
|
||||||
libdir=$XBPS_DESTDIR/$pkgname-$version/lib
|
libdir=$XBPS_DESTDIR/$pkgname-$version/lib
|
||||||
|
@ -25,7 +26,7 @@ disable_parallel_build=yes
|
||||||
subpackages="device-mapper"
|
subpackages="device-mapper"
|
||||||
conf_files="/etc/lvm/lvm.conf"
|
conf_files="/etc/lvm/lvm.conf"
|
||||||
triggers="initramfs-tools"
|
triggers="initramfs-tools"
|
||||||
openrc_services="lvm2 sysinit"
|
openrc_services="lvm2 shutdown"
|
||||||
|
|
||||||
Add_dependency full glibc
|
Add_dependency full glibc
|
||||||
Add_dependency full bash
|
Add_dependency full bash
|
||||||
|
|
Loading…
Reference in a new issue