I am seeing a random behavior when copying from one server to another using rsync to the /dev/null of the destination server. This is as part my network performance testing, and I want to avoid Disk I/O in my testings. I have the same script in all my servers, but for some of them the destination /dev/null gets overwritten and becomes a regular file, and that breaks other things.
For the same server scp does not overwrite the destination /dev/null.
Before:
[root@localhost ~]# ls -l /dev/null
crw-rw-rw-. 1 root root 1, 3 Sep 11 09:24 /dev/null
Here is my rsync command:
rsync -v -e ssh --progress 500MB root@destination-server:/dev/null
After:
[root@localhost ~]# ls -l /dev/null
-rw-r--r--. 1 root root 104857600 Sep 11 10:09 /dev/null
Doing scp to the same server, does not break /dev/null
scp 500MB root@destination-server:/dev/null
Any idea why causes the random behavior? My servers are a mix of CentOS6 and 7
Thank You, Eilbron