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 s3fsossfs 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 threadsThis 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_sizeor 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_sizeto 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.
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.