Hi,
So I have been working for some years now with my NCP setup. Iām running an instance with RockPro64, SD and a HDD with ncdata in a btrfs filesystem subvolume. However, some days ago, the HDD went to read-only filesystem. So I took a new HDD, format it on my PC with btrfs and created a ncdata subvolume. Then put all the ncdata from the old HDD to the new ncdata subvolume. Then I put the new HDD in the RockPro64 and it goes to maintenance mode. Taking out the /dev/sda1 (the HDD) line in the /etc/fstab, it boots well, but I canāt mount the BTRFS filesystem.
So I tried to format it with ncp-format-USB
. This tool tried to format the root filesystem in the SD (/dev/mmā¦something) instead of my HDD, but the ncdatabase is there, so it didnāt do it. The message said it would not delete the database.
So, I want to warn you about the tool because it can incorrectly detect the device to format. And at the same time, I want to ask how I should format my drive to get it working.
EDIT: you can find my ncp-report below.
Thank you in advance.
<ā! Paste this in GitHub report ā
NextcloudPi diagnostics
NextcloudPi version v1.52.0
NextcloudPi image NextCloudPi_10-08-21
OS Armbian 21.11.0-trunk Buster \l . 4.4.213-rockchip64 (aarch64)
automount yes
USB devices none
datadir /media/USBdrive/ncdata (doesn't exist)
rootfs usage 8,0G/29G
swapfile /var/swap
dbdir /var/lib/mysql
Nextcloud check error
HTTPD service up
PHP service up
MariaDB service up
Redis service up
HPB service down
Postfix service up
Internet check ok
Public IPv4 ***REMOVED SENSITIVE VALUE***
Public IPv6 ***REMOVED SENSITIVE VALUE***
Port 80 closed
Port 443 closed
IP ***REMOVED SENSITIVE VALUE***
Gateway ***REMOVED SENSITIVE VALUE***
Interface eth0
Certificates ***REMOVED SENSITIVE VALUE***
NAT loopback no
Uptime 2min
Nextcloud configuration
{"reqId":"Nz6vIQDNV9RLUnfE6Y4d","level":2,"time":"2023-06-01T10:32:48+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":"21.0.4.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/21/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:168
Stack trace:
#0 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands()
#1 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#2 {main}
HTTPd logs
[Thu Jun 01 10:36:53.294821 2023] [ssl:warn] [pid 1929:tid 547679436816] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 01 10:36:53.295431 2023] [ssl:error] [pid 1929:tid 547679436816] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=rockpro64 / issuer: CN=rockpro64 / serial: 7DF15F248D7F5E434B83C8341E8757F9BE4E8AF1 / notbefore: Oct 8 21:03:40 2021 GMT / notafter: Oct 6 21:03:40 2031 GMT]
[Thu Jun 01 10:36:53.295511 2023] [ssl:error] [pid 1929:tid 547679436816] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Thu Jun 01 10:36:53.305715 2023] [mpm_event:notice] [pid 1929:tid 547679436816] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Thu Jun 01 10:36:53.305870 2023] [core:notice] [pid 1929:tid 547679436816] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jun 01 10:36:55.435448 2023] [mpm_event:notice] [pid 1929:tid 547679436816] AH00493: SIGUSR1 received. Doing graceful restart
[Thu Jun 01 10:36:55.470128 2023] [ssl:warn] [pid 1929:tid 547679436816] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 01 10:36:55.470510 2023] [ssl:error] [pid 1929:tid 547679436816] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=rockpro64 / issuer: CN=rockpro64 / serial: 7DF15F248D7F5E434B83C8341E8757F9BE4E8AF1 / notbefore: Oct 8 21:03:40 2021 GMT / notafter: Oct 6 21:03:40 2031 GMT]
[Thu Jun 01 10:36:55.470540 2023] [ssl:error] [pid 1929:tid 547679436816] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Thu Jun 01 10:36:55.474433 2023] [mpm_event:notice] [pid 1929:tid 547679436816] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Thu Jun 01 10:36:55.474518 2023] [core:notice] [pid 1929:tid 547679436816] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jun 01 11:45:07.585859 2023] [mpm_event:notice] [pid 1929:tid 547679436816] AH00492: caught SIGWINCH, shutting down gracefully
[Thu Jun 01 11:45:25.359904 2023] [ssl:warn] [pid 1664:tid 548355186704] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 01 11:45:25.360692 2023] [ssl:error] [pid 1664:tid 548355186704] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=rockpro64 / issuer: CN=rockpro64 / serial: 7DF15F248D7F5E434B83C8341E8757F9BE4E8AF1 / notbefore: Oct 8 21:03:40 2021 GMT / notafter: Oct 6 21:03:40 2031 GMT]
[Thu Jun 01 11:45:25.360766 2023] [ssl:error] [pid 1664:tid 548355186704] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Thu Jun 01 11:45:25.444966 2023] [ssl:warn] [pid 1884:tid 548355186704] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 01 11:45:25.445465 2023] [ssl:error] [pid 1884:tid 548355186704] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=rockpro64 / issuer: CN=rockpro64 / serial: 7DF15F248D7F5E434B83C8341E8757F9BE4E8AF1 / notbefore: Oct 8 21:03:40 2021 GMT / notafter: Oct 6 21:03:40 2031 GMT]
[Thu Jun 01 11:45:25.445557 2023] [ssl:error] [pid 1884:tid 548355186704] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Thu Jun 01 11:45:25.454841 2023] [mpm_event:notice] [pid 1884:tid 548355186704] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Thu Jun 01 11:45:25.454993 2023] [core:notice] [pid 1884:tid 548355186704] AH00094: Command line: '/usr/sbin/apache2'
Database logs
Nextcloud logs
tail: no se puede abrir '/media/USBdrive/ncdata/nextcloud.log' para lectura: No existe el fichero o el directorio