i have an owncloud 8.1.1 server whose data directory is a nfs mount. Sometimes when starting the server my complete owncloud folder is wiped. I assume, that owncloud starts before the mount is available and then wipes the files.
How can i configure owncloud to start only if the nfs mount is available?
I'm guessing you mean how do you delay the start of Apache and MySQL until the NFS mount is mounted? This is more to do with how services are managed on your system, and what order they're started in. Look at how services are managed on your system, and consider delaying the start of Apache and MySQL or only starting them if the NFS mount is mounted.
Might be possible but i think you should upgrade such an ancient version anyway.
I did also a short search on the documentation of ownCloud an stumbled over the following documentation where the behavior of ownCloud is explained once the datadirectory is missing: