[gpfsug-discuss] Quick delete of huge tree
Ulrich Sibiller
u.sibiller at science-computing.de
Tue Apr 20 13:09:42 BST 2021
On 4/20/21 1:47 PM, Jonathan Buzzard wrote:
> You are going to have to remove all the inodes and hence the speed is
> going to be dependant on your metadata performance no matter how you
> approach the problem. I doubt that you are going to get much better than
> a recursive rm.
>
> You could try running a series of parallel rm's attacking subsection of
> the directory tree on different nodes, but I suspect that it will make
> very little difference. You could my sync/restore script to split the
> problem up between different nodes
>
> https://github.com/digitalcabbage/syncrestore
might be worth a try, thanks.
> Does it matter that it takes a long time? Use screen or tmux to run the
Unfortunately it makes sense since I need the sapce for something else...
> command in the background safe from accidental detaches and forget
> about. Check on it now and then to see how it's going or just forget
> about it, it will finish. Something like
>
> screen -S filedel -L -Logfile /tmp/filedel.log -d -m /bin/rm -rf <tree>
>
> Consider using mv to move it out the way or hide it while the delete is
> in progress. If you do that think carefully about backups, you don't
> want to back it all up again while it is being deleted :-)
;-) Yeah, that's why I did not the do the mv in the first place ;-)
Thanks,
Uli
--
Dipl.-Inf. Ulrich Sibiller science + computing ag
System Administration Hagellocher Weg 73
Hotline +49 7071 9457 681 72070 Tuebingen, Germany
https://atos.net/de/deutschland/sc
--
Science + Computing AG
Vorstandsvorsitzender/Chairman of the board of management:
Dr. Martin Matzke
Vorstand/Board of Management:
Matthias Schempp, Sabine Hohenstein
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Aufsichtsrat/Supervisory Board:
Martin Wibbe, Ursula Morgenstern
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
More information about the gpfsug-discuss
mailing list