The following patches add add LVM2 support in checkfs and halt.sh. The problem of having these steps in a separate script are as follows: If there are any auto-mountable partitions (i.e. /usr, /var) on LVM, checkfs must run *after* the logical volumes are activated. Therefor the script must have "before checkfs" in it's depend() block. This is a problem during halt in that the LVM deactivation tries to takes place before the partitions are unmounted. These patches work along-side the current LVM1 activation/deactivation since the important utilties (vgscan and vgchange) have the same parameters as LVM2. The only thing added is the check for *either* LVM1 *or* LVM2 support -- not just LVM1. I've thoroughly tested this on 2.4.20 with dm patches applied and dm/lvm2 utilities built. I used my own ebuilds -- not those found in bug 19744 and bug 19745 but that is a side issue.
Created attachment 12542 [details, diff] checkfs patch to add LVM2 activation All this is, is a simple addition to the logic which checks for LVM support.
Created attachment 12543 [details, diff] halt.sh patch to add LVM2 deactivation Like in checkfs, add to the tests for LVM detection.
Created attachment 12631 [details, diff] patch to checkfs from latest baselayout (1.8.6.8-r1) not much difference here -- just an offset
Created attachment 12632 [details, diff] patch to halt.sh from latest baselayout (1.8.6.8-r1) slight difference in the logic prevented the other patch from applying. here's a fixed up version for the latest baselayout.
Note: if bug 22768 gets added to the kernel these changes will also need to be applied on systems running 2.4 kernels as well as 2.5 kernels.
This looks like it should support both LVM or LVM2 no matter what kernel ... Max ?
Correct. All it does is check for lvm1 OR lvm2 support. I have this patch working on a box with lvm1 (vanilla 2.4.21) and on another box with dm/lvm2 (custom patched 2.4.20). Of course that doesn't mean extensive testing... :-)
Added to CVS, thanks.
why is it just fixed? i tried to boot with baselayout version 1.8.6.10 and init stops when it tries to activate the lvm volume. so nothing is working for lvm2
Because you also need lvm2 userland tools, and that is not part of baselayout ?
I'll try to get the dm and lvm2 utils into portage later today.