Description
When you use ossfs to upload an object to Object Storage Service (OSS), the object is uploaded in parts. The default part size is 10 MB and the maximum number of parts is 1000. You can upload small objects. When you upload a large object, the following error message is returned:
There is no enough disk space for used as cache(or temporary) directory by s3fs
Causes
When ossfs uploads an object, ossfs writes temporary cache files to the /tmp
directory. The available space of the disk in which the /tmp
directory is located must be greater than the total size of the object that you want to upload. If the available disk space is less than the total size of the object that you want to upload, the error message is returned. The error message may be returned in the following scenarios:
Scenario 1: The available disk space is less than the total size of the object that you want to upload. For example, the available disk space is 200 GB, but the size of the object that you want to upload is 300 GB.
Scenario 2: The parameters for the part size and the number of upload threads are invalid. For example, the available disk space is 300 GB, and the size of the object that you want to upload is 100 GB. The multipart_size parameter is set to 100 GB, and the number of upload threads is set to 5. In this case, ossfs determines that the size of the object that you want to upload is
500 GB (100 GB × 5)
, which is greater than the available disk space.
Solutions
If you use ossfs to upload objects, the error message that indicates insufficient disk space is returned. You can resolve the issue based on the cause of the error:
Scenario 1: Increase the available disk space.
Scenario 2: Specify the part size in MB and set the maximum number of parts to 1,000.
References
How to upload large files to OSS
Supported scope
OSS