Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24614 - baselayout-1.8.6.8-r1 checkfs dosnt work with LVM in kernel
Summary: baselayout-1.8.6.8-r1 checkfs dosnt work with LVM in kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-16 14:00 UTC by Nils Ohlmeier
Modified: 2004-10-24 21:30 UTC (History)
2 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 Nils Ohlmeier 2003-07-16 14:00:13 UTC
The LVM part of checkfs does only work with LVM as module, but not if it is
compiled into kernel.
With my gentoo-sources-2.4.20-r5 kernel their is no /proc/lvm directoy after
kernel booting. This directory exists after the call of vgscan.
Thus the LVM part of checkfs is skipped and the check of the file system of my
/home file system on an LVM device fails.

Reproducible: Always
Steps to Reproduce:
1. compile LVM into kernel (not as modules)
2. add a LVM filesystem to /etc/fstab which is mounted during boot
3. try to boot the system

Actual Results:  
You get a single root shell to fix your filesystems, because the filesystem
checks on the LVM devices failed. (Sorry i do not have the exact error message
any more.)

Expected Results:  
The call of vgscan and vgchange should not depend on the existence of the
/proc/lvm directory.

I fixed the problem for me by doing the following fix:

#if [ -x /sbin/vgscan -a -d /proc/lvm ]
if [ -x /sbin/vgscan -a -s /etc/lvmtab ]

This makes more sence, because /etc/lvmtab should exist and contain more then
zeor bytes if a VG exists.

BTW the check some lines below, in front of the vgcreate call, on the existence
of /etc/lvmtab is not very reliable, because this file is create on any call of
vgscan. If no VG exists the file will be zero bytes, otherwhise it contains the
names of the VGs. So i would replace the -f check with a -s check too.

For completeness:
Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20-gentoo-r5 i686 AMD Athlon(tm) Processor
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 apm gif imlib jpeg libg++ libwww motif pdflib png qt slang spell svga
xml2 gdbm readline gpm tcpd perl python gtk 3dnow -arts -avi berkdb crypt cups
evms2 encode ethereal -gnome imap innodb java -kde ldap -mad maildir mbox
-mikmod mmx -mpeg mysql ncurses nls oggvorbis -opengl oss pam -quicktime samba
sasl -sdl slp ssl truetype usb -xv wavelan X -xmms zlib"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=athlon -O3 -pipe"
CXXFLAGS="-mcpu=athlon -O3 -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j5"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox buildpkg ccache distcc"
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-07-17 07:30:13 UTC
Then this is a kernel issue, as the driver should register the entry.
Comment 2 Paul Thompson 2003-08-04 23:50:37 UTC
I couldnt find any /proc/lvm dir in 2.6 kernels. Checking
/proc/lvm exists as a directory in checkfs is a heuristic that fails,
perhaps there is a better heuristic...
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-13 15:43:43 UTC
2.6 kernels needs new checks.
Comment 4 Aron Griffis (RETIRED) gentoo-dev 2004-10-24 21:30:24 UTC
lvm2 support was added in august 2003