Nextcloud - Your data directory is invalid

Hardware: Raspberry Pi at home
YunoHost version:
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes - I moved by folder to a external drive via these instructions - Adding an external storage to your server | Yunohost Documentation
If your request is related to an app, specify its name and version: Nextcloud 28.0.3~ynh2

Description of my issue

Sometimes my Nextcloud works, other times it gives me a error message “Your data directory is invalid. Ensure there is a file called “.ocdata” in the root of the data directory.” I can still access the yunohost/admin site when this happens. When I do a restart sometimes it works and other times it does not. Today I was logged for a few hours and everything seemed fine and then when I was trying to get my iphone to sync/transfer via the Nextcloud app it kept giving me a error that the server was temporarily unavailable. When I tried to access the Nextcloud site on my raspberry pi once again got the error. I have a feeling I get the error when Nextcloud tries to sync/transfer any files, but I don’t know how to prove it.

You could try to look at the system log, for example looking at dmesg messages with the command

dmesg -w

using sudo or the root user

Hi dominikm86,

Welcome to the forums!

:frowning: That’s inconvenient and unreliable

I’d have a look at the logs as Inoferin suggests. dmesg (with or without -w) would not run on my Yunohost, for one reason or another, while it does on my desktop machine.

If your Yunohost also complains, you could use tail -f /var/log/messages. It will print log records as they are appended. Keep your session open (or use a multiplexer such as tmux or screen) and see if you can get Nextcloud to reproduce the error message.

Does that imply a harddisk in an external enclosure, connected over USB?

Withouth more details: guessing a spinning disk. It should have power saving, so it will spin down when not in use. Then when Yunohost wants to access a file, the disk needs to spin up, perhaps exceeding the timings for the file system. This does not match your hunch it happens when Nextcloud is synchronizing files, because in that case the disk is already awake.

If the new disk is an SSD, it should wake up ‘instantly’, and we have to look for another culprit.

The problem was my external HDthat was plugged into my Raspberry Pi was not giving it enough power. I tried a different cable and it now works. I came to this conclusion using the dmesg -w command. Sorry, but I can’t give more information with error messages because I lost them.This can now be closed.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.