Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21908 - Add LVM2 support to baselayout's checkfs and halt.sh
Summary: Add LVM2 support to baselayout's checkfs and halt.sh
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-29 12:30 UTC by Max Kalika (RETIRED)
Modified: 2003-08-06 11:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
checkfs patch to add LVM2 activation (checkfs_lvm2.patch,671 bytes, patch)
2003-05-29 12:31 UTC, Max Kalika (RETIRED)
Details | Diff
halt.sh patch to add LVM2 deactivation (halt.sh_lvm2.patch,427 bytes, patch)
2003-05-29 12:32 UTC, Max Kalika (RETIRED)
Details | Diff
patch to checkfs from latest baselayout (1.8.6.8-r1) (checkfs-latest_lvm2.patch,671 bytes, patch)
2003-06-01 11:23 UTC, Max Kalika (RETIRED)
Details | Diff
patch to halt.sh from latest baselayout (1.8.6.8-r1) (halt.sh-latest_lvm2.patch,428 bytes, patch)
2003-06-01 11:25 UTC, Max Kalika (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Kalika (RETIRED) gentoo-dev 2003-05-29 12:30:04 UTC
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.
Comment 1 Max Kalika (RETIRED) gentoo-dev 2003-05-29 12:31:30 UTC
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.
Comment 2 Max Kalika (RETIRED) gentoo-dev 2003-05-29 12:32:54 UTC
Created attachment 12543 [details, diff]
halt.sh patch to add LVM2 deactivation

Like in checkfs, add to the tests for LVM detection.
Comment 3 Max Kalika (RETIRED) gentoo-dev 2003-06-01 11:23:32 UTC
Created attachment 12631 [details, diff]
patch to checkfs from latest baselayout (1.8.6.8-r1)

not much difference here -- just an offset
Comment 4 Max Kalika (RETIRED) gentoo-dev 2003-06-01 11:25:14 UTC
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.
Comment 5 Sean P. Kane 2003-06-13 16:02:16 UTC
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.
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-06-30 15:03:29 UTC
This looks like it should support both LVM or LVM2 no matter what kernel ...
Max ?
Comment 7 Max Kalika (RETIRED) gentoo-dev 2003-06-30 15:42:23 UTC
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... :-) 
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-04 12:34:44 UTC
Added to CVS, thanks.
Comment 9 FL 2003-08-06 10:46:47 UTC
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
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-06 11:09:39 UTC
Because you also need lvm2 userland tools, and that is not part of
baselayout ?
Comment 11 Max Kalika (RETIRED) gentoo-dev 2003-08-06 11:57:21 UTC
I'll try to get the dm and lvm2 utils into portage later today.