Skip to main content

Delete noncurrent versions and expired delete markers in StorageGRID

Contributors netapp-pcarriga

When you suspend versioning on a bucket, you need to configure the bucket lifecycle to handle noncurrent versions and expired null-versioned delete markers.

Example of a bucket lifecycle configuration that handles noncurrent versions and expired delete markers

These steps are performed on a bucket with an active ILM policy:

  1. Enable versioning. When objects with the same name are ingested, previous versions remain available as noncurrent versions and the delete requests create delete markers. Noncurrent versions are accessible, but they use storage space.

  2. Suspend versioning because the desired configuration is to retain only one version and free up storage space used by noncurrent versions. This is configured in the next step.

  3. Configure a bucket lifecycle to handle the noncurrent versions and delete markers that remain after versioning is suspended.

ILM policy

Rule based on ingest-time reference (default): On Day 0, keep X copies forever

Bucket Lifecycle

"Filter": {}, "Expiration": {"ExpiredObjectDeleteMarker": true}, "NoncurrentVersionExpiration": {"NoncurrentDays": 1}

Result

The bucket lifecycle is configured to handle noncurrent versions and expired delete markers:

  1. Versions that have been noncurrent for more than one day are deleted. Only the current version remains forever.

  2. An object named draftdoc is ingested and has the version ID NULL.

  3. If another object is ingested with the same name (draftdoc), it overwrites and replaces the null version and immediately deletes the previous version.

  4. If a delete request is made to draftdoc without specifying a version ID, it creates a null-versioned delete marker, replacing and deleting the null-versioned object.

  5. The null-versioned delete marker is expired because there are no noncurrent versions.

  6. Shortly after, the expired null-versioned delete marker is deleted.