Start owncloud only if the data folder on a nfs mount is available

Hello,

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?

best regards

Heiko

A quite good idea would be to use a recent / supported ownCloud version first: https://owncloud.org/changelog/

Hello Tom,

is the problem known or addressed in 8.1.1?

Wait a sec. Is this a for sure thing? Just setting up first NC server and it's using an external USB drive mounted in Ubuntu.

Is there a real risk that I can lose everything if one day the server reboots and the storage doesn't mount?

This will happen at least once. Maybe if the power gets a hit.

W.

Yes,

i think, this is a real risk.
Happened some times. No nice thing.

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. :slight_smile:

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:

https://doc.owncloud.org/server/latest/admin_manual/issues/general_troubleshooting.html#missing-data-directory

1 Like

exactly - that's the question