Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: [systemd] lvm.service running too early? [HACKED--]
Date: Sun, 08 Dec 2013 23:53:27
Message-Id: CADPrc80uzrfMyy0UOg3_-xuVDfE=PnetJhY3PeMLDpJWuqnoDw@mail.gmail.com
In Reply to: Re: [gentoo-user] Re: [systemd] lvm.service running too early? [HACKED--] by Sam Jorna
1 On Sun, Dec 8, 2013 at 5:39 PM, Sam Jorna <sam.t.jorna@×××××.com> wrote:
2 > -----BEGIN PGP SIGNED MESSAGE-----
3 > Hash: SHA1
4 >
5 > On 09/12/13 09:36, walt wrote:
6 >> On 12/08/2013 10:39 AM, Neil Bothwick wrote:
7 >>> On Sun, 8 Dec 2013 11:12:23 -0600, Canek Peláez Valdés wrote:
8 >>>
9 >>>>> It has the same problem. I looked more carefully at the systemd logs
10 >>>>> and found that lvm was running before the xhci kernel module was
11 >>>>> loaded, hence the usb3 drive was not visible yet.
12 >>>>>
13 >>>>> I "fixed" the problem by adding "After=basic" to the lvm.service
14 >>>>> file, and now it works as expected. (Expected by me, anyway :)
15 >>>>
16 >>>> Well, at least is working, however is kinda an ugly fix. Could you
17 >>>> create the file /etc/modules-load.d/usb3.conf, with the line xhci in
18 >>>> it, reboot, and see if your little hack is not needed then? Also, if
19 >>>> you are using an initramfs, could you rebuild it before trying?
20 >>>
21 >>> Alternatively, build xhci into the kernel, since you need it at every
22 >>> boot.
23 >>
24 >> Both of the suggestions above reversed the order of the journalctl
25 >> messages so that the usb3 drive appears before lvm.service is run,
26 >> but pvscan still finds no volumes and the volume group is not active
27 >> after bootup :(
28 >>
29 >> I changed After=basic.target to After=sysinit.target, which still
30 >> gets it working well enough for my primitive needs. IMHO that fix
31 >> allows me to decrement ${HACKED} by one :)
32 >>
33 >>
34 >>
35 >>
36 >>
37 >>
38 > Just a thought, but isn't there a unit file for autoloading modules
39 > (therefore making it usable as a After= target)?
40
41 That's what /etc/modules-load.d is for:
42
43 http://www.freedesktop.org/software/systemd/man/modules-load.d.html
44
45 Regards.
46 --
47 Canek Peláez Valdés
48 Posgrado en Ciencia e Ingeniería de la Computación
49 Universidad Nacional Autónoma de México