Skip to content

[Bug] Upload fails with "Disk Full" error when temp and final storage share the same volume #2342

@oaperezb

Description

@oaperezb

Describe the bug

When attempting to upload a large file that fits within the available free space, the upload fails with a "disk full" error. This happens because OpenCloud first buffers the file in /var/lib/opencloud/storage/users/uploads/. If the temporary upload folder and the final user storage are on the same volume, the system effectively requires double the file size in free space during the transfer process.

Steps to reproduce

  1. Ensure the storage volume has roughly 5GB of free space.
  2. Attempt to upload a single file of 3GB.
  3. The upload starts but fails mid-way or at the beginning.
  4. Observe the error message: "Disk full" or "Insufficient storage," despite the 5GB total capacity.

Expected behavior

The system should either stream the file directly to the final destination or allow for the configuration of a separate disk/partition for the uploads directory to prevent volume saturation on a single mount point.

Actual behavior

The upload fails because the temporary staging area (.../users/uploads/) and the final storage path share the same volume, leading to a "Disk Full" state during the move/copy operation.

Additional context

To resolve this, we need a way to define a separate environment variable (e.g., OC_TEMP_UPLOAD_PATH) so that temporary uploads can be mounted on a separate high-speed or larger scratch disk, independent of the user's data volume.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Qualification

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions