Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 199860
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Doug Goldstein <cardoe@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Guenther Brunthaler <gb_about_gnu@gmx.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 199860 depends on: Show dependency tree
Bug 199860 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-11-21 05:36 0000
After emerging lvm2 with use flags "nolvm1 nolvmstatic", snapshots do no not
work any longer, even though the use flag "nosnapshot" has *not* been
specified. (This is not the case if the nolvmstatic use flag is removed.)

Reproducible: Always

Steps to Reproduce:
1.sys-fs/lvm2
2.lvm segtypes
3.

Actual Results:  
  striped
  zero
  error
  mirror


Expected Results:  
  striped
  zero
  error
  snapshot
  mirror


I have checked config.log after the build, and shared snapshots are selected:

./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --enable-readline --disable-selinux --enable-dmeventd
--enable-cmdlib --with-mirrors=internal --with-snapshots=shared
--with-lvm1=none --with-clvmd=none --with-cluster=none --sbindir=/sbin
--with-staticdir=/sbin --build=i686-pc-linux-gnu

And the snapshots are not only enabled, they are also present in my filesystem:

# ls /usr/lib/liblvm2* -1
/usr/lib/liblvm2cmd.so
/usr/lib/liblvm2cmd.so.2.02
/usr/lib/liblvm2snapshot.so
/usr/lib/liblvm2snapshot.so.2.02

So everything seems to be fine - except for the fact that the dynamically
linked lvm2 does not even *look* for those libraries:

open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libdevmapper-event.so.1.02", O_RDONLY) = 3
open("/lib/libpthread.so.0", O_RDONLY)  = 3
open("/lib/libdevmapper.so.1.02", O_RDONLY) = 3
open("/lib/libreadline.so.5", O_RDONLY) = 3
open("/lib/librt.so.1", O_RDONLY)       = 3
open("/lib/libdl.so.2", O_RDONLY)       = 3
open("/lib/libncurses.so.5", O_RDONLY)  = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_IDENTIFICATION", O_RDONLY) = 3
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_MEASUREMENT", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_TELEPHONE", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_ADDRESS", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_NAME", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_PAPER", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_MESSAGES", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_MONETARY", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_COLLATE", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_TIME", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_NUMERIC", O_RDONLY) = 3
open("/usr/lib/locale/de_AT.utf8/LC_CTYPE", O_RDONLY) = 3
open("/etc/lvm/lvm.conf", O_RDONLY|O_LARGEFILE) = 3
open("/etc/localtime", O_RDONLY)        = 3
open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3
open("/proc/devices", O_RDONLY|O_LARGEFILE) = 3
open("/etc/lvm/.cache", O_RDONLY|O_LARGEFILE) = 3
  striped
  zero
  error
  mirror
open("/etc/lvm/.cache", O_RDWR|O_CREAT|O_LARGEFILE, 0777) = 3
open("/etc/lvm/.cache.tmp", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 4

You see - no one ever looks for /usr/lib/liblvm2*

------- Comment #1 From Guenther Brunthaler 2007-11-21 05:44:54 0000 -------
Although omitting the nolvmstatic avoids the problem, a dynamically linked lvm
would be very nice for an initial ramdisk, because it can make use the shared
libc and will thus save some duplicated libc code, assuming other tools in the
initrd need libc (or even better: uclibc) anyway.

Of course that's not an issue with a busybox-only initrd, but for initrds which
rely on additional tools (such as truecrypt, dmsetup) than busybox alone this
*is* an issue.

------- Comment #2 From Guenther Brunthaler 2007-11-21 05:49:02 0000 -------
Corrections/Comments:

Steps to Reproduce:
1. *emerge* sys-fs/lvm2
...

;-)

The output ("open"-stuff) above has been generated by

# strace -e open  lvm segtypes 2>&1

------- Comment #3 From Guenther Brunthaler 2007-11-21 05:54:36 0000 -------
And no, the libraries are also not pulled in by the dynamic linker. I have
scanned the address space map for libraries while the lvm shell was running in
a different window:

# grep liblvm /proc/$(pidof lvm)/maps | wc -l
0

------- Comment #4 From Guenther Brunthaler 2007-11-21 05:58:35 0000 -------
And finally, just for your reference: The complete address space map of my
running lvm shell:

