All Products
Search
Document Center

Object Storage Service:Error when uploading large files with ossfs: "There is no enough disk space for used as cache(or temporary) directory by s3fs"

Last Updated:Mar 20, 2026

When you use ossfs to upload a large object to Object Storage Service (OSS), you may see this error:

There is no enough disk space for used as cache(or temporary) directory by s3fs

ossfs writes temporary cache files to the /tmp directory during multipart upload. Before starting the upload, ossfs estimates the required disk space using this formula:

Estimated required space = multipart_size × number of upload threads

This is an estimate based on your configuration, not the actual object size. If the estimated required space exceeds the available disk space on the partition containing /tmp, ossfs rejects the upload with this error.

Two scenarios trigger this error:

  • Scenario 1: The available disk space is genuinely less than the object size. For example, the object is 300 GB but only 200 GB is free.

  • Scenario 2: The -o multipart_size or thread count is set too high, causing ossfs to overestimate the required space. For example, with 300 GB of free space and a 100 GB object, setting -o multipart_size to 100 GB and the thread count to 5 causes ossfs to estimate 500 GB (100 GB × 5) as the required space — exceeding the available 300 GB.

Solution

For scenario 1: Increase the available disk space on the partition containing /tmp.

For scenario 2: Reduce the estimated required space by adjusting -o multipart_size and the thread count so that their product does not exceed available disk space.

The default -o multipart_size is 10 MB and the maximum number of parts is 1,000.

Important

Keep the total part count within the 1,000-part limit. Setting -o multipart_size too high can cause ossfs to overestimate disk requirements and trigger this error even when actual disk space is sufficient.

Related topics

Upload large objects to OSS