Deleting cloud objects
The standard way to delete cloud files is to set the --cloud-retention-period-days setting that sets a policy that indicates how long a file must be retained after it is deleted from the file system before it must be deleted from the cloud storage tier.
Periodically, the cloud directory is scanned for deleted files by a cloud destroy utility that runs in the background. That utility checks to see which files meet the criteria of being deleted and retained longer than the cloud retention period. Files that exceed the cloud retention period days are deleted automatically by that background utility.
mmcloudgateway config set
After the retention period expires, the marked files are permanently deleted from the cloud storage tier.
It is recommended that you apply the destroy policy that is described because of how file deletion works. For example, when you delete files by using external commands, the cloud objects are immediately marked for deletion only if you apply the destroy policy to the file system by using the mmchpolicy command. If the destroy policy is not applied, the cloud objects are marked for deletion only when you run the reconcile operation. The destroy policy is available here: /opt/ibm/MCStore/samples/cloudDestroy.policy.template. Additionally, you need to apply the destroy policy along with other policies such as transparent recall and migration.
mmcloudgateway files destroy
mmcloudgateway config set --cloud-retention-period-days 60
You
can permanently delete the cloud objects that are marked for deletion from the cloud automatically
by using the destroy policy or the reconcile command.
mmcloudgateway files destroy --cloud-retention-period-days 30 --container-pair-set-name container-1
--filesystem-path /gpfs/myfold
Cloud objects that were marked for deletion 30 days or earlier (for files that are marked for deletion) are deleted. The cloud objects that were marked for deletion less than 30 days are retained.
For more information, see mmcloudgateway command.