1

I have an AWS EFS that I want my Centos 7 server to mount on boot. The line from /etc/fstab that is meant to accomplish this is:

xxxxxxx.efs.us-east-1.amazonaws.com:/ /mnt/EFS nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,_netdev 0 0

When I log on to the server after a reboot the file system is not mounted; however, if I do mount -a the share will mount without errors. Looking at the log it appears that there is an ordering cycle that is removing the mount from startup. Relevant logs:

systemd[1]: Found ordering cycle on nfs-server.service/start
systemd[1]: Found dependency on www\x2ddata.mount/start
systemd[1]: Found dependency on nfs-server.service/start
systemd[1]: Breaking ordering cycle by deleting job www\x2ddata.mount/start

When I do

systemctl show -p Requires,Wants,Requisite,BindsTo,PartOf,Before,After nfs-server.service

I do see www\x2data.mount listed; however, running the same on that service does not list any dependencies.

nfs-utils version 1.3.0-0.48.e17_4

I don't know what the next step to troubleshoot this should be, any help would be greatly appreciated.

TheGentleman
  • 291
  • 1
  • 2
  • 8
  • 1
    why not try to use automount/autofs to mount the NFS share instead of the fstab ? (that could potentially crash your boot in case of a problem or latency) – olivierg Oct 27 '17 at 19:32
  • That may be an option. I'd still like to figure out why it isn't working using fstab. I'm not particularly concerned with latency and if there is a problem I don't want the server to boot (it is part of an autoscaling group and I'd want the instance terminated as unhealth since the files on the share are required for the server's role anyway). – TheGentleman Oct 27 '17 at 19:43
  • i see. i don't know if there is an option in the OS that could "prohibit" the mount of NFS shares via the fstab, it might be worth checking. – olivierg Oct 27 '17 at 19:46
  • I'm fairly sure that has something to do with the ordering cycle. Additionally, I just did some tests on another server that is running an older version of `nfs-utils`. That one works properly and that version of `nfs-utils` doesn't have the `www\x2data.mount` requirement in the service. I may just downgrade for sake of expediency unless someone has seen this before. – TheGentleman Oct 27 '17 at 19:48

0 Answers0