# cat /proc/$(pidof lvm)/maps
08047000-080c1000 r-xp 00000000 fe:0b 4954       /sbin/lvm
080c1000-080c2000 r--p 00079000 fe:0b 4954       /sbin/lvm
080c2000-080c6000 rw-p 0007a000 fe:0b 4954       /sbin/lvm
080c6000-0810d000 rw-p 080c6000 00:00 0          [heap]
46f1f000-46f36000 r-xp 00000000 fe:0b 4283       /lib/ld-2.6.1.so
46f36000-46f37000 r--p 00017000 fe:0b 4283       /lib/ld-2.6.1.so
46f37000-46f38000 rw-p 00018000 fe:0b 4283       /lib/ld-2.6.1.so
46f3a000-46f4c000 r-xp 00000000 fe:0b 30090      /lib/libdevmapper.so.1.02
46f4c000-46f4d000 r--p 00011000 fe:0b 30090      /lib/libdevmapper.so.1.02
46f4d000-46f4f000 rw-p 00012000 fe:0b 30090      /lib/libdevmapper.so.1.02
46f51000-46f54000 r-xp 00000000 fe:0b 36529     
/lib/libdevmapper-event.so.1.02
46f54000-46f55000 r--p 00002000 fe:0b 36529     
/lib/libdevmapper-event.so.1.02
46f55000-46f56000 rw-p 00003000 fe:0b 36529     
/lib/libdevmapper-event.so.1.02
47859000-47897000 r-xp 00000000 fe:0b 32393      /lib/libncurses.so.5.6
47897000-4789f000 rw-p 0003e000 fe:0b 32393      /lib/libncurses.so.5.6
4789f000-478a0000 rw-p 4789f000 00:00 0
478a2000-478a9000 r-xp 00000000 fe:0b 56500      /lib/librt-2.6.1.so
478a9000-478aa000 r--p 00006000 fe:0b 56500      /lib/librt-2.6.1.so
478aa000-478ab000 rw-p 00007000 fe:0b 56500      /lib/librt-2.6.1.so
478ec000-47a13000 r-xp 00000000 fe:0b 30082      /lib/libc-2.6.1.so
47a13000-47a15000 r--p 00126000 fe:0b 30082      /lib/libc-2.6.1.so
47a15000-47a16000 rw-p 00128000 fe:0b 30082      /lib/libc-2.6.1.so
47a16000-47a19000 rw-p 47a16000 00:00 0
47a43000-47a45000 r-xp 00000000 fe:0b 30083      /lib/libdl-2.6.1.so
47a45000-47a46000 r--p 00001000 fe:0b 30083      /lib/libdl-2.6.1.so
47a46000-47a47000 rw-p 00002000 fe:0b 30083      /lib/libdl-2.6.1.so
47a49000-47a5b000 r-xp 00000000 fe:0b 30087      /lib/libpthread-2.6.1.so
47a5b000-47a5c000 r--p 00012000 fe:0b 30087      /lib/libpthread-2.6.1.so
47a5c000-47a5d000 rw-p 00013000 fe:0b 30087      /lib/libpthread-2.6.1.so
47a5d000-47a5f000 rw-p 47a5d000 00:00 0
48933000-48960000 r-xp 00000000 fe:0b 56505      /lib/libreadline.so.5.2
48960000-48964000 rw-p 0002d000 fe:0b 56505      /lib/libreadline.so.5.2
48964000-48965000 rw-p 48964000 00:00 0
b7ead000-b7eae000 rw-p b7ead000 00:00 0
b7eae000-b7eed000 r--p 00000000 fe:02 43913     
/usr/lib/locale/de_AT.utf8/LC_CTYPE
b7eed000-b7fcd000 r--p 00000000 fe:02 55041     
/usr/lib/locale/de_AT.utf8/LC_COLLATE
b7fcd000-b7fd0000 rw-p b7fcd000 00:00 0
b7fe5000-b7fe6000 r--p 00000000 fe:02 43914     
/usr/lib/locale/de_AT.utf8/LC_NUMERIC
b7fe6000-b7fe7000 r--p 00000000 fe:02 1000692   
/usr/lib/locale/de_AT.utf8/LC_TIME
b7fe7000-b7fe8000 r--p 00000000 fe:02 1000693   
/usr/lib/locale/de_AT.utf8/LC_MONETARY
b7fe8000-b7fe9000 r--p 00000000 fe:02 98405     
/usr/lib/locale/de_AT.utf8/LC_MESSAGES/SYS_LC_MESSAGES
b7fe9000-b7fea000 r--p 00000000 fe:02 98407     
/usr/lib/locale/de_AT.utf8/LC_PAPER
b7fea000-b7feb000 r--p 00000000 fe:02 1000695   
/usr/lib/locale/de_AT.utf8/LC_NAME
b7feb000-b7fec000 r--p 00000000 fe:02 1000696   
/usr/lib/locale/de_AT.utf8/LC_ADDRESS
b7fec000-b7fed000 r--p 00000000 fe:02 1000697   
/usr/lib/locale/de_AT.utf8/LC_TELEPHONE
b7fed000-b7fee000 r--p 00000000 fe:02 104665    
/usr/lib/locale/de_AT.utf8/LC_MEASUREMENT
b7fee000-b7ff5000 r--s 00000000 fe:02 213216    
/usr/lib/gconv/gconv-modules.cache
b7ff5000-b7ff6000 r--p 00000000 fe:02 1000698   
/usr/lib/locale/de_AT.utf8/LC_IDENTIFICATION
b7ff6000-b7ff7000 r-xp b7ff6000 00:00 0          [vdso]
bff11000-bff28000 rw-p bff11000 00:00 0          [stack]

