Cannot save files via NC to mounted or personal drives

when uploading files to mounted or personal drives most of the the uploads are interrupted with the message “error while copying files to target location (copied bytes 402272, expected filesize 10485760)”. The same error is shown. size of the files doesnt seem to have an impact on the problem. wether a file is 2gb og 10mb the error might show.

I have run a DF -H command on the ubuntu server hosting the cloud and i can see the /var/www/html/nextcloud/data is taking up a wapping 1tb of storage and thereby eating up all the storage i had allocated for the data folder. but my users are only using around 70-76gb of space. it must be a cache that is filled up? all users have no quota but they are only using the NC application for uploading large files to mounted shares where there is adequate space and read/write rights.

is there any way to “force check” or “force clean” the data folder for old junk/cache that is filling up the drive? or is it necessary to make a new mounted (data)drive that is bigger and move the old data over to the new drive ??

Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 8.7M 790M 2% /run
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/vda1 472M 408M 40M 92% /boot
/dev/sda 985G 935G 1.6M 100% /var/www/html/nextcloud/data
tmpfs 799M 0 799M 0% /run/user/1000

[/details]

Nextcloud version (eg, 12.0.2):14.0.4
Operating system and version (eg, Ubuntu 17.04):Ubuntu 16.04 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.18
PHP version (eg, 7.1): PHP7.1

The issue you are facing:

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

The output of your Nextcloud log in Admin > Logging:

|Fatal|webdav|Sabre\DAV\Exception: Error while copying file to target location (copied bytes: 3702784, expected filesize: 10485760 )|2019-06-07T11:42:54+0200|
|---|---|---|---|
|Error|no app in context|Sabre\DAV\Exception: Error while copying file to target location (copied bytes: 3702784, expected filesize: 10485760 )|2019-06-07T11:42:54+0200|
|Error|no app in context|OC\User\NoUserException: Attempted to initialize mount points for null user and no user in session|2019-06-07T11:08:09+0200|
|Error|no app in context|OC\User\NoUserException: Attempted to initialize mount points for null user and no user in session|2019-06-07T11:07:54+0200|
|Error|no app in context|OC\User\NoUserException: Attempted to initialize mount points for null user and no user in session|2019-06-07T11:07:30+0200|
|Error|no app in context|OC\User\NoUserException: Attempted to initialize mount points for null user and no user in session|2019-06-07T11:07:21+0200|
|Error|no app in context|OC\User\NoUserException: Attempted to initialize mount points for null user and no user in session|2019-06-07T11:07:11+0200|
|Error|no app in context|OC\User\NoUserException: Attempted to initialize mount points for null user and no user in session|2019-06-07T11:06:55+0200|
|Error|internet_connection_check|GuzzleHttp\Exception\RequestException: cURL error 56: Recv failure: Connection reset by peer (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)|2019-06-06T18:25:11+0200|

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

$CONFIG = array (
  'instanceid' => 'oc82t31xfkx4',
  'passwordsalt' => 'QHNU8EkUfyx3XsbfsW1giL5HSyEh3D',
  'secret' => 't3eIde0KGH+CvSaKY5aI7wI/u5iZL+xN00nKrJpo6aac3go0',
  'trusted_domains' => 
  array (
    0 => '**.**********.dk',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'overwrite.cli.url' => 'http://**.**********.dk',
  'dbtype' => 'mysql',
  'version' => '14.0.4.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextclouduser',
  'dbpassword' => '********',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'nc',
  'mail_domain' => '**********.dk',
  'mail_smtphost' => 'smtp-relay.ip.nianet.dk',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'auth.bruteforce.protection.enabled' => false,
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
);