Mount external data drive

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

mount: /media/myCloudDrive: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.

Or for longer, use three backticks above and below the code snippet:

I updated NextCloudPi to version 1.15.1 I guess. In this task I also updated the Debian version underlying NextCloudPi. (I used the iso file and balena etcher). When i installed Ncp I set the data to an external drive. All worked smoothly for months. 
After the upgrade it seems that this external drive cannot be mounted or is not mounted. 
I tried to follow a few steps to look for the UUID, then add it to fstab (with ext4 and btrfs) and tried to mount it. I always get:

mount: /media/myCloudDrive: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.
Now I am lost. How do I mount this external drive and hopefully also automatically when I boot next time? What are the correct parameters?

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 1.15.1
Operating system and version (eg, Ubuntu 20.04): Linux nextcloudpi 6.1.21-v8+ #1642 SMP PREEMPT
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.56 (Debian)
PHP version (eg, 7.4): 7.4

The issue you are facing:

I updated NextCloudPi to version 1.15.1 I guess. In this task I also updated the Debian version underlying NextCloudPi. (I used the iso file and balena etcher). When i installed Ncp I set the data to an external drive. All worked smoothly for months. 
After the upgrade it seems that this external drive cannot be mounted or is not mounted. 
I tried to follow a few steps to look for the UUID, then add it to fstab (with ext4 and btrfs) and tried to mount it. I always get:

mount: /media/myCloudDrive: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.
Now I am lost. How do I mount this external drive and hopefully also automatically when I boot next time? What are the correct parameters?

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. reboot
  2. connect to website

The output of your Nextcloud log in Admin > Logging:

Cannot access gui

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

/var/www/nextcloud 

The output of your Apache/nginx/system log in /var/log/____:

error.log

[Sun Apr 09 00:00:00.771728 2023] [ssl:warn] [pid 943:tid 548191519808] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sun Apr 09 00:00:00.771967 2023] [ssl:error] [pid 943:tid 548191519808] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=archlinux / issuer: CN=archlinux / serial: 18C088C8F787E3CFD6C7C76280DC1F392C6E3DC2 / notbefore: Oct  8 19:39:52 2021 GMT / notafter: Oct  6 19:39:52 2031 GMT]
[Sun Apr 09 00:00:00.771987 2023] [ssl:error] [pid 943:tid 548191519808] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Sun Apr 09 00:00:00.774015 2023] [mpm_event:notice] [pid 943:tid 548191519808] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Sun Apr 09 00:00:00.774046 2023] [core:notice] [pid 943:tid 548191519808] AH00094: Command line: '/usr/sbin/apache2

No-error.log

[Sun Apr 09 09:43:32.895512 2023] [proxy_fcgi:error] [pid 328572:tid 547599933824] [client 192.168.168.45:52918] AH01071: Got error ‘PHP message: {“reqId”:“ZDJspCDS2eHXwj3UUpifLQAAAAs”,“level”:2,“time”:“2023-04-09T07:43:32+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 09:47:11.509991 2023] [proxy_fcgi:error] [pid 328572:tid 547591541120] [client 192.168.168.45:52992] AH01071: Got error ‘PHP message: {“reqId”:“ZDJtfyDS2eHXwj3UUpifLgAAAAw”,“level”:2,“time”:“2023-04-09T07:47:11+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 09:48:13.441430 2023] [proxy_fcgi:error] [pid 328572:tid 547725758848] [client 192.168.168.45:53006] AH01071: Got error ‘PHP message: {“reqId”:“ZDJtvSDS2eHXwj3UUpifLwAAAA4”,“level”:2,“time”:“2023-04-09T07:48:13+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 09:49:15.447168 2023] [proxy_fcgi:error] [pid 328572:tid 547708973440] [client 192.168.168.45:53018] AH01071: Got error ‘PHP message: {“reqId”:“ZDJt-yDS2eHXwj3UUpifMAAAABA”,“level”:2,“time”:“2023-04-09T07:49:15+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 09:50:17.449623 2023] [proxy_fcgi:error] [pid 328572:tid 547692188032] [client 192.168.168.45:53021] AH01071: Got error ‘PHP message: {“reqId”:“ZDJuOSDS2eHXwj3UUpifMQAAABI”,“level”:2,“time”:“2023-04-09T07:50:17+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 13:42:58.400169 2023] [proxy_fcgi:error] [pid 328572:tid 547574755712] [client 192.168.168.45:53091] AH01071: Got error ‘PHP message: {“reqId”:“ZDKkwiDS2eHXwj3UUpifMgAAABQ”,“level”:2,“time”:“2023-04-09T11:42:58+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 13:58:38.890761 2023] [proxy_fcgi:error] [pid 328572:tid 547331498368] [client 192.168.168.45:53183] AH01071: Got error ‘PHP message: {“reqId”:“ZDKobiDS2eHXwj3UUpifMwAAABg”,“level”:2,“time”:“2023-04-09T11:58:38+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 13:59:40.868248 2023] [proxy_fcgi:error] [pid 328573:tid 547608326528] [client 192.168.168.45:53197] AH01071: Got error ‘PHP message: {“reqId”:“ZDKorG0ocHO1GQg6kcunIQAAAEk”,“level”:2,“time”:“2023-04-09T11:59:40+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 14:00:42.831194 2023] [proxy_fcgi:error] [pid 328572:tid 547339891072] [client 192.168.168.45:53202] AH01071: Got error ‘PHP message: {“reqId”:“ZDKo6iDS2eHXwj3UUpifNAAAABc”,“level”:2,“time”:“2023-04-09T12:00:42+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 14:01:44.863323 2023] [proxy_fcgi:error] [pid 328573:tid 547692188032] [client 192.168.168.45:54730] AH01071: Got error ‘PHP message: {“reqId”:“ZDKpKG0ocHO1GQg6kcunIgAAAEg”,“level”:2,“time”:“2023-04-09T12:01:44+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’
[Sun Apr 09 14:02:46.901195 2023] [proxy_fcgi:error] [pid 328572:tid 547876761984] [client 192.168.168.45:54767] AH01071: Got error ‘PHP message: {“reqId”:“ZDKpZiDS2eHXwj3UUpifNQAAAAI”,“level”:2,“time”:“2023-04-09T12:02:46+00:00”,“remoteAddr”:“192.168.168.45”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/status.php”,“message”:“Temporary directory /media/myCloudDrive/ncdata/tmp is not present or writable”,“userAgent”:“Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-22.2.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“22.2.2.0”}’

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
Could not find

This doesn’t sound like the issue is with Nextcloud.

Can you show your fstab and mount command you are using?

Hi
Thanks
Since I use this only with NextCloudPi… I generally understand unix mounts, but not the parameters I need for the nextcloud external data disk I configured using the UI. Hence, I ask here.
PARTUUID=c77e91af-01 /boot vfat defaults,flush 0 2
PARTUUID=c77e91af-02 / ext4 defaults,noatime 0 1
UUID=2889c090-1b66-43fb-8506-6cc2c871e426 /media/myCloudDrive btrfs rw,users 0 0

a swapfile is not a swap partition, no line here

use dphys-swapfile swap[on|off] for that

sudo mount -a