1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-29 21:55:56 +03:00
lvm2/scripts/lvm2_pvscan_systemd_red_hat@.service.in
Michael Lass 666738d57a systemd: stop lvm2-pvscan@.service before lvm2-lvmetad.service
When lvm2-pvscan@.service and lvm2-lvmetad.service are scheduled to be
stopped lvm2-pvscan@.service should be stopped first since pvscan uses
lvmetad.

This is especially important if lvm2-lvmetad.socket is also scheduled to
be stopped as in this case connection requests are suppressed causing
pvscan to fail.
2015-03-31 15:47:01 +02:00

16 lines
390 B
SYSTEMD

[Unit]
Description=LVM2 PV scan on device %i
Documentation=man:pvscan(8)
DefaultDependencies=no
BindsTo=dev-block-%i.device
Requires=lvm2-lvmetad.socket
After=lvm2-lvmetad.socket lvm2-lvmetad.service
Before=shutdown.target
Conflicts=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=@sbindir@/lvm pvscan --cache --activate ay %i
ExecStop=@sbindir@/lvm pvscan --cache %i