#How do you many files from many forders quick
1 messages · Page 1 of 1 (latest)
you can use client-side async delete which basically means to move files or folders into a "trashcan" directory which then gets deleted by ONTAP in the background, or directly delete them on the cluster. But since you still need to scan through all directories to find the files to delete, this is only faster if you move complete folders into the trashcan (since you then don't need to recurse into them). Whether that helps in you case or not I cannot decide
I have a powershell script I put together to remove anything older than 60 days from a shared temp directory (NFS/CIFS) (commented out directory part bc no subdirs in dir)
`$limit = (Get-Date).AddDays(-60)
$path = "C:\temp"
Delete files older than the $limit.
Get-ChildItem -Path $path -Recurse -Force | Where-Object { !$.PSIsContainer -and $.CreationTime -lt $limit } | Remove-Item -WhatIf
Delete any empty directories left behind after deleting the old files.
#Get-ChildItem -Path $path -Recurse -Force | Where-Object { $.PSIsContainer -and (Get-ChildItem -Path $.FullName -Recurse -Force | Where-Object { !$_.PSIsContainer }) -eq $null } | Remove-Item -Force -Recurse`
Another option may be to look into XCP and utilize the analytics of the tool
yeah that's also a good way, since XCP is quite a bit faster than the OS's NFS client (never tried the CIFS version though)
Cifs is fast well, a bit less scalable
Want to also call out what you mean by "faster" Async delete will be faster from the client side and dramatically reduce load on the client but we don't actually reclaim the space back any faster.
With an azure cvo ha with Page Blobs and high load - sometimes with throttling searching through 5 to 7 mill files in thousand of folders, delete from nfs clients need 1-2 days, Performance via cifs is also slow, currently i Player with tiering and fabricpool hot tier to Split the load on Performance and capacity storage tier which after a General cleanup brought a signifikant Increase of Speer. Never thought that tierisch could bring so much speed