My nextcloud disk is refusing to mount, and I’d be very grateful of some help to make it work again.
<--! Paste this in GitHub report -->
<details>
<summary>NextCloudPi diagnostics</summary>
Cannot load Zend OPcache - it was already loaded
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 136
{“reqId”:“5xe2CLAa6CHXOMcQsOwp”,“level”:3,“time”:“2018-07-13T04:31:33+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log at /var/www/nextcloud/lib/private/Log/File.php#136”,“userAgent”:"–",“version”:“13.0.2.1”}
{“reqId”:“5xe2CLAa6CHXOMcQsOwp”,“level”:2,“time”:“2018-07-13T04:31:33+00:00”,“remoteAddr”:"",“user”:"–",“app”:“no app in context”,“method”:"–",“url”:"–",“message”:“Temporary directory /media/USBdrive/ncdata/tmp is not present or writable”,“userAgent”:"–",“version”:“13.0.2.1”}
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 136
{“reqId”:“5xe2CLAa6CHXOMcQsOwp”,“level”:3,“time”:“2018-07-13T04:31:34+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log at /var/www/nextcloud/lib/private/Log/File.php#136”,“userAgent”:"–",“version”:“13.0.2.1”}
{“reqId”:“5xe2CLAa6CHXOMcQsOwp”,“level”:3,“time”:“2018-07-13T04:31:34+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“chmod(): No such file or directory at /var/www/nextcloud/lib/private/Log/File.php#137”,“userAgent”:"–",“version”:“13.0.2.1”}
NextCloudPi version v0.57.17
NextCloudPi image NextCloudPlus_04-21-18
distribution Raspbian GNU/Linux 9 \n \l
automount yes
USB devices sda
datadir /media/USBdrive/ncdata (doesn’t exist)
rootfs usage 2.1G/30G
swapfile /var/swap
dbdir /var/lib/mysql
Nextcloud check error
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check ok
port check 80 open
port check 443 open
IP 192.168.1.5
gateway 192.168.1.1
interface eth0
NAT loopback yes
uptime 1:11
</details>
<details>
<summary>Nextcloud configuration</summary>
Cannot load Zend OPcache - it was already loaded
PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 136
{“reqId”:“JNA8mpK1TwxHpBWdks1u”,“level”:3,“time”:“2018-07-13T04:31:39+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log at /var/www/nextcloud/lib/private/Log/File.php#136”,“userAgent”:"–",“version”:“13.0.2.1”}
{“reqId”:“JNA8mpK1TwxHpBWdks1u”,“level”:2,“time”:“2018-07-13T04:31:39+00:00”,“remoteAddr”:"",“user”:"–",“app”:“no app in context”,“method”:"–",“url”:"–",“message”:“Temporary directory /media/USBdrive/ncdata/tmp is not present or writable”,“userAgent”:"–",“version”:“13.0.2.1”}
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. See https://docs.nextcloud.com/server/13/go.php?to=admin-dir_permissions
An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /var/www/nextcloud/lib/private/Console/Application.php:148
Stack trace:
#0 /var/www/nextcloud/console.php(89): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)
#2 {main}PHP Warning: fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 136
{“reqId”:“JNA8mpK1TwxHpBWdks1u”,“level”:3,“time”:“2018-07-13T04:31:40+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log at /var/www/nextcloud/lib/private/Log/File.php#136”,“userAgent”:"–",“version”:“13.0.2.1”}
{“reqId”:“JNA8mpK1TwxHpBWdks1u”,“level”:3,“time”:“2018-07-13T04:31:40+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"–",“url”:"–",“message”:“chmod(): No such file or directory at /var/www/nextcloud/lib/private/Log/File.php#137”,“userAgent”:"–",“version”:“13.0.2.1”}
</details>
<details>
<summary>HTTPd logs</summary>
[Thu Jul 12 06:25:03.247695 2018] [ssl:warn] [pid 976:tid 1992298496] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Jul 12 06:25:04.000937 2018] [mpm_event:notice] [pid 976:tid 1992298496] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured – resuming normal operations
[Thu Jul 12 06:25:04.001024 2018] [core:notice] [pid 976:tid 1992298496] AH00094: Command line: ‘/usr/sbin/apache2’
[Fri Jul 13 03:19:50.006673 2018] [mpm_event:notice] [pid 976:tid 1992298496] AH00491: caught SIGTERM, shutting down
[Fri Jul 13 03:20:08.844155 2018] [ssl:warn] [pid 666:tid 1992073216] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Fri Jul 13 03:20:09.042298 2018] [ssl:warn] [pid 904:tid 1992073216] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Fri Jul 13 03:20:10.002851 2018] [mpm_event:notice] [pid 904:tid 1992073216] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured – resuming normal operations
[Fri Jul 13 03:20:10.003021 2018] [core:notice] [pid 904:tid 1992073216] AH00094: Command line: ‘/usr/sbin/apache2’
</details>
<details>
<summary>Database logs</summary>
2018-07-13 3:19:52 1638409024 [Note] /usr/sbin/mysqld: Shutdown complete
2018-07-13 3:21:02 1989189632 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-07-13 3:21:02 1989189632 [Note] InnoDB: The InnoDB memory heap is disabled
2018-07-13 3:21:02 1989189632 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-07-13 3:21:02 1989189632 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-07-13 3:21:02 1989189632 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-07-13 3:21:02 1989189632 [Note] InnoDB: Using Linux native AIO
2018-07-13 3:21:02 1989189632 [Note] InnoDB: Using generic crc32 instructions
2018-07-13 3:21:02 1989189632 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-07-13 3:21:02 1989189632 [Note] InnoDB: Completed initialization of buffer pool
2018-07-13 3:21:02 1989189632 [Note] InnoDB: Highest supported file format is Barracuda.
2018-07-13 3:21:03 1989189632 [Note] InnoDB: 128 rollback segment(s) are active.
2018-07-13 3:21:03 1989189632 [Note] InnoDB: Waiting for purge to start
2018-07-13 3:21:03 1989189632 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 860792563
2018-07-13 3:21:03 1447031616 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-07-13 3:21:03 1989189632 [Note] Plugin ‘FEEDBACK’ is disabled.
2018-07-13 3:21:03 1989189632 [Note] Server socket created on IP: ‘127.0.0.1’.
2018-07-13 3:21:03 1989189632 [Note] /usr/sbin/mysqld: ready for connections.
Version: ‘10.1.23-MariaDB-9+deb9u1’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 Raspbian 9.0
</details>
<details>
<summary>Nextcloud logs</summary>
tail: cannot open ‘/media/USBdrive/ncdata/nextcloud.log’ for reading: No such file or directory
</details>