NextcloudPi - Your data directory is invalid

Running NextcloudPi on a Rock64 [0] and getting this nasty “blue screen of death”:

ERROR

Your data directory is invalid

Ensure there is a file called ".ocdata" in the root of the data directory.

Cannot create "data" directory

This can usually be fixed by giving the webserver write access to the root directory

My data directory is on an external HDD enclosure (4 HDDs as RAID1+0, btrfs) via USB. Permissions are correct, .ocdata file does exist. I had to deactivate auto mount since it got mounted twice. My mount command in /etc/fstab looks like

LABEL=mediasonic       /mnt/raid       btrfs   defaults,noatime,nodiratime,nossd,compress=lzo  0       0

After I got stuck with above error, I tried to move my data directory (with ncp-config → CONFIG → nc-datadir) and adapted the datadirectory property in /var/www/nextcloud/config/config.php to the new data directory. Then ran the cron job, like so:

sudo -u www-data php -f /var/www/nextcloud/cron.php

Seems like I’m stuck. Nothing did fix this issue. Anyone has an idea what could have caused this hiccup and how I can resolve it? Thanks for your help!

NextcloudPi version 1.26.2:
Apache 2.4:
PHP version 7.3.19:

[0] ROCK64 | PINE64

How did you install, what image (link?) did you use and which HowTo (link?) did you follow. (linkto ncp docs)

run

sudo ncp-report

post to pastebin com or similar. if need more help.
I’d try mounting with rw,users instead of defaults
Check if mounted proper with df -lh
make sure .ocdata is owned by www-data

Have not seen those, since the 19Nineteens! \0/ , could you share a screenshot?

What do u get on

sudo btrfs filesystem show

?

Just the list of disks used in my raid:

This is what I mean by “blue screen of death” :wink:

Thanks, @OliverV.

I installed the following image on an microSD card: NextCloudPi_Rock64_03-28-20.tar.bz2 back in April I think. The system had no hiccups. A few days ago I updated NextcloudPi to 1.26.2 and rebooted. This is when the system turned sour, ie. automount found the raid and it was mounted several times on my system. I deactivated auto mount a few days back to no avail. And used

  • Tried your suggestion to mount the raid with rw,users instead default. Same error message.
  • df -lh shows the raid is properly mounted at the right mount point, right folder.
  • .cdata is owned by www-data

And www-data has write access to the directory and /var/www/nextcloud/config/config.php shows the correct path?

@FadeFx: Yes, sir. www-data has write access to the “nextcloud data folder” and config.php points to this folder.