rsync suddenly hanging indefinitely during transfers

后端 未结 13 1200
囚心锁ツ
囚心锁ツ 2021-01-30 20:34

For the past few years, I have been using an rsync one-liner to back up important folders on my Mac Mini desktop (OSX 10.9, 2.5 GHz i5, 4 GB RAM) to a FreeNAS box (0.7.2 Sabanda

13条回答
  •  南笙
    南笙 (楼主)
    2021-01-30 20:53

    Holger Ohmacht aka h8ohmh / 8ohmh:

    The problem lies in the filesystem buffer / usage of the interworking of harddisk/hw so far as I could investigate.

    Temporal solution for local drives (eg. USB3<->HD) : A script which is polling the changing disk space. If no changing free disk space then rsync is stalled and has to be restarted

    cmd="rsync -aW --progress --stats --preallocate --super \ \ " eval "$cmd" &
    rm ./ndf.txt rm ./odf.txt while [[ 0 == 0 ]]; do df > ./ndf.txt cmp ./odf.txt ./ndf.txt res="$?" echo "$res" if [[ $res == 0 ]]; then echo "###########################################" ls -al "./ndf.txt" ls -al "./odf.txt" killall rsync eval "$cmd" & else cp ./ndf.txt ./odf.txt fi sleep 60 done
    Change etc to your paths!

    In my case it is always stalling by usage of rsync's --preallocate option (normally because of better disk performance and rescueing continuous blocks), so as long as the disk and filesystem drivers not reworked there just this solution

提交回复
热议问题