NFS automounts fail to mount to Storage Foundation controlled filesystems on boot

book

Article ID: 100033930

calendar_today

Updated On:

Description

Overview of solution

Procedure

1. Use mkdir to make the following directories.
     mkdir /etc/systemd/system/autofs.service.d
     mkdir /etc/systemd/system/nfs-server.service.d


2. Create a vxvm.conf file in each of the above directories. Add the following to each file:
[Unit]
After=vxvm-recover.service


3. Use systemctl to reload the systemd daemon.
systemctl daemon-reload


4. View the "critical-chain" of the services in systemd and verify that "vxvm-recover" is listed"
systemd-analyze critical-chain autofs.service
 
autofs.service +1.168s
+-vxvm-recover.service @1min 28.373s +7.163s
  +-vxvm-boot.service @7.274s +1min 21.097s
    +-iscsi.service @7.154s +97ms
      +-network-online.target @7.101s
        +-network.target @6.957s
          +-wicked.service @4.891s +2.046s

Notes: 
  • The time after the unit is active or started is printed after the "@" character.

  • The time that the unit takes to start is printed after the "+" character.

     
5. Run the following command:
systemd-analyze critical-chain nfs-server.service

nfs-server.service +83ms
+-vxvm-recover.service @1min 28.373s +7.163s
  +-vxvm-boot.service @7.274s +1min 21.097s
    +-iscsi.service @7.154s +97ms
   

 
6. Disable and enable autofs with systemd to verify that the service file is correct.
systemctl disable autofs.service
systemctl enable autofs.service
 

7. Disable and enable nfs with systemd to verify that the service file is correct.
systemctl disable nfs.service
systemctl enable nfs.service
 

8. Disable and enable nfs-server with systemd to verify that the service file is correct.
systemctl disable nfs-server.service
systemctl enable nfs-server.service

Cause

This happens because autofs starts before Volume Manager has started. Additionally, no udev calls are made to the system, therefore udev and systemd are unaware of the volumes prior to Volume Manager starting.

Issue/Introduction

When automounts are used to mount NFS shares on Volume Manager controlled file systems on boot, the autofs service fails. This causes the automounts to not be mounted. Furthermore, autofs no longer responds to any automounts that are called without completely stopping and starting the autofs service.