ECS: 객체가 많은 S3 버킷을 삭제하는 방법

Summary: S3 버킷에 오브젝트가 많지만 삭제해야 합니다. 이 문서에서는 버킷에서 모든 오브젝트를 제거하고 마지막으로 버킷을 삭제하는 방법에 대해 설명합니다.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

주의: 이 절차에서는 타겟 버킷의 모든 오브젝트를 비웁니다. 데이터는 복구할 수 없으므로 주의하여 사용하십시오.


아래 작업에 대한 제한 사항:
  • ECS 보존 상태의 오브젝트는 삭제할 수 없습니다.
  • Object Lock 보존 상태의 오브젝트는 삭제할 수 없습니다.
  • 파일 시스템 지원 버킷에는 버전 3.8.1 이상이 필요합니다. 

권장 옵션: 버전 3.8 이상:
ECS 소프트웨어 버전 3.8에서 Dell은 간소화된 버킷 삭제를 도입했습니다이제 REST API를 사용하여 오브젝트와 버킷을 삭제하거나 다음을 사용하여 빈 버킷 S3 문자열을 삭제할 수 있습니다. x-emc-headers에 관한 자세한 내용을 참조하십시오. Dell Technologies는 3.8로 업그레이드하는 것을 권장합니다. 수명주기 삭제에 따른 간소화된 버킷 삭제를 사용합니다.

ECS UI를 사용하여 "간소화된 버킷 삭제" 사용(3.8.1.0 이상 필요)
버전 3.8.1.x 이상에서는 적절한 권한이 있는 ECS UI에서 컨텐츠가 있는 버킷을 삭제할 수 있습니다. 버킷으로 이동해 드롭다운에서 delete를 선택합니다. Delete ENTIRE contents including the selected bucket을 선택하고 확인합니다. 

ECS UI를 사용하여

REST API
를 사용하여 간소화된 버킷 삭제 사용최신 REST API 가이드를 참조하십시오.

REST API를 사용하여

ECS에서 curl을 사용하여 REST API 호출을 보내는 예:

명령:

# curl -k -H "$token" -X POST https://<hostname-or-ip>:4443/object/bucket/<bucketname>/deactivate?namespace=<namespace>\&emptyBucket=true

예:

curl -v -k -H "$token" -X POST https://10.60.x.xx:4443/object/bucket/ExampleBucketRest/deactivate?namespace=b_mathias_ns\&emptyBucket=true

모니터링하려면 다음을 수행합니다.

버킷 삭제를 모니터링하려면

명령:

# curl -k -H "$token" -X GET https://<hostname-or-ip>:4443/object/bucket/<bucketname>/empty-bucket-status?namespace=<namespace> |xmllint --format -

예:

Started:
mathias@client:/usr/share/s3curl$ curl -k -H "$token" -X GET https://10.60.x.xx:4443/object/bucket/ExampleBucketRest/empty-bucket-status?namespace=b_mathias_ns |xmllint --format -
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<empty_bucket_status>
  <status>PENDING</status>
  <created>1707411798889</created>
  <last_updated>1707411798889</last_updated>
  <entries_deleted>0</entries_deleted>
  <failed_to_delete_due_to_retention>0</failed_to_delete_due_to_retention>
  <failed_to_delete_due_to_permission>0</failed_to_delete_due_to_permission>
  <failed_to_delete_due_to_dangling xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
  <failed_to_delete_due_to_other>0</failed_to_delete_due_to_other>
  <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</empty_bucket_status>

Running:
mathias@client:/usr/share/s3curl$ curl -k -H "$token" -X GET https://10.60.x.xx:4443/object/bucket/ExampleBucketRest/empty-bucket-status?namespace=b_mathias_ns |xmllint --format -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   629  100   629    0     0   2431      0 --:--:-- --:--:-- --:--:--  2437
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<empty_bucket_status>
  <status>IN_PROGRESS</status>
  <created>1707411798889</created>
  <last_updated>1707411828897</last_updated>
  <entries_deleted>1337</entries_deleted>
  <failed_to_delete_due_to_retention>0</failed_to_delete_due_to_retention>
  <failed_to_delete_due_to_permission>0</failed_to_delete_due_to_permission>
  <failed_to_delete_due_to_dangling xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
  <failed_to_delete_due_to_other>0</failed_to_delete_due_to_other>
  <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</empty_bucket_status>

Completed:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<error>
  <code>1004</code>
  <description>Request parameter cannot be found</description>
  <details>Unable to find entity with the given id ExampleBucketRest</details>
  <retryable>false</retryable>
</error>

