move for rebalancing

Visto 110 veces
Saltar al primer mensaje no leído

Christian Goll

no leída,
23 ene 2015, 5:56:3523/1/15
a fhgfs...@googlegroups.com
Dear BeeGFS community,
as we are so happy with our BeeGFS system we continued to extend it
during the last years, which obviously lead to a great imbalance on the
targets. As one user could move a large bunch of files, this would
rebalance the system. As 'mv' has no option for that, I wonder if
anybody of you knows a handy linux command which recursively copies file
after file and deletes the source file after the copy. 'cp -r FOO BAAR
&& rm -rf FOO' is not a good option, as this would lead to TBs of data
during the process.

kind regards,
Christian

--
Dr. Christian Goll
HITS gGmbH
Schloss-Wolfsbrunnenweg 35
69118 Heidelberg
Germany
Phone: +49 6221 533 230
Fax: +49 6221 533 230

Tilo Buschmann

no leída,
23 ene 2015, 6:13:2523/1/15
a fhgfs...@googlegroups.com
Christian,

Have a look into rsync with the option "--remove-source-files"

For example:

rsync --remove-source-files -a FOO BAR

If you need verbose output, try:

rsync --remove-source-files -avh --progress FOO BAR

Regards,

Tilo

Christian Goll

no leída,
23 ene 2015, 8:34:4323/1/15
a fhgfs...@googlegroups.com,Tilo Buschmann
Hello Tilo,
thanks for your fast reply. Unfortunately this command deletes the files, but leaves the empty directory tree. So you have to use
rsync --remove-source-files -avh --progress FOO BAR
rm -r FOO

kind regards,
Christian
> --
> You received this message because you are subscribed to the Google
> Groups "beegfs-user" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to fhgfs-user+...@googlegroups.com
> <mailto:fhgfs-user+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos