nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

NCP 1.55.1 Raspi4 image: impossible to use USB stick; never mounted; saves "USBdrive" to SD card

Open Knubbel opened this issue 1 year ago • 2 comments

System information

NextcloudPi version v1.55.1 NextcloudPi image OS Armbian-unofficial 24.8.2 Bookworm \l . 6.6.45-current-bcm2711 (aarch64) automount yes USB devices sda datadir /media/USBdrive/ncdata/data data in SD yes data filesystem ext2/ext3 data disk usage 4.5G/29G rootfs usage 4.5G/29G swapfile /var/swap dbdir /media/pendrive/ncdatabase Nextcloud check ok Nextcloud version 29.0.4.1 HTTPD service up PHP service up MariaDB service up Redis service up HPB service up Postfix service down Internet check ok Public IPv4 REMOVED SENSITIVE VALUE Public IPv6 REMOVED SENSITIVE VALUE Port 80 open Port 443 open IP REMOVED SENSITIVE VALUE Gateway REMOVED SENSITIVE VALUE Interface end0 Certificates REMOVED SENSITIVE VALUE NAT loopback no Uptime 2:25

Problem appears in first minutes of setting up new instance from a SD card which was imaged with official NCP image on Raspi 4. So I am not getting anywhere. I want to have the OS and NCP on SD card and data and db on a USB drive.

Even though I let the wizard format my USB drive (sda1) and I ask it to move data to my USB drive, it actually does not. NCP does create a folder called "media/USBdrive" but actually it still resides on the SD card. This took me quite some effort to realize. The physical sda USB stick is never mounted automatically by NCP.

Even when I mount it manually to a folder media/pendrive it all doesnt work as I can not shift the data dircetory there. See:

[ nc-datadir ] (Sun Sep 22 20:34:39 UTC 2024)
Maintenance mode enabled
moving data directory from /media/USBdrive/ncdata/data to /media/pendrive/ncdata...
BTRFS filesystem detected
Create subvolume '/media/pendrive/ncdata'
{"reqId":"o4ji31NuJK0u90YEXkev","level":2,"time":"2024-09-22T20:34:43+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory /media/USBdrive/ncdata/data/tmp is not present or writable","userAgent":"--","version":"29.0.4.1","data":[]}
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
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 web server write access to the root directory. See https://docs.nextcloud.com/server/29/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:167
Stack trace:
#0 /var/www/nextcloud/console.php(101): OC\Console\Application->loadCommands()
#1 /var/www/nextcloud/occ(11): require_once('...')
#2 {main}
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value logfile set to string /media/pendrive/ncdata/data/nextcloud.log
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
System config value tempdirectory set to string /media/pendrive/ncdata/data/tmp
Installing template 'php/opcache.ini.sh'...
Maintenance mode disabled
Installing template 'ncp-metrics.cfg.sh'...
The NC data directory has been moved successfully.

When I try to upload any file it fails with error.

As a consequence I am totally unable to create a working NCP instance unless I leave everything on the SD card forever.

Knubbel avatar Sep 22 '24 21:09 Knubbel