Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44094 - sys-fs/lvm-user (LVM1) and sys-fs/lvm2 (LVM2) don't mix
Summary: sys-fs/lvm-user (LVM1) and sys-fs/lvm2 (LVM2) don't mix
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-08 18:31 UTC by Sascha Silbe
Modified: 2005-06-28 10:59 UTC (History)
0 users

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


Attachments
New ebuild for sys-fs/lvm2 including lvm1 binaries as fallback for 2.4 kernels (lvm2-2.00.15-r1.ebuild,3.54 KB, text/plain)
2004-05-24 16:05 UTC, Sascha Silbe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Silbe 2004-03-08 18:31:14 UTC
I'd like to test a 2.6 series kernel on my workstation, but keep my 2.4 kernel for working. Since 2.4 only contains LVM1 and 2.6 only contains LVM2, I need the user space utilities for both versions.
Currently lvm-user and lvm2 block each other because both create the same SymLinks/executables (/sbin/vgchange etc.). There are several options:

1. Patch lvm2 to create /sbin/vgchange2 instead of /sbin/vgchange etc.
2. Provide an lvm2 ebuild that only installs /sbin/lvm but none of the SymLinks.
3. Provide a combined lvm-user + lvm2 ebuild that uses a small wrapper for calling the currently appropriate backend and create SymLinks to that wrapper.

The first two options might require patching the init scripts.


PS: The error message emerge is giving when trying to install lvm2 while lvm-user is installed is quite misleading.



Reproducible: Always
Steps to Reproduce:
1. emerge lvm2

Actual Results:  
root@cube:/boot# emerge lvm2
Calculating dependencies |
Invalid package name: sys-fs/lvm-user

!!! Problem in sys-fs/lvm2 dependencies.
!!! 73



Expected Results:  
See above.



Gentoo Base System version 1.4.3.13
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.23-cube-2)
=================================================================
System uname: 2.4.23-cube-2 i686 AMD Athlon(tm) processor
distcc 2.12.1 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium -mcpu=athlon-tbird -O3 -pipe"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /usr/vice/etc /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/afs/modload /etc/gconf /etc/make.globals /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ http://gentoo.inode.at/ ftp://gentoo.inode.at/source/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://hybrid.sascha.silbe.org/gentoo-portage"
USE="3dnow X acl afs apm avi berkdb cdr crypt dga doc dvd encode foomaticdb gdbm gif gtk gtk2 gtkhtml guile hbci imap imlib ipv6 j-noaim j-nomsn j-noyahoo jpeg krb4 lcms libg++ libwww linguas_de linguas_de_DE linguas_en linguas_en_GB linguas_en_US mad maildir mbox mikmod mmx monitor mpeg mysql nas ncurses nls oggvorbis opengl oss pam pdflib png postgres python qt qtmt quicktime readline samba sdl skey spell ssl tetex tiff truetype unicode x86 xml xml2 xv zlib"
Comment 1 Sascha Silbe 2004-05-03 13:03:39 UTC
A Debian developer just told me they use a wrapper that calls the right binaries for the currently running kernel.
It's homepage is [1], the current source archive is [2].

[1] http://packages.debian.org/testing/admin/lvm-common
[2] http://ftp.debian.org/debian/pool/main/l/lvm-common/lvm-common_1.5.14.tar.gz

Comment 2 Sascha Silbe 2004-05-24 16:05:29 UTC
Created attachment 31963 [details]
New ebuild for sys-fs/lvm2 including lvm1 binaries as fallback for 2.4 kernels

LVM2 2.00.15 contains support for calling the old binaries if running a kernel
without LVM2 support.
This updated ebuild for sys-fs/lvm2 installs the lvm-user binaries as *.lvm1 if
the (local?) USE flag "lvm1" is set.
Comment 3 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-06-21 13:41:55 UTC
Not a kernel issue, a lvm1/lvm2 issue, please reassign it for this.
Comment 4 Sascha Silbe 2004-09-06 07:27:15 UTC
Any chance of getting this into the official Portage tree? It works quite well for me so far. 
Comment 5 Max Kalika (RETIRED) gentoo-dev 2004-11-14 08:17:25 UTC
I've been out for a while.  Can you explain why this is necessary?  lvm2 and lvm-user block eachother exactly because they don't mix.
Comment 6 Sascha Silbe 2004-11-24 13:40:04 UTC
On a system running both Linux 2.4 and Linux 2.6 (chosen at boot time, not in parallel :) ) you need the userspace tools of both lvm1 and lvm2 because 2.4 (vanilla) only contains lvm1 and 2.6 (vanilla) only contains lvm2.
Using my combined ebuild, you can have both installed (the lvm1 tools will be renamed to *.lvm1). The lvm2 userspace tools will call the lvm1 userspace tools if you're running a 2.4 kernel, so everything works fine both on 2.4 and on 2.6.
I've installed it on all of my hosts and had no problem with it so far, so I'd consider it stable.
Comment 7 Christoph Probst 2005-05-07 03:18:35 UTC
I run into the same problem the other day: I wanted to update a remote server from kernel 2.4 to 2.6.

1. problem: You never know if a kernel upgrade will be successful.
2. problem: lvm1 doesn't support kernel 2.6
   (vgdisplay -- LVM driver/module not loaded?)
3. problem: lvm2 doesn't support kernel 2.4
   ("Is the original LVM driver using this volume group?")


The conclusion of "problem 1" is: I need to be able to step back to 2.4 in case 2.6 fails to boot. But how can I do this if I need to upgrade lvm because of "problem 2" and how can I go back considering "problem 3"?

If I update both lvm and kernel at the same time and there are no problems with kernel 2.6 I'll be fine. But what if there are problems? Without lvm1 I won't be able to startup with the older kernel again.


A gentoo solution is the 2.4 device mapper patch shipped with gentoo-sources 2.4. But who is using gentoo-sources on a productiv server?

An lvm solution is the 2.4 device mapper patch as well but this would mean I need a new 2.4 kernel before I can switch to 2.6.

A better solution is - as Sascha recommended - to use a wrapper that decides which lvm version has to be used.


Especially if there exists documentation like http://www.gentoo.org/doc/en/migration-to-2.6.xml that says:

"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."

that ignoes http://www.tldp.org/HOWTO/LVM-HOWTO/lvm2faq.html
"If you are using the stable 2.4 device mapper patch from the lvm2 tarball, all the major functionality you'd expect using lvm1 is supported with the lvm2 tools."
Comment 8 Eric Edgar (RETIRED) gentoo-dev 2005-06-28 10:59:16 UTC
We are no longer working on 2.4 kernels as active support.

This issue can be resolved with a rescue cd with the appropriate support.
Comment 9 Eric Edgar (RETIRED) gentoo-dev 2005-06-28 10:59:42 UTC
We are no longer working on 2.4 kernels as active support.

This issue can be resolved with a rescue cd with the appropriate support.