Comment # 26 on bug 965890 from
(In reply to Dr. Werner Fink from comment #24)
> Current lio-utils does have a service unit with
> 
>  /usr/lib/systemd/system/target.service
> 
> hmpf ... ``perfect'' name now it's both a target and a service?
> 

No, it is a service named "target". Perhaps a bit generic, but otherwise
logically named. IMHO it really should have been named "lio-utils.service", but
perhaps that didn't type as easily when this service was named. It *is* an
iscsi _target_ service.

> 
> and if target.service has to wait for lvm then either lvm unit(s) has to set
> WantedBy= ... or this ``target.service'' may use Wants=
> or

I agree. I believe that the target service does indeed need to be started after
the LVM service is running, if LVM is running at all. Many end-users use LVM to
manage root and /usr, so the LVM service should be running fairly early.

(In reply to Per Jessen from comment #25)
> (In reply to Dr. Werner Fink from comment #24)
> > Current lio-utils does have a service unit with
> > 
> >  /usr/lib/systemd/system/target.service
> > 
> > hmpf ... ``perfect'' name now it's both a target and a service?
> 
> Yes, that is confusing.  
> 
> > and if target.service has to wait for lvm then either lvm unit(s) has to set
> > WantedBy= ... or this ``target.service'' may use Wants=
> 
> I also thought Wants= might be an option.

I don't believe "wants" is good, because that means you have to have LVM to run
lio-utils. I believe you can take care of this with a "After=". If so, the
question becomes "what do we want to run after?"

It looks like the LVM package has several services:

> # rpm -ql lvm2 | fgrep systemd
> /usr/lib/systemd/system-generators
> /usr/lib/systemd/system-generators/lvm2-activation-generator
> /usr/lib/systemd/system/blk-availability.service
> /usr/lib/systemd/system/lvm2-lvmetad.service
< /usr/lib/systemd/system/lvm2-lvmetad.socket
> /usr/lib/systemd/system/lvm2-monitor.service

And it looks like "blk-availability" is the catch-all service that says that
LVM block devices are ready.

So perhaps "After=blk-availability.service" ?
/usr/lib/systemd/system/lvm2-pvscan@.service

[this should have nothing to do with Yast]


You are receiving this mail because: