[PATCH 32/35] nvmf-autoconnect: add unit file for nvme-monitor.service

Martin Wilck mwilck at suse.com
Fri Jan 29 14:50:01 EST 2021


On Fri, 2021-01-29 at 11:08 -0800, Sagi Grimberg wrote:
> 
> > Signed-off-by: Martin Wilck <mwilck at suse.com>
> > ---
> >   nvmf-autoconnect/systemd/nvme-monitor.service | 17
> > +++++++++++++++++
> >   1 file changed, 17 insertions(+)
> >   create mode 100644 nvmf-autoconnect/systemd/nvme-monitor.service
> > 
> > diff --git a/nvmf-autoconnect/systemd/nvme-monitor.service b/nvmf-
> > autoconnect/systemd/nvme-monitor.service
> > new file mode 100644
> > index 0000000..d85b133
> > --- /dev/null
> > +++ b/nvmf-autoconnect/systemd/nvme-monitor.service
> > @@ -0,0 +1,17 @@
> > +[Unit]
> > +Description=NVMe Event Monitor for Automatical Subsystem
> > Connection
> > +Documentation=man:nvme-monitor(1)
> > +DefaultDependencies=false
> > +Requires=systemd-udevd-kernel.socket
> > +RequiresMountsFor=/sys
> > +Conflicts=shutdown.target
> > +After=systemd-udevd-kernel.socket
> > +Before=sysinit.target systemd-udev-trigger.service nvmefc-boot-
> > connections.service
> > +
> > +[Service]
> > +Type=simple
> > +ExecStart=/usr/sbin/nvme monitor -A -p
> 
> I've seen issues with assuming nvme sits in /usr/sbin/

Sure, this can be fixed. More fine tuning is possible, too. I learned
meanwhile that the dependency on systemd-udevd-kernel.socket is
unnecessary.

Regards
Martin






More information about the Linux-nvme mailing list