On Fri, Jul 23, 2021 at 02:27:58PM +0800, lixiaokeng wrote: > > > On 2021/7/23 5:42, Benjamin Marzinski wrote: > > On Thu, Jul 22, 2021 at 10:51:22AM +0800, lixiaokeng wrote: > >> When we enable multipathd.service with systemctl and reboot, > >> multipathd doesn't start and log "failed to create pidfile". > >> > >> The reason is following: > >> > >> The RUN is /var/run in multipath-tools. When we start linux, we > >> mount a disk to /var. So if multipathd.service start before mount, > >> it will fail to activate.(If mount firstly, multipathd will start > >> successfully) > >> > >> The RUN is defined in Makefile.inc: > >> > >> ifndef RUN > >> ifeq ($(shell test -L /var/run -o ! -d /var/run && echo 1),1) > >> RUN=run > >> else > >> RUN=var/run > >> endif > >> endif > >> > >> Can it always be defined as run? > > > > I believe all modern distributions make /var/run a symlink to /run. > > However, if that's the case, then I don't understand why you are running > > into this issue at all, since multipath should be using /run. What > > multipath packages are you using? > Yes, there is a symlink to /run in /var. But it is in the disk (such as > sdb) mounted on /var actually. When reboot, systemd start multipathd > service firstly then mount sdb to /var. In this way, the multipath > service will not start. > > After sdb mounted to /var, we can start multipathd service successfully.
But when the binaries were compiled, if /var/run existed and was a symlink in your build environment, then RUN should equal "run", and multipath should should be using /run instead of /var/run, right? This is why I asked what multipath packages are you using. -Ben > > > > -Ben > > > >> > >> Regards, > >> Lixiaokeng > > > > . > > -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel