When it comes to deleting a writable snapshot, OneFS uses the job engine’s TreeDelete job under the hood to unlink all the contents. As such, running the ‘isi snapshots writable delete’ CLI command automatically queues a TreeDelete instance. The job engine runs this instance asynchronously to remove and clean up a writable snapshot’s namespace and contents. However, be aware that the TreeDelete job execution, and hence the data deletion, is not instantaneous. Instead, the writable snapshot’s directories and files are moved under a temporary ‘*.deleted’ directory. For example:
# isi snapshot writable create prod1 /ifs/test/wsnap2
# isi snap writable delete /ifs/test/wsnap2
Are you sure? (yes/[no]): yes
# ls /ifs/test
Next, this temporary directory is removed in a nonsynchronous operation. If the TreeDelete job fails for some reason, the writable snapshot can be deleted using its renamed path. For example:
# isi snap writable delete /ifs/test/wsnap2.51dc245eb.deleted
Note: Deleting a writable snapshot removes the lock on the backing read-only snapshot so it can also be deleted, if required. It can be deleted if there are no other active writable snapshots based off that read-only snapshot.
The deletion of writable snapshots in OneFS 9.3 and later is a manual process. There is no provision for automated, policy-driven control such as the ability to set a writable snapshot expiry date, or a bulk snapshot deletion mechanism.