1 |
On Dec 7, 2013 12:40 PM, "walt" <w41ter@×××××.com> wrote: |
2 |
> |
3 |
> Just updated my stable amd64 machine to use systemd and all is working |
4 |
> okay except for the lvm.service. |
5 |
> |
6 |
> The lvm.service starts with no errors, but OTOH it finds no physical or |
7 |
> logical volumes. I suspect this happens because the drive using lvm2 |
8 |
> is in a usb3 external dock instead of attached to the mobo. |
9 |
> |
10 |
> When I run 'systemctl restart lvm' manually, the usb3 disk is activated |
11 |
> and mounted successfully. Thus I think the lvm.service runs too early |
12 |
> during boot. |
13 |
> |
14 |
> Here is my lvm.service (which I copied from another distro, IIRC): |
15 |
> |
16 |
> #cat /etc/systemd/system/lvm.service |
17 |
> |
18 |
> [Unit] |
19 |
> Description=LVM |
20 |
> DefaultDependencies=no |
21 |
> Requires=systemd-udev-settle.service |
22 |
> Before=shutdown.target local-fs.target |
23 |
> |
24 |
> [Service] |
25 |
> Type=oneshot |
26 |
> RemainAfterExit=yes |
27 |
> ExecStart=/sbin/pvscan --ignorelockingfailure |
28 |
> ExecStart=/sbin/vgscan --mknodes --ignorelockingfailure |
29 |
> ExecStart=/sbin/vgchange --sysinit -a ly |
30 |
> ExecStop=/sbin/lvchange --sysinit -a ln $(/sbin/vgs -o vg_name |
31 |
--noheadings --nosuffix) |
32 |
> ExecStop=/sbin/lvchange --sysinit -a ln |
33 |
> ExecStop=/sbin/vgchange --sysinit -a ln |
34 |
> |
35 |
> [Install] |
36 |
> WantedBy=sysinit.target |
37 |
> |
38 |
> Is there an elegant way to fix the problem as opposed to a hack? |
39 |
|
40 |
I believe that for recent enough versions of LVM2, it includes an official |
41 |
lvm2.service unit file(s). Could you try that one and see if it works as |
42 |
you expect? |
43 |
|
44 |
You should run systemd-delta from time to time to see if you are overriding |
45 |
anything in your /etc directory. |
46 |
|
47 |
Regards. |
48 |
> |
49 |
> |
50 |
> |