From: Benjamin Marzinski <bmarzins@redhat.com>
To: lixiaokeng <lixiaokeng@huawei.com>
Cc: linfeilong <linfeilong@huawei.com>,
dm-devel mailing list <dm-devel@redhat.com>,
Martin Wilck <mwilck@suse.com>,
"liuzhiqiang \(I\)" <liuzhiqiang26@huawei.com>
Subject: Re: [dm-devel] [Question] multipathd.service start failed when /var/run isn't mount
Date: Fri, 23 Jul 2021 11:56:03 -0500 [thread overview]
Message-ID: <20210723165603.GE3087@octiron.msp.redhat.com> (raw)
In-Reply-To: <85cb30a7-a873-b33d-4105-6e3e9675f105@huawei.com>
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
next prev parent reply other threads:[~2021-07-23 16:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 2:51 [dm-devel] [Question] multipathd.service start failed when /var/run isn't mount lixiaokeng
2021-07-22 21:42 ` Benjamin Marzinski
2021-07-23 6:27 ` lixiaokeng
2021-07-23 16:56 ` Benjamin Marzinski [this message]
2021-07-26 12:22 ` lixiaokeng
2021-07-26 16:28 ` Benjamin Marzinski
2021-08-12 11:09 ` Martin Wilck
2021-08-12 12:42 ` lixiaokeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210723165603.GE3087@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linfeilong@huawei.com \
--cc=liuzhiqiang26@huawei.com \
--cc=lixiaokeng@huawei.com \
--cc=mwilck@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).