Il 15/01/20 17:51, Jon Pruente ha scritto:
On Wed, Jan 15, 2020 at 10:18 AM Alessandro Baggi < alessandro.baggi@gmail.com> wrote:
I made several test to see what happens and noticed that removing -S (--sparse) from rsync command problem does not occour. In another test, thinking about a problem on 0ed file, I tried file generation using /dev/urandom then /dev/zero and running rsync -avS the problem is disappeared.
https://wiki.archlinux.org/index.php/Sparse_file#Creating_sparse_files
In short, rsync is being told to create sparse files with the -S flag, so it does. Could you share what you did with the urandom then zero test you mentioned? I'm curious what exact sequence of commands you used. _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Hi Jon, I wrote in the first mail the script with the current order of command that I used. Try to run in a bash script and you will see the result.
If not my sequence is:
dd if=/dev/zero of=src/testfile bs=1M count=100 rsync -avS src/ dest/ du -h dest/testfile du -b dest/testfile
for urandom:
dd if=/dev/urandom of=src/testfile bs=1M count=100 rsync -avS src/ dest/ du -h dest/testfile du -b dest/testfile
without --sparse the same as first sequence without -S option.
But why du reports 0M when with -b reports correct bytes and why this happens only with zeroed file?
I don't know if in the original post mail script