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?

Thanks for any clues.



Reply via email to