>>> Matthew Schumacher <mat...@aptalaska.net> schrieb am 30.04.2021 um 16:26 in Nachricht <48d6dd35-25bd-71ae-8263-f4ae11dd3...@aptalaska.net>: > I have an issue that I'm not sure how to resolve so feedback is welcome. > > I need to mount a local NFS file system on my node before I start a > VirtualDomain resource which depends on it, however, the NFS server is > itself a resource on the cluster.
This is phasees as "NFS loop mount" (the server mounting ist own export). > > This causes the cart before the horse. If I insert a node into a > running cluster, this is pretty simple, mount nfs before starting > pacemaker, and if a VirtualDomain resource is immediately started, we > already have what we need. But that doesn't work on a cold cluster > because if I try to mount NFS on the node before the cluster starts the > NFS server, the mount fails. If I always mount NFS after I start That's what the "bg" (background) option is for. > pacemaker, then pacemaker will usually try to start VirtualDomain > resources before I can get further in the boot and mount NFS which > causes the VirtualDomain resource to fail to start. > > I think I need one of the following fixes: > > 1. Delayed start on VirtualDomain resources so that we give time to get > the file system mounted which feels hackish as it's the old sleep fix > for race conditions. > > 2. Make the nfs mount itself a resource and make VirtualDomain > resources depend on it. In order for this to work each node would need Naturally it would be a cluster resource. > it's own nfs mount resource, and VirtualDomain resources that can run on > any node would need to depend on the nfs mount resource of whatever node > they decide to run on but not the nfs mount resource of any other node. > I'm not sure how to make this work because the dependency changes with > what node the VirtualDomain resource is started on. You could also try a PING node for the NFS, and start only after the ping restuirns success. > > 3. Make the VirtualDomain resource call a script on start/migrate that > simply looks for the nfs mount, and if missing, try to mount. This seems > less hackish, but will ensure that we always try to get the nfs mount > going the first time the resource is moved/started there. Too complex IMHO. > > Any ideas or thoughts would be very helpful and appreciated. Regards, Ulrich > > Matt > > > _______________________________________________ > Manage your subscription: > https://lists.clusterlabs.org/mailman/listinfo/users > > ClusterLabs home: https://www.clusterlabs.org/ _______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/