Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Localmount starts before LVM
Date: Tue, 11 Dec 2012 06:46:17
Message-Id: 746c29ef292bc902135374e65f181890.squirrel@www.antarean.org
In Reply to: [gentoo-user] Localmount starts before LVM by Nilesh Govindrajan
1 > Hi,
2 >
3 > I have a raid0 (kernel autodetect) array, over which I have put LVM
4 > and then there are volumes on the LVM for /var, /tmp, swap and /home.
5 >
6 > The problem is, raid0 array gets recognized, but localmount fails to
7 > mount because lvm doesn't seem to start before localmount (due to my
8 > root being on SSD, I can't watch the output of openrc easily).
9 >
10 > For now I have added this to my rc.conf -
11 > rc_localmount_before="lvm"
12
13 In other words: "localmount" should run before "lvm"
14
15 > rc_localmount_need="lvm"
16
17 "localmount" requires "lvm"
18
19 > rc_lvm_after="localmount"
20
21 "lvm" should run after "localmount"
22
23 Line 1 and 3 do the same. Line 2 is a contradiction.
24
25 > This fixes the problem, but localmount still executes before lvm and
26 > terminates with operational error. Then lvm starts up and localmount
27 > runs again successfully.
28 >
29 > Any idea why this happens?
30
31 Yes (See above)
32
33 > The localmount script in init.d has proper depends:
34 >
35 > depend()
36 > {
37 > need fsck
38 > use lvm modules mtab
39 > after lvm modules
40 > keyword -jail -openvz -prefix -vserver -lxc
41 > }
42
43 This should work.
44
45 I actually have a similar setup and did not need to add the lines to rc.conf.
46 All I did was do what I was told:
47 Add "lvm" to the "boot" runlevel.
48
49 Can you remove the lines from "rc.conf", ensure "lvm" is in the "boot"
50 runlevel (And not in any other, like "default") and then let us know if
51 you still get the error during reboot?
52
53 If it all goes by too fast, can you press "I" during boot to get
54 interactive and then let us know:
55 1) Which starts first, "lvm" or "localmount"
56 2) What error messages do you see for any of the services.
57
58 Kind regards,
59
60 Joost Roeleveld

Replies

Subject Author
Re: [gentoo-user] Localmount starts before LVM Nilesh Govindrajan <me@××××××××.com>