Can not copy or move files between external drives NC AIO

Hi all, I’ve got a problem with my external drives on my NC AIO v7.13.1, I am trying to move files from one drive to the other.

Hardward RPI5
HDD 2.5 toshiba 1tb dtb410 with two partitions nube1 and nube2
SSD m.2 Kingston NV2 with partition nube

Software
OS Ubuntu Server 23.10
NC AIO v7.13.1

When I try to copy or move files from my toshiba hhd partition nube1 to my kingston ssd partition nube I get the following error

[PHP] Error: rename(//mnt/nube1/My Photos History/paseo san andres 2024/GH015294.MP4,//mnt/nube/My Photos History/paseo san andres 2024/GH015294.MP4): Bad address at /var/www/html/lib/private/Files/Storage/Local.php#393

MOVE /remote.php/dav/files/admin/nube1/My%20Photos%20History/paseo%20san%20andres%202024/GH015294.MP4
from 201.244.140.49 by admin at 2024-03-12T13:11:41+00:00

I have my permission like this:

drwxr-x— 6 www-data root 4096 Mar 12 12:04 ncdata
drwxr-x— 5 www-data root 4096 Mar 11 21:04 nube
drwxr-x— 3 www-data root 4096 Feb 29 20:56 nube1
drwxr-x— 9 www-data root 4096 Feb 29 10:28 nube2

What am I doing wrong?

As per the error, that’s just one file. Have you checked the destination has your data?

Considering it’s PHP error;
Have you stopped your web server systemctl stop apache2, cron service cron stop and set maintenance mode “On” for nextcloud -u www-data php /var/www/nextcloud/occ maintenance:mode --on, before copy/move?

Nextcloud requested the update?
Please confirm if still using NC AIO v7.13.1.

Are you using Nginx or Apache2?

Will need your PHP version:
php -v

And also your PHP config file( **Please replace sensitive information in the output of this file before posting **):
sudo cat /var/www/html/config/config.php

Yes the NC requested an update.

I am still using Nextcloud AIO v7.13.1

I didn’t installed Nginx, I used the default installation method described here.

curl -fsSL h.t.t.p.s.://get.docker.c.o.m | sudo sh

sudo docker run \
--init \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 80:80 \
--publish 8080:8080 \
--publish 8443:8443 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
--env NEXTCLOUD_MOUNT="/mnt/"\
nextcloud/all-in-one:latest

So I think I am using apache2

php -v
Command 'php' not found, but can be installed with:
sudo apt install php-cli     # version 2:8.2+93ubuntu1, or
sudo apt install php8.2-cli  # version 8.2.10-2ubuntu1

sudo cat /var/www/html/config/config.php

cat: /var/www/html/config/config.php: No such file or directory
sudo docker run -it --rm --volume nextcloud_aio_nextcloud:/var/www/html:rw alpine sh -c "apk add --no-cache nano && nano /var/www/html/config/config.php"

<php 
$CONFIG = array (
 'one-click-instance' => true,
 'one-click-instance.user-limit' => 100, 
'memcache.local' => '\\OC\\Memcache\\APCu',
 'apps_paths' =>
 array ( 
        0 =>
        array (
                 'path' => '/var/www/html/apps',
                 'url' => '/apps',
                 'writable' => false, 
         ), 
        1 => 
        array (
                    'path' => '/var/www/html/custom_apps',
                    'url' => '/custom_apps',
                     'writable' => true, 
             ),
         ),
 'appsallowlist' => false,
 check_data_directory_permissions' => false, 
'memcache.distributed' => '\\OC\\Memcache\\Redis',
 'memcache.locking' => '\\OC\\Memcache\\Redis',
 'redis' => 
array (
         'host' => 'nextcloud-aio-redis',
         'password' => '(deleted)',
         'port' => 6379,
 ),
 'overwritehost' => '(my url)',
 'overwriteprotocol' => 'https',
 'passwordsalt' => '(deleted)',
 'secret' => '(deleted)', 
'trusted_domains' => 
array (
        0 => 'localhost',
        1 => 'my url', 
),
 'datadirectory' => '/mnt/ncdata',
 'dbtype' => 'pgsql',
 'version' => '27.1.7.2', 
 'overwrite.cli.url' => 'my url/',
 'dbname' => 'nextcloud_database',
 'dbhost' => 'nextcloud-aio-database',
 'dbport' => ' ' ,
 'dbtableprefix' => 'oc_', 
'dbuser' => 'oc_nextcloud',
 'dbpassword' => '(deleted)',
 'installed' => true,
 'instanceid' => loccqyn83r1zx,
 'maintenance' => false, 
'loglevel' => '2', 
'log_type' => 'file',
 'logfile' => '/var/www/html/data/nextcloud.log',
 'log_rotate_size' => '10485760', 
'log. condition' => 
array (
       'apps' => 
     array (
          0 => 'admin_audit',
      ),
    ),
 'preview_max_x' => '2048',
 'preview_max_y' => '2048',
 'jpeg_quality' => '60',
 'enabledPreviewProviders' => 
array ( 
1 => 'OC\\Preview\\Image',
 2 => 'OC\\Preview\\MarkDown',
 3 => 'OC\\Preview\\MP3',
 4 => 'OC\\Preview\\TXT', 
5 => 'OC\\Preview\\OpenDocument',
 6 => 'OC\\Preview\\Movie',
 7 => 'OC\\Preview\\Krita', 
0 => 'OC\\Preview\\Imaginary',
 ),
 'enable_previews' => true,
 'upgrade.disable-web' => true,
 'mail_smtpmode' => 'smtp',
 'trashbin_retention_obligation' => 'auto, 30',
 'versions_retention_obligation' => 'auto, 30', 
'activity_expire_days' => '30', 
'simpleSignUpLink.shown' => false, 
'share_folder' => '/Shared',
 'one-click-instance.link' => 'https://nextcloud.com/all-in-one/',
 'upgrade.cli-upgrade-link' => 'https://github.com/nextcloud/all-in-one/discussions/2726',
 'updatedirectory' => '/nc-updater',
 'allow_local_remote_servers' => true, 
idaystorage.request_timeout' => 3600,
 'htaccess.RewriteBase' => '/',
 'dbpersistent' => false,
 'files_external_allow_create_new_local' => true,
 'trusted_proxies' => 
array ( 
          0 => '127.0.0.1', 
          1 => '::1',
 ),
 'preview_imaginary_url' => 'http://nextcloud-aio-imaginary:9000',
 'mail_from_address' => '(deleted)',
 'mail_sendmailmode' => 'smtp',
 'mail_smtphost' => ssmtp.office365.com',
 'mail_smtpport' => '587',
 'mail_smtpauth' => 1,
 'mail_smtpname => '(deleted)',
 'mail_smtppassword' => '(deleted)',
 'mail_domain' => 'hotmail.com',
 'default_phone_region' => 'CO', 
);

To get this PHP file from ssh was really a pain, had to print screen and OCR online and formated it again…

I edited my FSTAB file like this.

LABEL=writable / ext4 defaults 0 1
LABEL=system-boot /boot/firmware vfat defaults 0 1

UUID=“167dd300-f196-4695-a1a6-e44887571e5b” /mnt/nube1 ext4 defaults 0 2
UUID=“20159167-9c69-405b-8861-32a41ab992a3” /mnt/nube2 ext4 defaults 0 2
/dev/sda1 /mnt/nube ext4 defaults 0 2

Couldn’t reply all in one message due to some max 4 links in a reply rule…

Please help me out kenneth!!!

Please excuse me richardcrbb, I should have known this was a Docker image i.e. AIO. Unfortunately I don’t use Docker and am not too familiar with it’s architecture.

Perhaps someone with Docker expertise could possibly chime in.

I did notice a few things that could probably help:
In your config file the 'datadirectory' => '/mnt/ncdata', does not correspond to the mount points of any of your devices, nube1 at /mnt/nube1 and nube at /mnt/nube.

So the following error:
//mnt/nube/My Photos History/paseo san andres 2024/GH015294.MP4): Bad address at /var/www/html/lib/private/Files/Storage/Local.php#393
tells you that PHP cannot process request at line 393 in file /var/www/html/lib/private/Files/Storage/Local.php the address does not correspond to the location of the target drive.

I suppose you are using Nextcloud’s “External storage support”. Somehow the location given for the device is wrong. Take a look at the GUI external storage setup in Nextcloud to see if you misspelled the location.

Your fstab file is setup fine(always reboot after editing it).

Have you tried sopping all Nextcloud AIO containers and restarting them? Maybe your drive did not mount in time before the containers started.

I did what this post said, IDK if my mountpoint should be inside that folder (ncdata)

How can I get the support team help me out with this???

Could you see if I have to do this please.

Yes,
If you haven’t used the option --env NEXTCLOUD_MOUNT="/mnt/" when you first started the mastercontainer, as stated “remove it (no data will be lost) and recreate it using the docker run command”. The environment variable above needs to be included in your docker run command before this line: nextcloud/all-in-one:latest.

But first, verify if all of your devices are properly mounted, type:

lsblk

Check under “MOUNTPOINTS”.

You would have to chime-in a docker specialist like this: @ szaimen

It’s done.

I stoped and removed the mastercontainer, then removed it, lsblk and my drives were mounted correctly, run the mastercontainer with an added line almost at the end, entered my nc instance and it was not showing some directories, then from the instance I removed the external storaged and added it again.

It showed all the directories, tried to copy some files from nube1 to nube and get this errors


[no app in context] Error: OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query “SELECT * FROM *PREFIX*files_versions WHERE (file_id = :dcValue1) AND (timestamp = :dcValue2)”; at <>

  1. /var/www/html/lib/public/AppFramework/Db/QBMapper.php line 361
    OCP\AppFramework\Db\QBMapper->findOneQuery([“OC\DB\QueryBuilder\QueryBuilder”])
  2. /var/www/html/apps/files_versions/lib/Db/VersionsMapper.php line 78
    OCP\AppFramework\Db\QBMapper->findEntity([“OC\DB\QueryBuilder\QueryBuilder”])
  3. /var/www/html/apps/files_versions/lib/Versions/LegacyVersionsBackend.php line 271
    OCA\Files_Versions\Db\VersionsMapper->findVersionForFileId(129843, “*** sensitive parameters replaced ***”)
  4. /var/www/html/apps/files_versions/lib/Versions/VersionManager.php line 153
    OCA\Files_Versions\Versions\LegacyVersionsBackend->updateVersionEntity(“*** sensitive parameters replaced ***”)
  5. /var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php line 238
    OCA\Files_Versions\Versions\VersionManager->updateVersionEntity(“*** sensitive parameters replaced ***”)
  6. /var/www/html/apps/files_versions/lib/Listener/FileEventsListener.php line 106
    OCA\Files_Versions\Listener\FileEventsListener->post_write_hook(“*** sensitive parameters replaced ***”)
  7. /var/www/html/lib/private/EventDispatcher/ServiceEventListener.php line 86
    OCA\Files_Versions\Listener\FileEventsListener->handle(["OCP\Files\Ev … "])
  8. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke(["OCP\Files\Ev … "], “OCP\Files\Eve … t”, ["Symfony\Compo … "])
  9. /var/www/html/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([[“Closure”],[“Closure”],[“Closure”]], “OCP\Files\Eve … t”, ["OCP\Files\Ev … "])
  10. /var/www/html/lib/private/EventDispatcher/EventDispatcher.php line 94
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch(["OCP\Files\Ev … "], “OCP\Files\Eve … t”)
  11. /var/www/html/lib/private/EventDispatcher/EventDispatcher.php line 106
    OC\EventDispatcher\EventDispatcher->dispatch(“OCP\Files\Eve … t”, ["OCP\Files\Ev … "])
  12. /var/www/html/lib/private/Files/Node/HookConnector.php line 121
    OC\EventDispatcher\EventDispatcher->dispatchTyped(["OCP\Files\Ev … "])
  13. /var/www/html/lib/private/legacy/OC_Hook.php line 105
    OC\Files\Node\HookConnector->postWrite(["/nube/My Photo … "])
  14. /var/www/html/apps/dav/lib/Connector/Sabre/File.php line 473
    OC_Hook::emit(“OC_Filesystem”, “post_write”, ["/nube/My Photo … "])
  15. /var/www/html/apps/dav/lib/Connector/Sabre/File.php line 398
    OCA\DAV\Connector\Sabre\File->emitPostHooks(true)
  16. /var/www/html/apps/dav/lib/Connector/Sabre/Directory.php line 149
    OCA\DAV\Connector\Sabre\File->put(“*** sensitive parameters replaced ***”)
  17. /var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php line 307
    OCA\DAV\Connector\Sabre\Directory->createFile(“*** sensitive parameters replaced ***”)
  18. /var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php line 133
    Sabre\DAV\Tree->copyNode([“OCA\DAV\Connector\Sabre\File”], [“OCA\DAV\Connector\Sabre\Directory”], “*** sensitive parameters replaced ***”)
  19. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 659
    Sabre\DAV\Tree->copy(“files/admin/nub … 4”, “files/admin/nub … 4”)
  20. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpCopy([“Sabre\HTTP\Request”], [“Sabre\HTTP\Response”])
  21. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit(“method:COPY”, [["Sabre\HTTP\ … ]])
  22. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod([“Sabre\HTTP\Request”], [“Sabre\HTTP\Response”])
  23. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
  24. /var/www/html/apps/dav/lib/Server.php line 368
    Sabre\DAV\Server->exec()
  25. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  26. /var/www/html/remote.php line 172
    require_once(“/var/www/html/a … p”)

COPY /remote.php/dav/files/admin/nube1/My%20Photos%20History/paseo%20san%20andres%202024/GH015307.MP4
from 190.27.115.47 by admin at 2024-03-15T16:52:33+00:00


[PHP] Error: fread(): Read of 8192 bytes failed with errno=5 I/O error at /var/www/html/apps/files_external/3rdparty/icewind/streams/src/Wrapper.php#55

COPY /remote.php/dav/files/admin/nube1/My%20Photos%20History/paseo%20san%20andres%202024/GH015283.MP4
from 190.27.115.47 by admin at 2024-03-15T16:52:27+00:00


[PHP] Error: copy(): Write of 386174976 bytes failed with errno=14 Bad address at /var/www/html/lib/private/Files/Storage/Local.php#413

COPY /remote.php/dav/files/admin/nube1/My%20Photos%20History/paseo%20san%20andres%202024/GH015307.MP4
from 190.27.115.47 by admin at 2024-03-15T16:52:20+00:00

Thanks @Kenneth_Sartre

Did you set the permissions on nube:

sudo chown -R 33:0 /mnt/nube
sudo chmod -R 750 /mnt/nube

Once you have done this please post output from:

ls -l /mnt