Not possible to read USB drive (NCP)

Dear all,

My ncp installation is not able to read the USB drive since some days ago. I am not sure what’s wrong. It was working for more than 1 year already and this started happening after last update.

The output of ncp-report is the following

ncp-report
<--! Paste this in GitHub report -->
NextCloudPi diagnostics

NextCloudPi version  v1.34.1
NextCloudPi image    NextCloudPi_03-09-19
distribution         Raspbian GNU/Linux 10 \n \l
automount            yes
USB devices          sda 
datadir              /media/USBdrive/ncdata (doesn't exist)
rootfs usage         3.9G/15G
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                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               26min

Nextcloud configuration

An unhandled exception has been thrown:
Error: Class 'OC\Server' not found in /var/www/nextcloud/lib/base.php:594
Stack trace:
#0 /var/www/nextcloud/lib/base.php(1091): OC::init()
#1 /var/www/nextcloud/console.php(49): require_once('/var/www/nextcl...')
#2 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#3 {main}
HTTPd logs

乂'M�P�'��*
8�M��RS�:���M��V �?�:���M��[Thu Jan 21 14:57:13.606611 2021] [proxy_fcgi:error] [pid 1241:tid 1715835936] [client 192.168.178.68:48940] AH01071: Got error 'PHP message: PHP Warning:  filemtime(): stat failed for /media/USBdrive/ncp-backups/nextcloud-bkp_20201216_1608087624.tar in /var/www/ncp-web/backups.php on line 62PHP message: PHP Warning:  filesize(): stat failed for /media/USBdrive/ncp-backups/nextcloud-bkp_20201216_1608087624.tar in /var/www/ncp-web/backups.php on line 63PHP message: PHP Warning:  filemtime(): stat failed for /media/USBdrive/ncp-backups/nextcloud-bkp_20201231_1609383605.tar in /var/www/ncp-web/backups.php on line 62PHP message: PHP Warning:  filesize(): stat failed for /media/USBdrive/ncp-backups/nextcloud-bkp_20201231_1609383605.tar in /var/www/ncp-web/backups.php on line 63PHP message: PHP Warning:  filemtime(): stat failed for /media/USBdrive/ncp-backups/nextcloud-bkp_20210101_1609470007.tar in /var/www/ncp-web/backups.php on line 62PHP message: PHP Warning:  filesize(): stat failed for /media/USBdrive/ncp-backups/nextcloud-bkp_20210101_1609470007.tar in /var/www/ncp-web/backups.php on line 63'

Database logs


Nextcloud logs

tail: cannot open '/media/USBdrive/ncdata/nextcloud.log' for reading: Not a directory

There are actually two USB drives mounted on /media at the moment: myCloudDrive and USBdrive. The latter one being the right one I guess. How can I get rid of the former one?

ls -lh /media/

might reveal, that they are the same, just 1 drive, one is a symbolic link pointing to the other.
Did you use nc-automount ? Plug in and out other drives?

I prefer to use UUID and mount drives by adding a line to fstab.

Thanks for answering!
You are right. There is only one unit and a symbolic point to the other.

I tried mounting another USB drive and it works. It also created a symbolic point.

total 32K
drwxr-xr-x 9 root root 16K Jan  1  1970 LIVE
drwxr-xr-x 1 root root  60 Feb 21  2020 myCloudDrive
lrwxrwxrwx 1 root root  11 Jan 23 20:31 USBdrive -> /media/LIVE
lrwxrwxrwx 1 root root  19 Jan 23 20:31 USBdrive1 -> /media/myCloudDrive

I use nc-automount. Do you suggest an alternative way to do it?

Your welcome, I use UUID to manually mount, it gives me closer control of where and how drives will be mounted.

If you dont, it is okay as well: but better use actual PATH, rather then its symbolic link in config files, so things don’t mix up when you reboot, and symbolic links get re-generated in a different order, after a failure of any sort.