3.9.3.2 Lock Volume Snapshots
A volume snapshot is a thinly-provisioned read-only point-in-time copy of a volume.
Starting with Oracle Exadata System Software release 26.1.0, you can lock a volume 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 volume snapshot, use the chvolumesnapshot command and set the following attributes:
-
lockExpiryTime: Specifies the lock expiry time. The value must be an ISO 8601-formatted future date and time. -
lockImmutable: Boolean value (trueorfalse) indicating whether the lock is immutable:-
A mutable (variable) lock (
lockImmutable=false) prevents the volume snapshot from being deleted before the lock expiry time (lockExpiryTime). -
An immutable lock (
lockImmutable=true) prevents the volume snapshot from being deleted before the lock expiry time (lockExpiryTime), and also prevents users from removing the lock or changing it to expire earlier.
-
For example:
@> chvolumesnapshot vol0001_snap0001_50e52177583f4be4bad68ac20b65001e --attributes lockExpiryTime=2050-06-30T13:00:00,lockImmutable=falseIn the example, the volume snapshot (vol0001_snap0001_50e52177583f4be4bad68ac20b65001e) is locked with a variable lock until 1PM on June 30, 2050.
After locking a volume snapshot:
-
You can unlock a volume snapshot with a variable lock (
lockImmutable=false) by setting thelockExpiryTimeattribute tonull.For example:
@> chvolumesnapshot vol0001_snap0001_50e52177583f4be4bad68ac20b65001e --attributes lockExpiryTime=nullNote:
You cannot unlock a volume snapshot with an immutable lock (
lockImmutable=true). -
You can convert a variable lock into an immutable lock by setting the
lockImmutableattribute totrue. You must also re-specify the lock expiry time (lockExpiryTime).For example:
@> chvolumesnapshot vol0001_snap0001_50e52177583f4be4bad68ac20b65001e --attributes lockExpiryTime=2050-06-30T13:00:00,lockImmutable=true -
You can extend an immutable lock by setting the
lockExpiryTimeattribute to a later date and time. In the command, you must also includelockImmutable=true.For example:
@> chvolumesnapshot vol0001_snap0001_50e52177583f4be4bad68ac20b65001e --attributes lockExpiryTime=2051-12-31T19:00:00,lockImmutable=true
To view the status of a locked volume snapshot, use the lsvolumesnapshot command and examine the lockExpiryTime, lockImmutable, and lockStatus attributes.
For example:
@> lsvolumesnapshot vol0001_snap0001_50e52177583f4be4bad68ac20b65001e --attributes lockExpiryTime,lockImmutable,lockStatus
lockExpiryTime 2051-12-31T19:00:00+00:00
lockImmutable true
lockStatus lockedThe lockExpiryTime, lockImmutable, and lockStatus attributes display only for volume snapshots with a lockExpiryTime setting.
The lockStatus attribute is a derived property that indicates the current status of the lock. The value is locked when the lock is active, or expired when the lock expiry time has passed.
Note:
At any time, an Exascale cluster administrator who has the cl_admin privilege can modify an immutable lock or delete a locked volume snapshot.
Related Topics
Parent topic: Administer Volume Snapshots