[CentOS-devel] Vagrant centos/7 v1811.01 breaks nfs at boot

Wed Jan 16 21:05:09 UTC 2019
John-Paul Robinson <jprorama at gmail.com>

Hi Laurențiu,

Thanks for the comments.

I tried the newest 1812.01 image, which again does have XFS (but not 
volumes).  The behavior remains the same wrt NFS mounts in the fstab 
failing to mount at boot.  I did try the _netdev flag and that doesn't 
fix it either.

When I go back to 1804.02 the NFS mounts work fine at boot, and don't 
require _netdev either (we do use nodev, not sure what impact if any 
that has).

Here's the fstab from the 1804.02 image.  The NFS config is identical 
across working and non-working configs:

/dev/mapper/VolGroup00-LogVol00 /                       xfs 
defaults        0 0
UUID=570897ca-e759-4c81-90cf-389da6eee4cc /boot xfs     defaults        0 0
/dev/mapper/VolGroup00-LogVol01 swap                    swap 
defaults        0 0
10.1.1.1:/home /home nfs nfsvers=3,nodev,nosuid,noatime 0 0
10.1.1.1:/opt/ohpc/pub /opt/ohpc/pub nfs nfsvers=3,nodev,noatime 0 0

For reference, the NFS config is added to fstab in the ansible role that 
preps the open ondemand node:

https://github.com/jprorama/CRI_XCBC/blob/uab-dev/roles/prep_ood/tasks/main.yaml#L26

(Note this is in a submodule of the ohpc_vagrant repo link in my 
original email.)

I'm not sure what's going on here.  The only thing superficially 
different is the volume manager config.  That may be perturbing the 
timing enough to to avoid the issue.   I'm aware that relying on timing 
is not viable.

The main reason I see this as an issue is that I started my tests with 
1804.02 where the NFS mounts do work correctly at boot.  So I know it 
/can/ work. :)  If I'd started with a later build (like some of my 
colleagues), I'd never have considered it a working feature. ;)

Hope this provides some insight.  Happy to provide more info if it helps.

John-Paul

On 1/12/19 3:24 PM, Laurențiu Păncescu wrote:
> Hi John-Paul,
>
> I think you have a more generic problem, not something affecting just 
> the Vagrant images.
>
> On 2019-01-11 22:19, John-Paul Robinson wrote:
>> It seems that the latest vagrant box for centos/7 is breaking nfs
>> mounts at boot.   My vagrant project has an nfs server and client
>> node.  The client has two nfs mount in fstab.
>> https://gitlab.rc.uab.edu/jpr/ohpc_vagrant
>>
>> Using the image from the prior release (1804.02, kernel
>> 3.10.0-862.2.3.el7.x86_64, CentOS Linux release 7.5.1804 (Core) ) the
>> mounts complete successfully.  The newest releases (1811.02 and
>> 1809.01) fail to mount the drives at boot.
>
> We'll go back to using XFS in starting with 1812, but I wouldn't rely 
> on timing to see if NFS is going to work or not - that's too fragile.  
> I wasn't able to find an fstab in the Ansible playbooks your repo 
> points to, perhaps you could provide a direct link?
>
> Are you already using the _netdev mount option in your fstab? That 
> should make sure that these mounts are only attempted after the 
> network is working.  This should be mentioned by 'man systemd-mount', 
> didn't use NFS myself though.
>
> Best regards,
> Laurențiu