All Products
Search
Document Center

Object Storage Service:Options supported by ossfs 2.0

Last Updated:Jun 03, 2025

When you compile a configuration file for ossfs 2.0, you can flexibly configure various parameters to meet different mounting requirements in specific scenarios. This configuration file allows you to mount a bucket to various local file systems.

Basic options

Category

Option

Required

Description

Default value

Basic bucket configurations

oss_endpoint

Yes

The domain name of the bucket.

None

oss_bucket

Yes

The name of the bucket.

None

Access credential configurations

oss_access_key_id

Yes

The AccessKey ID.

None

oss_access_key_secret

Yes

The AccessKey secret.

None

Common options

Category

Option

Required

Description

Default value

Bucket configurations

oss_bucket_prefix

No

The directory that you want to mount to a local file system.

None

oss_region

No

The ID of the region in which the bucket is located, which is used for the V4 signature algorithm. If you do not specify the option, the V1 signature algorithm is used.

None

Cache configurations

attr_timeout

No

The validity period of the object metadata cache. Unit: seconds.

60

negative_timeout

No

The validity period of the invalid directory entries. Unit: seconds.

0

Log configurations

log_level

No

The level of the log output. Valid values: info and debug.

info

log_dir

No

The directory in which logs are stored.

/tmp/ossfs2

Running mode

f

No

Specifies whether to use the foreground mode.

false

d

No

Specifies whether to use the foreground mode and enable fuse.

false

Mount mode

ro

No

Specifies whether to use the read-only mode.

false

Advanced options

Category

Option

Required

Description

Default value

Upload configurations

upload_buffer_size

No

The size of the parts. Unit: bytes. This option determines the size of the local file that you can upload to the bucket. The size of the local file = upload_buffer_size x 10000.

8388608

upload_concurrency

No

The number of parts that you can upload concurrently.

64

sync_upload

No

If you set the sync_upload option to true, the response is returned after the local file is uploaded when you close the local file.

true

Download/Prefetch configurations

prefetch_concurrency

No

The prefetch concurrency of downloads for ossfs 2.0. The minimum prefetch concurrency for a single object is min(64, prefetch_concurrency).

256

prefetch_chunk_size

No

The size of chunks to be prefetched. Unit: bytes.

8388608

prefetch_chunks

No

The number of chunks to be prefetched. If you do not specify the option, three times the value of the prefetch_concurrency option is used.

0 (automatically configured based on the value of the prefetch_concurrency option)

Memory management configurations

total_mem_limit

No

The total memory usage limit. Unit: bytes. If you specify the option, the value of the upload_concurrency and prefetch_concurrency options are adjusted accordingly.

If the option is not configured, the value of prefetch_chunk_size x prefetch_chunks is used as the data read prefetch buffer and the value of upload_buffer_size x upload_concurrency is used as the data write buffer by default. Up to 8 GB of memory can be allocated for read and write operations. Make sure that your device has sufficient memory resources to avoid potential out of memory (OOM) issues.

0

Object verification/metadata configurations

enable_crc64

No

Specifies whether to enable CRC-64.

true

close_to_open

No

Specifies whether to enable the close-to-open feature. If you set the close_to_open option to true, the system sends a GetObjectMeta request to obtain real-time object metadata from OSS when the object is opened.

By default, this option is set to false. When you open an object, you can determine whether to send a GetObjectMeta request based on the cache validity period of the object metadata. When you set the close_to_open option to true, a request is forcibly sent to OSS each time an object is opened. This significantly increases access latency when a large number of small objects are read.

false

Object operation configurations

rename_dir_limit

No

The maximum number of all objects and subdirectories in the source directory in a single rename operation. If the actual number of all objects and subdirectories in the source directory exceeds the upper limit, the rename operation reports an error.

2000000

enable_appendable_object

No

After you set the enable_appendable_object option to true, you can read an object during the object upload process if you call the AppendObject operation to upload the object.

false

appenable_object_autoswitch_threshold

No

After you enable enable_appendable_object, non-appendable objects in OSS that are smaller than or equal to the size (in bytes) of this option are automatically converted into appendable objects during the append upload operation.

0

Request timeout configurations

oss_request_timeout_ms

No

The timeout period of requests sent to OSS. Unit: milliseconds.

60000