On Dec 7, 2013 12:40 PM, "walt" <w41...@gmail.com> wrote:
>
> Just updated my stable amd64 machine to use systemd and all is working
> okay except for the lvm.service.
>
> The lvm.service starts with no errors, but OTOH it finds no physical or
> logical volumes.  I suspect this happens because the drive using lvm2
> is in a usb3 external dock instead of attached to the mobo.
>
> When I run 'systemctl restart lvm' manually, the usb3 disk is activated
> and mounted successfully.  Thus I think the lvm.service runs too early
> during boot.
>
> Here is my lvm.service (which I copied from another distro, IIRC):
>
> #cat /etc/systemd/system/lvm.service
>
> [Unit]
> Description=LVM
> DefaultDependencies=no
> Requires=systemd-udev-settle.service
> Before=shutdown.target local-fs.target
>
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> ExecStart=/sbin/pvscan --ignorelockingfailure
> ExecStart=/sbin/vgscan --mknodes --ignorelockingfailure
> ExecStart=/sbin/vgchange --sysinit -a ly
> ExecStop=/sbin/lvchange --sysinit -a ln $(/sbin/vgs -o vg_name
--noheadings --nosuffix)
> ExecStop=/sbin/lvchange --sysinit -a ln
> ExecStop=/sbin/vgchange --sysinit -a ln
>
> [Install]
> WantedBy=sysinit.target
>
> Is there an elegant way to fix the problem as opposed to a hack?

I believe that for recent enough versions of LVM2, it includes an official
lvm2.service unit file(s). Could you try that one and see if it works as
you expect?

You should run systemd-delta from time to time to see if you are overriding
anything in your /etc directory.

Regards.
>
>
>

Reply via email to