Error deleting/moving files in second MergerFS 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:

example

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

longer
example
here

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: 25.0.2
Operating system and version: Ubuntu 20.04 LTS - Docker
nginx version: 1.20.2
PHP version: 8.0.25

The issue you are facing:

  • MergerFS setup:
    I have a MergerFS pool (/mnt/pool) consisting of two 4TB drives (/mnt/disk1 & /mnt/disk2) merging into one 8TB pool.
    In the pool there is a movie folder, whatever I place in it gets put in one of either drives (so basically each of the drives has the same root movie folder, but with different movies inside; end user sees everything merged in one movie folder).

    • fstab:
      • UUID=464c0ad0-c349-45f7-97fe-a2f3fe682855 /mnt/disk1 ext4 nofail 0 0
      • UUID=ca07062e-bdc4-4c83-8596-831b969930e9 /mnt/disk2 ext4 nofail 0 0
      • /mnt/disk* /mnt/pool fuse.mergerfs category.create=mspmfs,defaults,allow_other,use_ino,cache.files=partial,dropcacheonclose=true,nonempty 0 0
  • Nextcloud setup:
    Running on LinuxServer’s docker image (latest).

    • 2 volume mappings:
      • /home/xxxxx/Docker/nextcloud:/config
      • /mnt/pool/Nextcloud:/data
    • I am using the app “Group folders (13.1.0)” to access the movie folder:
      • /mnt/pool/Nextcloud/__groupfolders/5/movies

Issue is that if i try deleting/moving a file/folder that is located in disk2, it doesn’t work;
Meanwhile files/folders on disk1 can be normally deleted/moved.
(Note that from NC they all sit in the same folder, I had to go look myself outside of the pool to troubleshoot).

Is this the first time you’ve seen this error?
Yes since adding a second drive.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"eZ9l8jEazqPe0NJnXRhc","level":3,"time":"2023-01-12T17:22:13+00:00","remoteAddr":"xx.xx.xxx.xx","user":"xxxxx","app":"webdav","method":"DELETE","url":"/remote.php/dav/files/xxxxx/Multimedia/movies/Logan%20(2017)","message":"Failed to move groupfolder item to trash","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.76","version":"25.0.2.3","exception":{"Exception":"Exception","Message":"Failed to move groupfolder item to trash","Code":0,"Trace":[{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php","line":102,"function":"moveToTrash","class":"OCA\\GroupFolders\\Trash\\TrashBackend","type":"->"},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Storage.php","line":202,"function":"moveToTrash","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->"},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Storage.php","line":125,"function":"doDelete","class":"OCA\\Files_Trashbin\\Storage","type":"->"},{"file":"/config/www/nextcloud/lib/private/Files/View.php","line":1181,"function":"rmdir","class":"OCA\\Files_Trashbin\\Storage","type":"->"},{"file":"/config/www/nextcloud/lib/private/Files/View.php","line":349,"function":"basicOperation","class":"OC\\Files\\View","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":305,"function":"rmdir","class":"OC\\Files\\View","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":179,"function":"delete","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":281,"function":"delete","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpDelete","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/remote.php","line":171,"args":["/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/config/www/nextcloud/apps/groupfolders/lib/Trash/TrashBackend.php","Line":218,"message":"Failed to move groupfolder item to trash","exception":[],"CustomMessage":"Failed to move groupfolder item to trash"},"id":"63c0762a5ef1e"}
{"reqId":"aolYcQ4oPMxbJXdwgn60","level":3,"time":"2023-01-12T17:31:13+00:00","remoteAddr":"xx.xx.xxx.xx","user":"xxxxx","app":"PHP","method":"MOVE","url":"/remote.php/dav/files/xxxxx/Multimedia/Film/Logan%20(2017)","message":"rename(): The first argument to copy() function cannot be a directory at /config/www/nextcloud/lib/private/Files/Storage/Local.php#376","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.76","version":"25.0.2.3","exception":{"Exception":"Error","Message":"rename(): The first argument to copy() function cannot be a directory at /config/www/nextcloud/lib/private/Files/Storage/Local.php#376","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Local.php","line":376,"function":"rename"},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Local.php","line":605,"function":"rename","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php","line":237,"function":"moveFromStorage","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":595,"function":"moveFromStorage","class":"OC\\Files\\Storage\\Wrapper\\Quota","type":"->"},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Storage.php","line":239,"function":"moveFromStorage","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/config/www/nextcloud/lib/private/Files/View.php","line":831,"function":"moveFromStorage","class":"OCA\\Files_Trashbin\\Storage","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":442,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":160,"function":"moveInto","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/remote.php","line":171,"args":["/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/config/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"63c0762a5ee45"}
{"reqId":"aolYcQ4oPMxbJXdwgn60","level":3,"time":"2023-01-12T17:31:13+00:00","remoteAddr":"xx.xx.xxx.xx","user":"xxxxx","app":"PHP","method":"MOVE","url":"/remote.php/dav/files/xxxxx/Multimedia/Film/Logan%20(2017)","message":"rename(//data/__groupfolders/5/Film/Logan (2017),//data/xxxxx/files/Logan (2017)): Cross-device link at /config/www/nextcloud/lib/private/Files/Storage/Local.php#376","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.76","version":"25.0.2.3","exception":{"Exception":"Error","Message":"rename(//data/__groupfolders/5/Film/Logan (2017),//data/xxxx/files/Logan (2017)): Cross-device link at /config/www/nextcloud/lib/private/Files/Storage/Local.php#376","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Local.php","line":376,"function":"rename"},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Local.php","line":605,"function":"rename","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php","line":237,"function":"moveFromStorage","class":"OC\\Files\\Storage\\Local","type":"->"},{"file":"/config/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":595,"function":"moveFromStorage","class":"OC\\Files\\Storage\\Wrapper\\Quota","type":"->"},{"file":"/config/www/nextcloud/apps/files_trashbin/lib/Storage.php","line":239,"function":"moveFromStorage","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/config/www/nextcloud/lib/private/Files/View.php","line":831,"function":"moveFromStorage","class":"OCA\\Files_Trashbin\\Storage","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":442,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":160,"function":"moveInto","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/config/www/nextcloud/remote.php","line":171,"args":["/config/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/config/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"63c0762a5ee13"}

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

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'xxxxx',
  'passwordsalt' => 'xxxxx',
  'secret' => 'xxxxx',
  'trusted_domains' =>
  array (
    0 => '192.168.69.100:444',
    1 => 'xxxx.xxxxx.xx',
  ),
  'dbtype' => 'mysql',
  'version' => '25.0.2.3',
  'overwrite.cli.url' => 'https://xxxx.xxxxx.xx/',
  'dbname' => 'nextcloud',
  'dbhost' => 'mariadb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxxx',
  'installed' => true,
  'default_phone_region' => 'XX',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
    0 => 'xxxxx',
    1 => 'xxxxx',
    2 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'pipe',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'xxxxx.xx',
  'mail_smtphost' => '192.168.69.100',
  'mail_smtpport' => '25',
  'trusted_proxies' =>
  array (
    0 => 'swag',
  ),
  'overwritehost' => 'xxxx.xxxxx.xx',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

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

2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:80 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to 0.0.0.0:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: bind() to [::]:443 failed (98: Address in use)
2023/01/12 18:43:12 [emerg] 1090#1090: still could not bind()

bump :confused:
issue persists after update to 25.0.3

bump… still not working