2

I have the follwoing problem. I want to mount a glusterfs share over Infiniband on an CentOS 7 client. The glusterfs share '/data' is severed by a host called storage1. For the client I I setup and minimal CentOS system. I installed rdma and opensm to get the infiniband up running. Both are added to the boot sequence via

systemctl enable rdma.service 
systemctl enable opensm.service 

The network devices are managed using NetworkManager and ping storage1 works fine over the infiniband network. Then I added, as described in the gluster documentation an fstab entry:

storage1:/data   /net/data glusterfs       defaults,acl,_netdev    0       0 

When I now restarted the system the net-data.mount service failed. After the booting is finished I can log in and start I manually:

systemctl start net-data.mount 

and everything works fine. After analyzing the problem I found out that all other network shares (nfs, gluster) that use the normal ethernet connection of the client are mounted during boot. In the journalctl I found out that OpenSM, which is necessary for Inifiniband, is too slow during startup. The mount of the above mentioned shared is performend 5 seconds before OpenSM finishes its startup. But the service description of OpenSM says that it is wanted by the network.target and so it is stared before the network shares are mounted.

So my question is how I can either introduce a sleep timer somewhere in the boot sequence which waits until the Inifiniband network is really ready/OpenSM is reading.

I do not use the RDMA features of gluster.

The OpenSM service file is, as installed by yum/rpm:

[Unit]
Description=Starts the OpenSM InfiniBand fabric Subnet Manager
Documentation=man:opensm
DefaultDependencies=false
Before=network.target remote-fs-pre.target
Requires=rdma.service
After=rdma.service

[Service]
Type=forking
ExecStart=/usr/libexec/opensm-launch

[Install]
WantedBy=network.target

Edit: I found a workround which seems to a really bad one. I edited the /usr/libexec/opensm-launch and append sleep 15 at its and to systemd waits until the launch-script is finished.

Is it possible to integrate such behavior in systemd?

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
M.K. aka Grisu
  • 141
  • 1
  • 8

0 Answers0