Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 198821 - 2.6 migration doc implies 2.4 boot possible with lvm2
Summary: 2.6 migration doc implies 2.4 boot possible with lvm2
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs on www.gentoo.org
Classification: Unclassified
Component: Other documents (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: nm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-11 16:01 UTC by Rajiv Aaron Manglani (RETIRED)
Modified: 2008-01-02 00:33 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajiv Aaron Manglani (RETIRED) gentoo-dev 2007-11-11 16:01:09 UTC
http://www.gentoo.org/doc/en/migration-to-2.6.xml describes how to upgrade a system from kernel 2.4 to 2.6. the section on lvm says:

Note: The LVM2 tools are fully backwards-compatible with LVM1. Your disk data will not be touched. You are not breaking any backwards-compatibility by doing this, you will continue to be able to boot 2.4 as usual.


however after following the migration guide (unmerging sys-fs/lvm-user and installing sys-fs/lvm2) i tired to boot into 2.4 right at step 10 (when you first reboot). the system did not fully start (lvm volumes were unavailable). during bootup lvm complained that device mapper was not available.

(i do not think this problem should be fixed unless there is something really simple; better to update the docs to let people know.)
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-11-11 22:01:26 UTC
2.4 kernels are not supported anywhere.
Comment 2 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2007-11-12 00:57:59 UTC
(In reply to comment #1)
> 2.4 kernels are not supported anywhere.

right. thats why i was following the upgrade doc. :)



btw, robbat2 says "older versions of [sys-fs/lvm2] that statement was true, but the more recent ones not. 2.00.* and 2.01.*, whereas current lvm2 is 2.02.*" that is, >=sys-fs/lvm2-2.02 does not allow booting with 2.4 kernels.


this bug is simply a request to update the doc.



Comment 3 nm (RETIRED) gentoo-dev 2007-11-12 02:38:47 UTC
(In reply to comment #0)
So, is there any solution? If I understand you correctly, basically, if you're using 2.4 and LVM, you're SOL because there's no way to move your volumes to 2.6 and LVM2.

Is there any kind of workaround for this? I hate to tell users in docs that they're just permanently screwed. If I have to, I can just change the text to say "LVM users cannot migrate to 2.6, as LVM2 won't work from 2.4 to 2.6." or whatever.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-12 03:29:59 UTC
Ok, looking harder into this, I'm wondering about it.
At some point in the past, it was definitely possible to have a 2.4 kernel, device-mapper, and LVM.
sys-fs/lvm-user builds against 2.4 headers.
sys-fs/lvm2 states no explicit dependency for any specific version of headers (but more recent versions depend on udev, and thus need 2.6 headers there).

So rajiv, can you look at why device-mapper was unavailable on your 2.4 kernel? (and thus stopping LVM from starting).

http://dev.riseup.net/grimoire/storage/lvm2/#how_do_i_go_from_a____kernel_to_a____kernel
"You need to make sure you have CONFIG_DM_IOCTL_V4 support in your
kernel for device-mapper. You need to select CONFIG_BLK_DEV_DM so that you can see the option for IOCTL_V4"
Also: http://sources.redhat.com/dm/patches.html

The LVM2 tools are still built with LVM1 support at the moment, but I was planning on switching the USE flag from 'nolvm1' to 'lvm1' soon, and thus flipping the default (support for LVM1 volumes still available, but not built by  default).
Comment 5 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2007-11-12 04:21:20 UTC
(In reply to comment #3)
> So, is there any solution? If I understand you correctly, basically, if you're
> using 2.4 and LVM, you're SOL because there's no way to move your volumes to
> 2.6 and LVM2.

thats not correct. the upgrade from 2.4 to 2.6 went just fine. the problem is that after you uninstall lvm-user and install sys-fs/lvm2-2.02 you cannot go _back_ to 2.4.

this is independent of changing the lvm metadata format.

> Is there any kind of workaround for this? I hate to tell users in docs that
> they're just permanently screwed. If I have to, I can just change the text to
> say "LVM users cannot migrate to 2.6, as LVM2 won't work from 2.4 to 2.6." or
> whatever.

the docs should just have a note saying that if you have 2.4 and lvm, when you remove sys-fs/lvm-user and install sys-fs/lvm2 you cannot go back to 2.4 unless you reinstall lvm-user. supposedly this was possible in the past before sys-fs/lvm2 version 2.02 according to robbat2 but i have not tested previous versions of sys-fs/lvm2.


(In reply to comment #4)
> At some point in the past, it was definitely possible to have a 2.4 kernel,
> device-mapper, and LVM.
> http://dev.riseup.net/grimoire/storage/lvm2/#how_do_i_go_from_a____kernel_to_a____kernel

says "You can use LVM2 tools with patched 2.4 and unpatched 2.6 kernels."
could be that gentoo-sources-2.4.x patched in dm. vanilla-sources-2.4.x does not have dm.

> The LVM2 tools are still built with LVM1 support at the moment, but I was
> planning on switching the USE flag from 'nolvm1' to 'lvm1' soon, and thus
> flipping the default (support for LVM1 volumes still available, but not built
> by  default).

before that happens, users will have to convert to the lvm2 metadata format or build with USE='lvm1'. if you are going to do this, then change the migration doc so it recommends converting to lvm2 metadata (instead of saying it is "totally optional").
Comment 6 nm (RETIRED) gentoo-dev 2007-11-12 06:23:52 UTC
Now that I know what you mean (can't go *back* to 2.4 w/out re-emerging that package), I can see about pushing out an update to the guide. I'll also mention that 2.4 kernels aren't supported in Gentoo, to hopefully discourage users from flip-flopping.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-19 07:37:11 UTC
ok, digging in the LVM2 source, I found an alternative option to this, but it's a bit messy.
Specifically, if the OLD lvm tools are installed with the suffix of '.lvm1' on the binaries, LVM2 can use them without having device-mapper present.

However, this option is NOT simple, in that the lvm1 tools will NOT build against 2.6 kernel headers, and lvm2 will not build against 2.4 kernel headers.
Comment 8 nm (RETIRED) gentoo-dev 2007-11-25 04:46:25 UTC
(In reply to comment #7)
> ok, digging in the LVM2 source, I found an alternative option to this, but it's
> a bit messy.
> Specifically, if the OLD lvm tools are installed with the suffix of '.lvm1' on
> the binaries, LVM2 can use them without having device-mapper present.
> 
> However, this option is NOT simple, in that the lvm1 tools will NOT build
> against 2.6 kernel headers, and lvm2 will not build against 2.4 kernel headers.

Sounds kinda hackish. Should I just go with comment #6 for now?
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-25 09:30:06 UTC
Yeah, just go with comment #6.
Comment 10 nm (RETIRED) gentoo-dev 2008-01-02 00:33:15 UTC
Fixed in CVS. Happy New Year.