External storage Invalid cross-device link

external_storage
nc15

#1

Hi all,

The issue you are facing:

If i try to remove a folder in an external storage i face the message that during the process an error occured. Of course i try it via Webinterface.
But I have refresh the site the folder got deleted.
In the logfiles are following information

Nextcloud[10112]: {PHP} rename(): The first argument to copy() function cannot be a directory at /usr/share/nginx/nextcloud/lib/private/Files/Storage/Local.php#272
Nextcloud[10112]: {PHP} rename(//media/Video/tmp/test,//mnt/nextcloud/data/cinux/files_trashbin/files/test.d1552610147): Invalid cross-device link at /usr/share/nginx/nextcloud/lib/private/Files/Storage/Local.php#272

As far as i have understand the problem is, that the external storage is a different partition as the data location of nextcloud itself. Also its sounds like a php issue itself. But this will not help me here to be able to create and delete folders on external storages… I’m much more surprised that there are not so many contributions about this problem. Because more or less everyone will have a external storage with an bigger HDD then that one where nextcloud is running on it.

Nextcloud version (eg, 12.0.2): 15.0.4
Operating system and version (eg, Ubuntu 17.04): Centos7
Apache or nginx version (eg, Apache 2.4.25): nginx 1.12.2
PHP version (eg, 7.1): 7.2.14

Steps to replicate it:
unsure but:

  1. change the data folder of nextcloud (not sure if it related to the issue)
  2. add an external storage which is located on a other partition
  3. create a folder in the external storage via WebGui and try to remove it

#2

This is an assumption and does not apply to me.

Do you mean that after you refreshed to web page the folder went away and has been deleted on your external storage?


#3

Ok Ok, maybe not all will use external storage. :wink:

Yes, i trigger the deletion of the folder in the web page. I receive the message that it failed with an error and if i refresh the website the folder went away. Of course also from the external storage.


#4

Hello everyone.

Same situation here. Found this topic while googling for a solution.
I’m using Nextcloud form docker. External storage is a volume mounted to container. On the other side of the volume just a folder on a regular linux ext4 parition.