Gentoo Archives: gentoo-user

From: Dirk Heinrichs <dirk.heinrichs@××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] lvm problem -- is timing?
Date: Sat, 20 Jun 2009 07:08:17
Message-Id: 200906200908.10610.dirk.heinrichs@online.de
In Reply to: Re: [gentoo-user] lvm problem -- is timing? by Mike Kazantsev
1 Am Samstag 20 Juni 2009 07:33:38 schrieb Mike Kazantsev:
2 > On Fri, 19 Jun 2009 22:15:12 -0600
3 >
4 > Maxim Wexler <maxim.wexler@×××××.com> wrote:
5 > > Seems if I add the commands:
6 > >
7 > > vgscan --mknodes
8 > > vgchange -a y
9 > > mount -a
10 > >
11 > > to /etc/conf.d/bootmisc and add it to the boot runlevel, the eee boots
12 > > to a coherent system BUT not before going through LVM failure, errors,
13 > > inability to find volumes etc through many console lines until just
14 > > after the line:
15 > >
16 > > *Configuring kernel parameters...
17 > >
18 > > comes
19 > >
20 > > Reading all physical volumes. This may take a while...
21 > > Found volume group "vg" using metadata type lvm2
22 > > 5 logical volume(s) in volume group "vg" now active
23 > > ...
24 > >
25 > > And everything is fine after that. So it looks like a question of
26 > > timing, of executing bootmisc or something like it earlier, say just
27 > > after loading dm-mod and dm-crypt and just before the line in the
28 > > console:
29 > >
30 > > *Setting up the Logical Volume Manager...
31 > >
32 > > When it all starts to fall apart.
33 > >
34 > > FWIW I'm using baselayout-2.
35 >
36 > I've had such problem in the past, even filed the bug:
37 >
38 > http://bugs.gentoo.org/show_bug.cgi?id=255237
39 >
40 > For me, the problem was that "device-mapper" initscript started after
41 > "lvm".
42 >
43 > I believe there's "after device-mapper" line already in lvm-2.02.45, so
44 > it should run fine, but as an additional precaution I have dm-crypt
45 > script at sysinit runlevel, which starts device-mapper and dm-crypt
46 > before lvm or even it's runlevel (boot).
47
48 That's not needed, it should be sufficient to have them all in the boot
49 runlevel:
50
51 # ll /etc/runlevels/boot
52 insgesamt 0
53 lrwxrwxrwx 1 root root 20 28. Dez 14:02 bootmisc -> /etc/init.d/bootmisc*
54 lrwxrwxrwx 1 root root 25 12. Apr 08:58 device-mapper -> /etc/init.d/device-
55 mapper*
56 lrwxrwxrwx 1 root root 19 12. Apr 08:59 dmcrypt -> /etc/init.d/dmcrypt*
57 lrwxrwxrwx 1 root root 16 28. Dez 13:53 fsck -> /etc/init.d/fsck*
58 lrwxrwxrwx 1 root root 20 28. Dez 14:02 hostname -> /etc/init.d/hostname*
59 lrwxrwxrwx 1 root root 19 28. Dez 14:02 hwclock -> /etc/init.d/hwclock*
60 lrwxrwxrwx 1 root root 19 28. Dez 17:20 keymaps -> /etc/init.d/keymaps*
61 lrwxrwxrwx 1 root root 22 28. Dez 14:02 localmount -> /etc/init.d/localmount*
62 lrwxrwxrwx 1 root root 15 12. Apr 08:58 lvm -> /etc/init.d/lvm*
63 lrwxrwxrwx 1 root root 19 28. Dez 14:02 modules -> /etc/init.d/modules*
64 lrwxrwxrwx 1 root root 16 28. Dez 13:53 mtab -> /etc/init.d/mtab*
65 lrwxrwxrwx 1 root root 18 28. Dez 14:02 net.lo -> /etc/init.d/net.lo*
66 lrwxrwxrwx 1 root root 18 28. Dez 13:53 procfs -> /etc/init.d/procfs*
67 lrwxrwxrwx 1 root root 16 28. Dez 13:53 root -> /etc/init.d/root*
68 lrwxrwxrwx 1 root root 16 28. Dez 13:53 swap -> /etc/init.d/swap*
69 lrwxrwxrwx 1 root root 18 28. Dez 14:02 sysctl -> /etc/init.d/sysctl*
70 lrwxrwxrwx 1 root root 24 28. Dez 14:02 termencoding ->
71 /etc/init.d/termencoding*
72 lrwxrwxrwx 1 root root 19 28. Dez 14:02 urandom -> /etc/init.d/urandom*
73
74 > It makes sense for me, since some lvm pv's (not root) are actually on
75 > encrypted partitions, although I mount these even earlier, but should
76 > initrd become incompatible w/ latest kernel, dm-crypt should do the job
77 > instead.
78
79 No, it does not make sense. You don't even need an initrd.
80
81 > Guess you can do the same, at least if you don't have dm-crypt
82 > mappings, or you can try adding device-mapper to sysinit level directly.
83
84 As said above, it's not not needed. Maybe it's better to investigate wether
85 there are any leftovers from baselayout 1 in the runlevels. This was at least
86 the reason I got an unbootable system after switching to bl 2.
87
88 HTH...
89
90 Dirk

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] lvm problem -- is timing? Mike Kazantsev <mk.fraggod@×××××.com>
Re: [gentoo-user] lvm problem -- is timing? Maxim Wexler <maxim.wexler@×××××.com>