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

hosting

#1

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


#2

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


#3

Hello Tom,

is the problem known or addressed in 8.1.1?


#4

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.


#5

Yes,

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


#6

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.


#7

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


#8

exactly - that's the question