------- Comment #5 From Robin Johnson 2007-11-21 09:56:45 0000 -------
please provide your emerge --info, and EXACTLY which version of lvm2 you are
using. (The $Header$ string in the ebuild that you merged ideally).

------- Comment #6 From Guenther Brunthaler 2007-11-21 10:47:14 0000 -------
(In reply to comment #5)
> please provide your emerge --info

Here it is:

Portage 2.1.3.19 (default-linux/x86/2006.1/desktop, gcc-3.4.6, glibc-2.6.1-r0,
2.6.22-gentoo-r9 i686)
=================================================================
System uname: 2.6.22-gentoo-r9 i686 AMD Athlon(tm) processor
Timestamp of tree: Wed, 21 Nov 2007 08:16:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O2 -DNDEBUG -pipe -fno-stack-check"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/local/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/host-variants/ /etc/env.d/java/
/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c
/etc/udev/rules.d"
CXXFLAGS="-march=athlon-tbird -O2 -DNDEBUG -pipe -fno-stack-check"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
FEATURES="ccache distlocks metadata-transfer notitles parallel-fetch prelink
sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://cesium.di.uminho.pt/pub/gentoo/
ftp://mirrors.ludost.net/gentoo/ http://mirror.phy.olemiss.edu/mirror/gentoo"
LANG="de_AT.utf8"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acpi alsa apache2 arts audiofile
bash-completion berkdb bitmap-fonts bzip2 cairo caps cddb cdr cli cracklib
crypt css cups curl dbus directfb dri dts dv dvd dvdr dvdread ecc emboss encode
exif expat fbcon ffmpeg fftw firefox flac foomaticdb fortran freetype ftp fuse
gd gdbm gif gimp glut gmp gphoto2 gpm gstreamer gtk gtk2 hal iconv idea
ieee1394 imagemagick imlib isdnlog jack java5 javascript jbig jikes jp2 jpeg
jpeg2k kde kdeenablefinal kdexdeltas kipi lcms ldap libcaca libclamav logrotate
lzo mad matroska midi mikmod mmx mmxext mng mp3 mpeg mudflap mule musepack
musicbrainz ncurses nls nptl nptlonly nsplugin oav odbc offensive ofx ogg
openal opengl openmp pam pcre pdf perl pic png postgres ppds pppd python qt qt3
qt4 quicktime readline reflection samba sasl screen sdl session sharedmem slang
smartcard sndfile sox speex spell spl sqlite ssl svg symlink tcltk tcpd tetex
theora threads tiff tk truetype truetype-fonts type1-fonts unicode usb
userlocales utf8 vcd vorbis wxwindows x264 x86 xml xorg xosd xpm xsl xv xvid
xvmc zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix
dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter
mulaw multi null plug rate route share shm softvol" ELIBC="glibc"
INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz
cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de"
USERLAND="GNU" VIDEO_CARDS="nv nvidia fbdev vesa vga"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


> and EXACTLY which version of lvm2 you are using.

=sys-fs/lvm2-2.02.28-r2 (07:04:29 2007-11-21)(-clvm -cman -gulm nolvm1
-nolvmstatic readline -selinux)

> (The $Header$ string in the ebuild that you merged ideally).

# grep '$Header' $(equery which lvm2)
# $Header: /var/cvsroot/gentoo-x86/sys-fs/lvm2/lvm2-2.02.28-r2.ebuild,v 1.13
2007/11/19 19:06:07 jer Exp $

------- Comment #7 From Guenther Brunthaler 2007-11-21 10:56:13 0000 -------
Sorry: -nolvmstatic is what I am using *now* (because I need a running lvm);
this USE flag needs actually to be *set* in order to reproduce the problem!

------- Comment #8 From Robin Johnson 2007-11-29 00:29:28 0000 -------
seems like it's failing to load the snapshot module at times, which is also a
concern for LVM inside the genkernel initramfs. I made it build the snapshot
code into the binary always now in -r4.

------- Comment #9 From Guenther Brunthaler 2007-11-29 10:48:13 0000 -------
(In reply to comment #8)
> concern for LVM inside the genkernel initramfs. I made it build the snapshot
> code into the binary always now in -r4.

Fine, thanks. Seems to be the best solution until upstream fixes the problem.

BTW: Are Gentoo bug reports (which do not relate to only Gentoo-specific
problems) automatically relayed to upstream somehow?

------- Comment #10 From Robin Johnson 2007-11-29 10:57:20 0000 -------
For the most part, they aren't automatically relayed, but in cases where we
find it is an upstream problem, we have varying ways of handling it. Some
upstream folk have accounts here, others want it in certain other tracking
systems, etc.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug