Bug 1380137 - When /var is a separate filesystem, nfs-server.service fails if export is iscsi based
Summary: When /var is a separate filesystem, nfs-server.service fails if export is isc...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks: 1298243 1385242 1477664 1546181
TreeView+ depends on / blocked
 
Reported: 2016-09-28 18:09 UTC by John Pittman
Modified: 2021-09-09 11:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-18 17:37:00 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2664671 0 None None None 2016-09-28 19:03:55 UTC

Description John Pittman 2016-09-28 18:09:24 UTC
Description of problem:

When /var is a separate filesystem, nfs-server.service fails if export is iscsi based.  Issue does not happen if /var is located on the same filesystem as root.

Version-Release number of selected component (if applicable):

kernel-3.10.0-327.36.1.el7.x86_64
systemd-219-19.el7_2.13.x86_64
nfs-utils-1.3.0-0.21.el7_2.1.x86_64

How reproducible:

- Install system where /var is separate filesystem from /
- Connect to iscsi target, create logical volume, ext4 fs on dev
- Add fs to /etc/fstab
- Add mount point to /etc/exports
- Ensure nfs-server.service is set to start at boot
- Reboot

Actual results:

nfs-server.service will fail to start

Expected results:

nfs-server.service should not fail to start

Additional info:

Issue can be worked around by adding the below to /lib/systemd/system/nfs-server.service

RequiresMountsFor=<mount-point>

During troubleshooting, to the nfs-server.service file in the [Unit] section I tried adding After=iscsid.service and After=lvm2-pvscan@.service.  Neither of these worked around the issue.

Comment 4 Steve Whitehouse 2016-12-09 16:08:18 UTC
So this looks like a boot ordering issue. What is the correct solution here? Is it just a matter of documenting how to set the dependencies such that the NFS export will not be attempted until the exported fs is available, or is there actually a change that we need to avoid the problem in the first place?

I'd prefer the latter if it is possible, but not quite sure what systemd will be able to express dependency-wise.

Setting devel cond nack for the time being, but please update if that is not correct.

Comment 8 Steve Dickson 2018-04-17 13:51:37 UTC
What is the error causing the server not to come up?

Comment 9 John Pittman 2018-04-18 16:09:58 UTC
I can no longer reproduce this issue at the latest levels.

kernel-3.10.0-862.el7.x86_64
iscsi-initiator-utils-6.2.0.874-7.el7.x86_64
nfs-utils-1.3.0-0.54.el7.x86_64

Comment 10 Steve Dickson 2018-04-18 17:37:00 UTC
(In reply to John Pittman from comment #9)
> I can no longer reproduce this issue at the latest levels.
> 
> kernel-3.10.0-862.el7.x86_64
> iscsi-initiator-utils-6.2.0.874-7.el7.x86_64
> nfs-utils-1.3.0-0.54.el7.x86_64

Ok... I'm going close the bug for now... if the 
problem pops back up... Please feel free to reopen


Note You need to log in before you can comment on or make changes to this bug.