3.3.6 Lock File Snapshots

An Exascale snapshot is a thinly-provisioned read-only point-in-time copy of a file. The source file for a snapshot can be a regular file, a file clone, or another snapshot. Exascale uses redirect-on-write techniques to create and maintain snapshots very quickly and space-efficiently.

Starting with Oracle Exadata System Software release 26.1.0, you can lock a snapshot to prevent its deletion before a specified future date and time. You can also make the lock immutable, which prevents users from removing the lock or changing it to expire earlier.

To set or change a lock on a snapshot file, use the chfile command and set the following attributes:

  • snapLockExpiryTime: Specifies the snapshot lock expiry time. The value must be an ISO 8601-formatted future date and time.

  • snapLockImmutable: Boolean value (true or false) indicating whether the lock is immutable:

    • A mutable (variable) lock (snapLockImmutable=false) prevents the snapshot from being deleted before the snapshot lock expiry time (snapLockExpiryTime).

    • An immutable lock (snapLockImmutable=true) prevents the snapshot from being deleted before the snapshot lock expiry time (snapLockExpiryTime), and also prevents users from removing the lock or changing it to expire earlier.

For example:

@> chfile @my-vault-name/my-snap-file --attributes snapLockExpiryTime=2050-06-30T13:00:00,snapLockImmutable=false

In the example, the snapshot (@my-vault-name/my-snap-file) is locked with a variable lock until 1PM on June 30, 2050.

After locking a snapshot file:

  • You can unlock a snapshot with a variable lock (snapLockImmutable=false) by setting the snapLockExpiryTime attribute to null.

    For example:

    @> chfile @my-vault-name/my-snap-file --attributes snapLockExpiryTime=null

    Note:

    You cannot unlock a snapshot with an immutable lock (snapLockImmutable=true).

  • You can convert a variable snapshot lock into an immutable lock by setting the snapLockImmutable attribute to true. You must also re-specify the snapshot lock expiry time (snapLockExpiryTime).

    For example:

    @> chfile @my-vault-name/my-snap-file --attributes snapLockExpiryTime=2050-06-30T13:00:00,snapLockImmutable=true
  • You can extend an immutable lock by setting the snapLockExpiryTime attribute to a later date and time. In the command, you must also include snapLockImmutable=true.

    For example:

    @> chfile @my-vault-name/my-snap-file --attributes snapLockExpiryTime=2051-12-31T19:00:00,snapLockImmutable=true

To view the status of a locked snapshot, use the ls command and examine the snapLockExpiryTime, snapLockImmutable, and snapLockStatus attributes.

For example:

@> ls @my-vault-name/my-snap-file --detail
id                                   @my-vault-name/my-snap-file
name                                 my-snap-file
contentType                          DATA
createTime                           2025-10-29T05:23:05+00:00
createdBy                            exa01
mediaType                            HC
redundancy                           high
size                                 20.0000M
snapLockExpiryTime                   2051-12-31T19:00:00+00:00
snapLockImmutable                    true
snapLockStatus                       locked
vaultName                            my-vault-name

The snapLockExpiryTime, snapLockImmutable, and snapLockStatus attributes display only for snapshots with a snapLockExpiryTime setting.

The snapLockStatus attribute is a derived property that indicates the current status of the snapshot lock. The value is locked when the lock is active, or expired when the lock expiry time has passed.

Note:

  • The snapLockExpiryTime, snapLockImmutable, and snapLockStatus attributes apply only to snapshot files and are not available for regular (non-snapshot) files.

  • At any time, an Exascale cluster administrator who has the cl_admin privilege can modify an immutable lock or delete a locked snapshot.