Bug#374891: initramfs-tools: activate resume volume group
On Thu, Jun 22, 2006 at 01:35:16PM +0200, David Härdeman wrote: > > Ah, I see, that explains some parts of the lvm script that I didn't > understand. Have you already fixed lilo support on top of my patch or do > you want an updated patch? > > Regards, > David yes fixed in latest repo. currently i have some hand binded as mentors.debian.net does not parse the Uploaders control field, so my uploaded packages land nowhere. hope that gets resolved soon. also the bzr story leads me to dump that playground and switch soon to git, than latest repo should get available again. regards -- maks
Bug#374891: initramfs-tools: activate resume volume group
On Thu, June 22, 2006 2:11, maximilian attems said: > although the cleanup might hurt users with lilo and lvm root user. > as lilo passes the root as major and minor, we need to check for "fe" too. > current lvm hook is very sloppy and tries to activate anything. > see #357538 > > something like this to match current behaviour: > > case $vg in > fe[0-9]+) > vgchange -ay > return > ;; > esac Ah, I see, that explains some parts of the lvm script that I didn't understand. Have you already fixed lilo support on top of my patch or do you want an updated patch? Regards, David -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#374891: initramfs-tools: activate resume volume group
tags 374891 pending thanks a lot On Wed, 21 Jun 2006, David Härdeman wrote: > Currently the lvm script does not activate the volume group which the > resume partition resides on. In case the resume lv is in the same vg as > the root lv, then things will work anyway since the root vg is activated > but if they are in different vg's this means that resume will not work. > > I've attached a patch which fixes this by activating both resume and > root vg's. woow applied. helps also if your swap is on lvm but not your root. :) although the cleanup might hurt users with lilo and lvm root user. as lilo passes the root as major and minor, we need to check for "fe" too. current lvm hook is very sloppy and tries to activate anything. see #357538 something like this to match current behaviour: case $vg in fe[0-9]+) vgchange -ay return ;; esac regards -- maks
Bug#374891: initramfs-tools: activate resume volume group
Package: initramfs-tools Version: 0.60 Tags: patch Currently the lvm script does not activate the volume group which the resume partition resides on. In case the resume lv is in the same vg as the root lv, then things will work anyway since the root vg is activated but if they are in different vg's this means that resume will not work. I've attached a patch which fixes this by activating both resume and root vg's. Regards, David Härdeman diff -ur initramfs-tools-0.60-orig/scripts/local-top/lvm initramfs-tools-0.60/scripts/local-top/lvm --- initramfs-tools-0.60-orig/scripts/local-top/lvm 2006-03-26 21:56:35.0 +0200 +++ initramfs-tools-0.60/scripts/local-top/lvm 2006-06-21 23:43:19.0 +0200 @@ -15,23 +15,34 @@ ;; esac -vg=${ROOT#/dev/mapper/} +activate_vg() +{ + local vg="$1" -case ${vg} in - /dev/root) - unset vg - ;; - /*) - exit 0 - ;; -esac - -modprobe -q dm-mod + # Make sure that we have a non-empty argument + if [ -z "$vg" ]; then + return 0 + fi + + # Make sure that we have a d-m path + vg=${vg#/dev/mapper/} + if [ "$vg" = "$1" ]; then + return 0 + fi -# Split volume group from logical volume. -vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') -# Reduce padded --'s to -'s -vg=$(echo ${vg} | sed -e 's#--#-#g') + # Split volume group from logical volume. + vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') + # Reduce padded --'s to -'s + vg=$(echo ${vg} | sed -e 's#--#-#g') -vgchange -ay ${vg} + vgchange -ay ${vg} +} + +if [ ! -e /sbin/vgchange ]; then + exit 0 +fi + +modprobe -q dm-mod +activate_vg "$ROOT" +activate_vg "$resume"