Solution to IO error encountered in Rsync: skipping file deletion

Previously it was synchronous:

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [generator=3.1.2]

So I add the r and force parameters to the sync script.

# cat mirrors.sh
#!/bin/bash
###End an existing rsync process
killall `ps aux|grep rsync|awk -F" " '{print $11}'`
killall `ps aux|grep rsync|awk -F" " '{print $11}'`
echo Ending time `date +%F_%H%M%S`                                  >> /tmp/rsync_process.log
echo '###################Ending time ######################' >> /tmp/rsync_process.log
#http://mirrors.ustc.edu.cn/help/rsync-guide.html
URL="rsync://mirrors.tuna.tsinghua.edu.cn"
#URL="rsync://rsync.mirrors.ustc.edu.cn/repo"
rsync -ravzPH --delete  --force                $URL/centos/ /data/centos/ >> /tmp/rsync_centos.log 
rsync -ravzPH --delete  --force                $URL/epel/   /data/epel    >> /tmp/rsync_epel.log   
#rsync -avzPH --delete                  $URL/ceph/ /data/ceph >> /tmp/rsync_ceph.log
echo Completion time `date +%F_%H%M%S`                                  >> /tmp/rsync_process.log
echo '###################Completion time ######################' >> /tmp/rsync_process.log

IO error and blade file deletion appeared synchronously

[root@mirrors tmp]# tail -f rsync_centos.log
|   Service Provided by                            |
|      neomirrors                                  |
|                                                  |
+==================================================+

 Note: This service is provided with a modified
 version of rsync. For detailed information, please
 visit: https://github.com/tuna/rsync

receiving incremental file list
IO error encountered -- skipping file deletion

Meanwhile another error still exists:

rsync: readlink_stat("7.7.1908/isos/x86_64/.CentOS-7-x86_64-Everything-1908.iso.RjFDl5" (in centos)) failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [generator=3.1.2]

Taking a closer look at the parameters of rsync, one of the options is:
Delete even if I/O errors occur
(Delete even if I/O error occurs)

[root@mirrors bin]# cat mirrors.sh
#!/bin/bash
###End an existing rsync process
killall `ps aux|grep rsync|awk -F" " '{print $11}'`
killall `ps aux|grep rsync|awk -F" " '{print $11}'`
echo Ending time `date +%F_%H%M%S`                                  >> /tmp/rsync_process.log
echo '###################Ending time ######################' >> /tmp/rsync_process.log
#http://mirrors.ustc.edu.cn/help/rsync-guide.html
URL="rsync://mirrors.tuna.tsinghua.edu.cn"
#URL="rsync://rsync.mirrors.ustc.edu.cn/repo"
rsync -ravzPH --delete  --force   --ignore-errors             $URL/centos/ /data/centos/ >> /tmp/rsync_centos.log 
rsync -ravzPH --delete  --force   --ignore-errors             $URL/epel/   /data/epel    >> /tmp/rsync_epel.log   
#rsync -avzPH --delete                  $URL/ceph/ /data/ceph >> /tmp/rsync_ceph.log
echo Completion time `date +%F_%H%M%S`                                  >> /tmp/rsync_process.log
echo '###################Completion time ######################' >> /tmp/rsync_process.log

OK, so far there is no error.

Read More: