You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to use rsync to write an OS image to a microSD card. My objective is to minimize the number of writes that need to happen so that I can avoid using the limited writes that the card supports during it's lifetime.
Re-writing the image with the same command, with stats output turned on, shows that the full contents of the file is being written.
I also observed the write buffer for the kernel increasing, e.g. cat /proc/meminfo
rsync --write-devices --info=progress2,stats2 /path/to/image.img /dev/mmcblk0
8,589,934,592 100% 17.64MB/s 0:07:44 (xfr#1, to-chk=0/1)
rsync: [receiver] ftruncate failed on "/dev/mmcblk0": Invalid argument (22)
8,589,934,592 100% 17.64MB/s 0:07:44 (xfr#1, to-chk=0/1)
Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 8,589,934,592 bytes
Total transferred file size: 8,589,934,592 bytes
Literal data: 8,589,934,592 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 8,592,031,828
Total bytes received: 35
sent 8,592,031,828 bytes received 35 bytes 18,457,640.95 bytes/sec
total size is 8,589,934,592 speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1330) [sender=3.2.3]
What I expected to see happen is that rsync would read the data off of the card, and determine that no additional data need be written.
Activity