버킷을 더 이상 찾을 수 없으므로 위의 오류가 발생합니다.

S3를 사용하여 간소화된 버킷 삭제를 사용합니다.

  1. 자세한 내용은 최신 데이터 액세스 가이드를 확인하세요.
  2. v3.8 데이터 액세스 가이드를 참조하십시오.

S3를 사용하여  

이 옵션을 사용하여 버킷을 처리하는 가장 빠른 방법은 다음과 같습니다. s3curl에 관한 자세한 내용을 참조하십시오.
 

주의: s3curl이 ECS 노드에 이미 설치되어 있지만 이 작업에 사용하면 안 됩니다. 이 x-emc headers 현재 완전히 작동하지 않습니다.
 
s3curl GitHub에서 로컬 설치를 위해 사용할 수 있습니다. 이 버전은 다음을 포함하는 데 사용됩니다. x-emc-headers https://github.com/EMCECS/s3curl/blob/master/s3curl.pl 이 하이퍼링크는 Dell Technologies 외부의 웹사이트로 연결됩니다.

의 수정된 버전 s3curl.pl 는 향후 버전에서 ECS 코드에 추가될 예정이며 이 KB는 업데이트됩니다.

날짜 s3curl 가 구성된 경우 다음 단계를 진행합니다. 데이터는 복구할 수 없습니다!
  1. 다음을 사용하여 간소화된 버킷 삭제 시작 s3curl을 설정합니다.
명령:
./s3curl --id=<alias> --DELETE -- http://<hostname-or-ip>:9020/<bucketname> -H "x-emc-empty-bucket:true"

예:

mathias@client:/usr/share/s3curl$ ./s3curl.pl --id=b_mathias_iam --DELETE -- http://10.60.x.xx:9020/ExampleBucket -H "x-emc-empty-bucket:true"

버킷 삭제 모니터링:

./s3curl.pl --id=<alias> http://<hostname-or-ip>:9020/<bucketname>?empty-bucket-status |xmllint --format -

예:

mathias@client:/usr/share/s3curl$ ./s3curl.pl --id=b_mathias_iam -- http://10.60.x.xx:9020/ExampleBucket?empty-bucket-status |xmllint --format -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   474  100   474    0     0   3128      0 --:--:-- --:--:-- --:--:--  3139
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EmptyBucketStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Status>PENDING</Status>
  <Created>2024-02-08T16:21:53.849Z</Created>
  <LastUpdated>2024-02-08T16:21:53.849Z</LastUpdated>
  <EntriesDeleted>0</EntriesDeleted>
  <FailedToDeleteDueToRetention>0</FailedToDeleteDueToRetention>
  <FailedToDeleteDueToPermission>0</FailedToDeleteDueToPermission>
  <FailedToDeleteDueToOther>0</FailedToDeleteDueToOther>

Running:
mathias@client:/usr/share/s3curl$ ./s3curl.pl --id=b_mathias_iam -- http://10.60.x.xx:9020/ExampleBucket?empty-bucket-status |xmllint --format -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   478  100   478    0     0   3883      0 --:--:-- --:--:-- --:--:--  3886
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EmptyBucketStatus xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Status>IN_PROGRESS</Status>
  <Created>2024-02-08T16:21:53.849Z</Created>
  <LastUpdated>2024-02-08T16:22:23.899Z</LastUpdated>
  <EntriesDeleted>1304</EntriesDeleted>
  <FailedToDeleteDueToRetention>0</FailedToDeleteDueToRetention>
  <FailedToDeleteDueToPermission>0</FailedToDeleteDueToPermission>
  <FailedToDeleteDueToOther>0</FailedToDeleteDueToOther>
</EmptyBucketStatus>

Completed:
mathias@client:/usr/share/s3curl$ ./s3curl.pl --id=b_mathias_iam -- http://10.60.x.xx:9020/ExampleBucket?empty-bucket-status |xmllint --format -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   180    0   180    0     0   1300      0 --:--:-- --:--:-- --:--:--  1304
<?xml version="1.0"?>
<Error>
  <Code>NoSuchBucket</Code>
  <Message>The specified bucket does not exist</Message>
  <Resource>ExampleBucket</Resource>
  <RequestId>0a3c0812:18d77e3a715:2d7:1f33</RequestId>
</Error>


3.8 이전의 코드 버전의 경우 위의 옵션을 사용할 수 있도록 업그레이드합니다.

Affected Products

ECS Appliance

Products

ECS Appliance
Article Properties
Article Number: 000014767
Article Type: How To
Last Modified: 21 Aug 2025
Version:  8
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.