Data Domain: How to delete Retention lock Governance MTree
Summary: The purpose of this document is to provide a concise explanation of the steps required to remove the RLG Mtree.
Instructions
The scope is related to the common mistake of removing a Retention Lock governance.
It is important to revert the file located on the RL MTree before disabling it.
The RL must be 'reverted' if the file retention period has not yet expired.
Always see the official documentation related to the Retention Lock FAQ:
Data Domain: Retention Lock Frequently Asked Questions
Typically the logs report the following alerts:
-
If a file is locked by the retention, it cannot be removed shows:
Cannot delete or modify a retention locked file10/08 08:59:46.764075 [b9956f0] ERROR: ddboost-<dda.lab.loc-51584>: ddboost_api ERROR: ddp_unlink() failed, su_name=Copia_dda.lab.loc, path_name=/Backups/.../vm-1-disk-key-2000-flat.vmdk, Err: 5520-nfs remove failed (nfs: Cannot delete or modify a retention locked file)
-
If the folder cannot be deleted if not empty shows:
rmdir failed (nfs: Directory not empty10/08 08:59:46.898938 [7f095817bcb0] ERROR: ddboost-<dda.lab.loc-51584>: ddboost_api ERROR: ddp_rmdir() failed, su_name=Copia_dda.lab.loc, path_name=.../Backups/.../03971, Err: 5043-nfs rmdir failed (nfs: Directory not empty)
Looking at the Mtree list the RL MTree is already disabled even though it is not empty.
# mtree list: /data/col1/test_rlg RW/RLGD
In this scenario, it is important to be aware that before disabling the RL the files must be reverted otherwise the file keeps the retention configuration,
The steps to revert and delete the RLG MTree are the following:
-
Re-enable governance (the revert command does not do anything if the Mtree is RLGD, so we must set it to RLGE again)
# mtree retention-lock enable mtree [mtree]
-
Revert the governance lock on the Mtree
# mtree retention-lock revert [mtree]
-
Disable governance
# mtree retention-lock disable mtree [mtree]
-
Export DD NFS:
# nfs export add /data/col1/[mtree] clients [The Linux_Client_IP_Adr]
-
Mount partition from Linux client:
# mount -o nolock DD_IP_Adr:/data/col1/[mtree] /mnt/dd-mount
-
Delete everything on the Mtree like you would any other files
-
Unmount the Mtree from the other server
# umount /test_rlg
-
Now Mtree can be deleted or moved. [Pay attention the MTree might be a storage unit]
# ddboost storage-unit delete Storage_Unit_name # mtree delete /data/col1/Mtree_Name
Example
Assuming:
LSU: test_rlg
DD IP: 10.10.10.31
Linux Client: 10.10.10.30
Steps:
-
Re-enable governance (the revert command does not do anything if the Mtree is RLGD, so we must set it to RLGE again)
# mtree retention-lock enable mtree test_rlg
-
Revert the governance lock on the Mtree
# mtree retention-lock revert test_rlg
-
Disable governance
# mtree retention-lock disable mtree test_rlg
-
Export DD NFS:
# nfs export add /data/col1/test_rlg clients 10.10.10.30
-
Mount the NFS export from a Linux Client
cd /mnt # mkdir /mnt/test_rlg # chown 775 /mnt/test_rlg # mount -o nolock 10.10.10.31:/data/col1/test_rlg /mnt/test_rlg
-
Delete everything [Always pay attention when using the
rm -rfcommand]# rm -rf /mnt/test_rlg/
-
Unmount the Mtree from the other server
# umount /test_rlg
-
Now Mtree can be deleted.
# ddboost storage-unit delete test_rlg # mtree delete /data/col1/test_rlg
Additional Information
To display the retention lock file, see the following command:
mtree retention-lock report generate retention-details mtrees /data/col1/test_rlg
Retention lock compliance [RLC]
t is not possible to revert a retention lock against files in MTrees using compliance mode.
The RLC MTree must be empty, and the retention must be expired before delete the MTree.