[Bug 11101] support writing to devices

Linda A. Walsh rsync at tlinx.org
Sat Mar 7 16:47:08 MST 2015


samba-bugs at samba.org wrote:
> https://bugzilla.samba.org/show_bug.cgi?id=11101
>
> --- Comment #1 from Jason Pyeron <jpyeron at pdinc.us> ---
> this is 
>
> https://git.samba.org/?p=rsync-patches.git;a=blob;f=write-devices.diff
>
> using it in production now
>   
I'm am probably confused, but it looks like this patch
doesn't copy the inode (device-inode), but is intended to
copy the contents of a device?

So if you did "rsync [options] /dev /dev2", instead
of recreating or making a copy of "/dev", it would try
to read every device in /dev and copy the contents to files(?)
in /dev2?

So "rsync [op] /dev/zero /dev2/zero" would not complete
until whatever device  "/dev2" is on, fills up, no?

Why would you use 'rsync' to copy the contents of a device?
Seems like it would be more efficient to do something like
"cat /dev/zero >/dev2/zero", or better, use 'dd' which was
designed for things like copying raw contents to a target.

This seems like a potentially dangerous operation, since,
in generally, how would rsync know when to stop?

I.e. in the case of copy the contents of /dev/zero, even
if you copied the contents to "/dev/null", how would
rsync know when to stop?  Wouldn't it go on forever?




More information about the rsync mailing list