All Products
Search
Document Center

Object Storage Service:OSS-HDFS considerations

Last Updated:Apr 30, 2026

Before you enable OSS-HDFS, understand how it interacts with other OSS features to prevent operational issues and data loss.

Warning
  • After you enable OSS-HDFS for a bucket, the service stores its data in the.dlsdata/ directory of the bucket. Do not perform write operations, such as renaming or deleting, on this directory or the objects within it except through OSS-HDFS. Such actions can disrupt the service or cause data loss.

  • If issues affecting HDFS operations occur, such as overdue payments or the deletion of the dependent RAM role AliyunOSSDlsDefaultRole, the HDFS background service may enter a safe mode. In this mode, all background tasks, such as audit logging, asynchronous deletion, and tiered storage, are paused. The service automatically resumes after these issues are resolved.

The following table describes the risks and considerations for operations on the.dlsdata/ directory after you enable OSS-HDFS.

Feature

Risk

Description

References

retention policy

Data cannot be deleted

We recommend that you do not enable OSS-HDFS and set a retention policy on the same bucket. If you do, deleting data from the.dlsdata/ directory through OSS-HDFS will appear successful. However, the data will be retained for the duration of the policy and cannot be cleaned up even after the policy expires.

Bucket-level retention policy (BucketWorm)

lifecycle rule

Data loss

When you create or update a lifecycle rule for a bucket with OSS-HDFS enabled, use theNOT element to exclude the.dlsdata/ directory. This prevents actions triggered by the lifecycle rule, such as deletion or storage class conversion, from disrupting read and write access to OSS-HDFS data.

lifecycle

After you enable OSS-HDFS, if you need to manage the lifecycle of HDFS data, use thetiered storage feature provided by the service.

versioning

Data cannot be automatically deleted, service exceptions

Do not enable OSS-HDFS and versioning on the same bucket. This combination can cause exceptions in the OSS-HDFS service. To ensure service stability, suspend versioning as soon as possible and configure a lifecycle rule to clean up delete markers.

Delete directories

Data loss

To avoid disrupting the OSS-HDFS service or causing data loss, do not delete the.dlsdata/ directory or its subdirectories in an OSS-HDFS-enabled bucket.

Delete directories

Delete objects

Data loss

To avoid disrupting the OSS-HDFS service or causing data loss, do not delete any object from the.dlsdata/ directory in an OSS-HDFS-enabled bucket.

Delete objects

Rename a directory

Data loss

To avoid disrupting the OSS-HDFS service or causing data loss, do not rename the.dlsdata/ directory in an OSS-HDFS-enabled bucket that also has hierarchical namespace enabled.

Rename a directory

Rename objects

Data loss

To avoid disrupting the OSS-HDFS service or causing data loss, do not rename any object in the.dlsdata/ directory of an OSS-HDFS-enabled bucket.

Rename objects

Upload objects

Data loss

To avoid disrupting the OSS-HDFS service or causing data loss, do not upload objects to the.dlsdata/ directory except through OSS-HDFS.

Simple upload

Change the storage class of objects

Data becomes inaccessible, billing rules change

In an OSS-HDFS-enabled bucket, we recommend that you do not change the storage class of objects in the.dlsdata/ directory.

  • If you change the storage class to Infrequent Access, the data remains accessible through OSS-HDFS.

  • If you change the storage class to Archive, Cold Archive, or Deep Cold Archive, the data becomes inaccessible through OSS-HDFS. You must restore the data before you can access it.

  • Changing the storage class to Infrequent Access, Archive, or other archive classes introduces billing factors such as a minimum billable size of 64 KB, a minimum storage duration, and data retrieval fees.

Proceed with caution to avoid affecting data access or incurring extra costs.

bucket policy

Data becomes inaccessible, automatic deletion fails, and billing continues

To ensure that OSS-HDFS can access the.dlsdata/ directory and its objects, do not create a bucket policy that includes a deny action. A deny policy will prevent OSS-HDFS from reading from or writing to the bucket.

If you must configure a deny policy for security reasons, such as restricting access by IP address or VPC, you must add the following condition to all deny statements in the Condition element to ensure that the OSS-HDFS background service can access the bucket over the classic network:

"StringNotLike":{
    "oss:ClassicIntranet":[
        "true"
    ]
}

Bucket Policy

RAM

Data becomes inaccessible, automatic deletion fails, and billing continues

When you enable OSS-HDFS for a bucket, a RAM role named AliyunOSSDlsDefaultRole is automatically created and associated with the AliyunOSSDlsRolePolicy permission policy. To ensure proper access to the .dlsdata/ directory and its objects, do not disable, modify, or delete this role or its associated permission policy.

Enable OSS-HDFS

bucket inventory

Data contamination

To avoid disrupting the OSS-HDFS service or causing data contamination, do not set the inventory report directory to.dlsdata/ when configuring a bucket inventory rule for an OSS-HDFS-enabled bucket.

Bucket inventory

logging

Data contamination

To avoid disrupting the OSS-HDFS service or causing data contamination, do not set the Log Prefix to.dlsdata/ when configuring a logging rule for an OSS-HDFS-enabled bucket.

Configure logging

zip package decompression

Data contamination, data loss

To avoid disrupting the OSS-HDFS service or causing data contamination and data loss, do not set the Destination Directory to.dlsdata/ when configuring a ZIP package decompression rule for an OSS-HDFS-enabled bucket.

Upload a ZIP package and decompress it

Important

OSS-HDFS uses an OSS bucket to store HDFS data and auxiliary data. This data is stored under the.dlsdata/ path in the bucket and consumes OSS storage capacity, which is metered and billed accordingly. For more information, see Storage capacity usage.