Date: Sun, 13 Nov 2022 22:03:15 +0300 From: Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com> To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us> Cc: Mark Saad <nonesuch@longcount.org>, freebsd-fs@freebsd.org Subject: Re: Odd behaviour of two identical ZFS servers mirroring via rsync Message-ID: <CAOgwaMueCqSiUd8FHuuHOo=q5aPrkGo3LaTTm8E0GBrDNiVv6A@mail.gmail.com> In-Reply-To: <alpine.GSO.2.20.2211131137020.7126@scrappy.simplesystems.org> References: <alpine.BSF.2.22.395.2211111709230.29479@mail0.time-domain.net> <CAOgwaMuoLQ9Er67Y%2B=q%2Bf9724v2WT3L5v5TZaRVXq%2B=1vEyJ%2BA@mail.gmail.com> <alpine.BSF.2.22.395.2211112008220.30520@mail0.time-domain.net> <alpine.GSO.2.20.2211121949060.7126@scrappy.simplesystems.org> <CAMXt9Nbr=7K6PELVGAPZ=-RiAfx=zp9iOoKyWdH=0H2=AiE52Q@mail.gmail.com> <alpine.GSO.2.20.2211131137020.7126@scrappy.simplesystems.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000009ac45d05ed5ec8bc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Nov 13, 2022 at 8:46 PM Bob Friesenhahn < bfriesen@simple.dallas.tx.us> wrote: > On Sun, 13 Nov 2022, Mark Saad wrote: > >> > > Bob are you saying when the target is zfs --inplace --no-whole-file hel= ps > > or just in general when you have > > large files ? Also have you tried using --delete-during / > --delete-after ? > > The '-inplace --no-whole-file' updates the file blocks if they have > changed (comparing the orgin blocks with the existing mirror blocks) > rather than creating a new copy of the file and moving it into place > when it is complete. ZFS does not check if data content has been > changed while it is being written so a write of the same data will > result in a fresh allocation based on its Copy On Write ("COW") > design. Writing a whole new file obviously significantly increases > the number of blocks which are written. Requesting that rsync only > write to the file for the blocks which have changed reduces the total > number of blocks which get written. > > The above helps quite a lot when using snapshots since then fewer > blocks are in the snapshots. > > I have never tried --delete-during so I can't comment on that. > > Bob > -- > Bob Friesenhahn > bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen= / > GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ > Public Key, http://www.simplesystems.org/users/bfriesen/public-key.tx= t > > More information on zfs and rsync : https://www.google.com/search?q=3Duse+of+rsync+command+for+zfs+volumes&sxsr= f=3DALiCzsZALxJWD--EizNVNAHl-u-j6BOndw%3A1668365903483&source=3Dhp&ei=3DTz5= xY6XbGrCQxc8Plbyl8A0&iflsig=3DAJiK0e8AAAAAY3FMX56shwXahupzkNcfFLLhJJd0xL1U&= ved=3D0ahUKEwjlvp6o66v7AhUwSPEDHRVeCd4Q4dUDCAc&uact=3D5&oq=3Duse+of+rsync+c= ommand+for+zfs+volumes&gs_lcp=3DCgdnd3Mtd2l6EAMyBQgAEKIEOgQIIxAnOgsILhCABBD= HARDRAzoFCAAQgAQ6CAguENQCEIAEOggILhCABBDUAjoFCC4QgAQ6CAgAEIAEEMsBOggILhCABB= DLAToGCAAQFhAeOggIABAWEB4QDzoFCAAQhgM6BQghEKABOgQIIRAVOggIIRAWEB4QHToHCCEQo= AEQClAAWI6bAmCtnQJoAHAAeACAAbkCiAHkLJIBCDAuMzUuMC4xmAEAoAEB&sclient=3Dgws-w= iz use of rsync command for zfs volumes Mehmet Erol Sanliturk --0000000000009ac45d05ed5ec8bc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:tahoma,sans-serif;font-size:large"><br></div></div><br><div class= =3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Nov 13, 2022= at 8:46 PM Bob Friesenhahn <<a href=3D"mailto:bfriesen@simple.dallas.tx= .us">bfriesen@simple.dallas.tx.us</a>> wrote:<br></div><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex">On Sun, 13 Nov 2022, Mark Saad wrote:<br> >><br> > Bob are you saying when the target is zfs --inplace --no-whole-file he= lps<br> > or just in general when you have<br> > large files ?=C2=A0 Also have you tried using --delete-during / --dele= te-after=C2=A0 ?<br> <br> The '-inplace --no-whole-file' updates the file blocks if they have= <br> changed (comparing the orgin blocks with the existing mirror blocks) <br> rather than creating a new copy of the file and moving it into place <br> when it is complete.=C2=A0 ZFS does not check if data content has been <br> changed while it is being written so a write of the same data will <br> result in a fresh allocation based on its Copy On Write ("COW") <= br> design.=C2=A0 Writing a whole new file obviously significantly increases <b= r> the number of blocks which are written.=C2=A0 Requesting that rsync only <b= r> write to the file for the blocks which have changed reduces the total <br> number of blocks which get written.<br> <br> The above helps quite a lot when using snapshots since then fewer <br> blocks are in the snapshots.<br> <br> I have never tried --delete-during so I can't comment on that.<br> <br> Bob<br> -- <br> Bob Friesenhahn<br> <a href=3D"mailto:bfriesen@simple.dallas.tx.us" target=3D"_blank">bfriesen@= simple.dallas.tx.us</a>, <a href=3D"http://www.simplesystems.org/users/bfri= esen/" rel=3D"noreferrer" target=3D"_blank">http://www.simplesystems.org/us= ers/bfriesen/</a><br> GraphicsMagick Maintainer,=C2=A0 =C2=A0 <a href=3D"http://www.GraphicsMagic= k.org/" rel=3D"noreferrer" target=3D"_blank">http://www.GraphicsMagick.org/= </a><br> Public Key,=C2=A0 =C2=A0 =C2=A0<a href=3D"http://www.simplesystems.org/user= s/bfriesen/public-key.txt" rel=3D"noreferrer" target=3D"_blank">http://www.= simplesystems.org/users/bfriesen/public-key.txt</a><br> <br></blockquote><div><br></div><div><br></div><div><br></div><div><div sty= le=3D"font-family:tahoma,sans-serif;font-size:large" class=3D"gmail_default= ">More information on zfs and rsync :</div><br></div><div><br></div><div><a= href=3D"https://www.google.com/search?q=3Duse+of+rsync+command+for+zfs+vol= umes&sxsrf=3DALiCzsZALxJWD--EizNVNAHl-u-j6BOndw%3A1668365903483&sou= rce=3Dhp&ei=3DTz5xY6XbGrCQxc8Plbyl8A0&iflsig=3DAJiK0e8AAAAAY3FMX56s= hwXahupzkNcfFLLhJJd0xL1U&ved=3D0ahUKEwjlvp6o66v7AhUwSPEDHRVeCd4Q4dUDCAc= &uact=3D5&oq=3Duse+of+rsync+command+for+zfs+volumes&gs_lcp=3DCg= dnd3Mtd2l6EAMyBQgAEKIEOgQIIxAnOgsILhCABBDHARDRAzoFCAAQgAQ6CAguENQCEIAEOggIL= hCABBDUAjoFCC4QgAQ6CAgAEIAEEMsBOggILhCABBDLAToGCAAQFhAeOggIABAWEB4QDzoFCAAQ= hgM6BQghEKABOgQIIRAVOggIIRAWEB4QHToHCCEQoAEQClAAWI6bAmCtnQJoAHAAeACAAbkCiAH= kLJIBCDAuMzUuMC4xmAEAoAEB&sclient=3Dgws-wiz">https://www.google.com/sea= rch?q=3Duse+of+rsync+command+for+zfs+volumes&sxsrf=3DALiCzsZALxJWD--Eiz= NVNAHl-u-j6BOndw%3A1668365903483&source=3Dhp&ei=3DTz5xY6XbGrCQxc8Pl= byl8A0&iflsig=3DAJiK0e8AAAAAY3FMX56shwXahupzkNcfFLLhJJd0xL1U&ved=3D= 0ahUKEwjlvp6o66v7AhUwSPEDHRVeCd4Q4dUDCAc&uact=3D5&oq=3Duse+of+rsync= +command+for+zfs+volumes&gs_lcp=3DCgdnd3Mtd2l6EAMyBQgAEKIEOgQIIxAnOgsIL= hCABBDHARDRAzoFCAAQgAQ6CAguENQCEIAEOggILhCABBDUAjoFCC4QgAQ6CAgAEIAEEMsBOggI= LhCABBDLAToGCAAQFhAeOggIABAWEB4QDzoFCAAQhgM6BQghEKABOgQIIRAVOggIIRAWEB4QHTo= HCCEQoAEQClAAWI6bAmCtnQJoAHAAeACAAbkCiAHkLJIBCDAuMzUuMC4xmAEAoAEB&sclie= nt=3Dgws-wiz</a></div><div><br></div><div>use of rsync command for zfs volu= mes</div><div><br></div><div><br></div><div><br></div><div><div style=3D"fo= nt-family:tahoma,sans-serif;font-size:large" class=3D"gmail_default">Mehmet= Erol Sanliturk</div><div style=3D"font-family:tahoma,sans-serif;font-size:= large" class=3D"gmail_default"><br></div><div style=3D"font-family:tahoma,s= ans-serif;font-size:large" class=3D"gmail_default"><br></div><div style=3D"= font-family:tahoma,sans-serif;font-size:large" class=3D"gmail_default"></di= v><br></div><div><br></div><div><br></div><div>=C2=A0</div></div></div> --0000000000009ac45d05ed5ec8bc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMueCqSiUd8FHuuHOo=q5aPrkGo3LaTTm8E0GBrDNiVv6A>