The tree-delete feature provides a mechanism to immediately remove a directory tree from its position in the file system and to perform the deletion as a background job. A directory tree consists of a specified directory and the hierarchy of subdirectories and files below it. When a directory tree is targeted for deletion, a tree-delete job is created and added to the job queue. The targeted directory tree is immediately removed from the file system namespace, moved to the system trash directory, and scheduled for background deletion.
The tree-delete interfaces are provided in the form of management APIs and CLI commands. No license is required.
The tree-delete feature provides the following benefits, compared to deleting a directory tree via a network client:
The instantaneous removal of a directory tree from the listing of the parent directory, allowing the client to proceed with further actions.
The server-side delete eliminates the need for a client to recursively delete the directory tree over the network, therefore using less system resources.
The multi-threaded implementation allows parallel deletion of the contents of the directory tree.
Important considerations when using tree-delete
Unmounting a file system and tree-delete
When a file system is unmounted, all related tree-deletion activity is suspended and resumed on a subsequent re-mount.
Tree-deletion activity on other mounted file systems remains unaffected.
The following directories cannot be deleted using tree-delete:
Root directory and system directories.
Virtualization root or its sub-directory.
Regular directory containing virtualization root(s). See the warning on deletion attempts of such a directory tree in the tree-delete-job-submit man page
Sub-directory of a virtual volume.
Maximum supported tree depth
Tree-delete supports deletion of trees maximum 1000 levels deep.
tree-delete is implemented with the commands:
Please see the man pages for details.
Submitting a tree-delete job
Note the following factors when using the tree-delete-job-submit command:
The main activities pertaining to a submitted tree-delete job, such as its start and end, are logged to the event log..
A maximum of 160 jobs can be handled by the system at any given time.
Run logtrace dump tree-delete for details about deleted files. Contact customer support if necessary.