<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 21/08/2019 20:34, Stephen John Smoogen wrote:<br>
    <blockquote type="cite"
cite="mid:CANnLRdh+kfuGEG+DSLR=Fe1iqe+-5i3JZUEYYdJ6iWB-m1bFgA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr"><br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Wed, 21 Aug 2019 at
            19:26, João Carlos Mendes Luís <<a
              href="mailto:jonny@corp.globo.com" moz-do-not-send="true">jonny@corp.globo.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF">
              <p>Hi,</p>
              <p>    I'm preping a new backend for our mirror host, and
                just found that centos mirror could use a little help
                from hardlinking.  After running `hardlink -cvvn` on our
                copy of centos repo, I got these results:</p>
              <blockquote>
                <p><b><tt>Directories 774</tt></b><b><tt><br>
                    </tt></b><b><tt>Objects 220535</tt></b><b><tt><br>
                    </tt></b><b><tt>IFREG 219740</tt></b><b><tt><br>
                    </tt></b><b><tt>Comparisons 4839</tt></b><b><tt><br>
                    </tt></b><b><tt>Would link 903</tt></b><b><tt><br>
                    </tt></b><b><tt>Would save 2951557120</tt></b><br>
                </p>
              </blockquote>
              <p>    This means that 903 files are exactly equal
                (ignoring metadata, like date, perms, etc), meaning that
                more than 2.9GB could be saved.  Hardly much in a 207GB
                repo, but a save anyway.  Also, this means that local
                file system cache would be optmized.</p>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>It might be but it also depends on what the files are.
            Could you give exactly what files are doing this.. it may be
            that the other data is very important for some reason and a
            hardlink won't be possible.</div>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>    From these 903 files, 859 are drpms, 1 rpm
      (storhaug-nfs-1.0-1.el7.noarch.rpm), 10 are RPM-GPG-KEYs, 2 are
      html (header and notes), 1 GPL, some isolinux config files and
      many repodata files (contrib, cr, extras).</p>
    <p>    Some examples:</p>
    <tt><b>centos/6.10/centosplus/x86_64/drpms/kernel-firmware-2.6.32-696.30.1.el6.centos.plus_2.6.32-754.6.3.el6.centos.plus.noarch.drpm</b></tt><tt><b><br>
      </b></tt><tt><b>centos/6.10/centosplus/i386/drpms/kernel-firmware-2.6.32-696.30.1.el6.centos.plus_2.6.32-754.6.3.el6.centos.plus.noarch.drpm</b></tt><br>
    <br>
    <tt><b>centos/7.6.1810/storage/x86_64/gluster-4.1/storhaug-nfs-1.0-1.el7.noarch.rpm</b></tt><br>
    <tt><b>centos/7.6.1810/storage/x86_64/gluster-4.0/storhaug-nfs-1.0-1.el7.noarch.rpm</b></tt><br>
    <br>
    <tt><b>centos/RPM-GPG-KEY-CentOS-Testing-7</b></tt><br>
    <tt><b>centos/7.6.1810/os/x86_64/RPM-GPG-KEY-CentOS-Testing-7</b></tt><br>
    <br>
    <tt><b>centos/6.10/os/x86_64/isolinux/boot.msg<br>
      </b></tt><tt><b>centos/7.6.1810/os/x86_64/isolinux/boot.msg</b></tt><br>
    <br>
    <tt><b>centos/6.10/cr/x86_64/repodata/dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz</b></tt><br>
    <tt><b>centos/7.6.1810/cr/x86_64/repodata/dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz<br>
      </b></tt><br>
    <br>
        You can easily check on your own repo by running `hardlink -cvvn
    centos`, it will NOT make any change, just compare files to generate
    list and report.<tt><b><br>
      </b></tt>
    <blockquote type="cite"
cite="mid:CANnLRdh+kfuGEG+DSLR=Fe1iqe+-5i3JZUEYYdJ6iWB-m1bFgA@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div><br>
          </div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF">
              <p>    Problem is, everytime I resync my mirror, these
                hardlinks are lost.  So the hardlink shall be done in
                the master repo.</p>
              <p>    Is there anything that I'm not seeing that prevents
                this optimization?</p>
              <p><br>
              </p>
              <div class="gmail-m_3880120212369220953moz-signature">   
                Regards,<br>
                <br>
                        Jonny<br>
                <br clear="all">
                <div>
                  <div
style="margin:0px;color:rgba(0,0,0,0.87);font-family:Helvetica,Arial,sans-serif;font-size:14px;letter-spacing:normal"><br>
                    <table
                      style="margin:0px;border-collapse:collapse;vertical-align:top"
                      cellspacing="0" cellpadding="0" border="0">
                      <tbody>
                        <tr>
                          <td colspan="2">
                            <hr></td>
                        </tr>
                        <tr>
                          <td style="padding:8px" valign="middle"> <img
src="https://s3.glbimg.com/v1/AUTH_0601abe00ef04d20a8b20254df29a44e/assinatura/Globocom.png"
                              alt="globo.com" title="Globo.com"
                              moz-do-not-send="true" width="56"
                              height="56"> </td>
                          <td>
                            <table cellspacing="0" cellpadding="0"
                              border="0">
                              <tbody>
                                <tr>
                                  <td> <b>João Carlos Mendes Luís</b> </td>
                                </tr>
                                <tr>
                                  <td> <b>Senior DevOps Engineer</b> </td>
                                </tr>
                                <tr>
                                  <td>
                                    <div
                                      style="line-height:20px;font-size:14px;letter-spacing:0px;margin:0px">
                                      <a
                                        href="mailto:jonny@corp.globo.com"
                                        target="_blank"
                                        moz-do-not-send="true">jonny@corp.globo.com</a><br>
                                      +55-21-2483-6893<br>
                                      +55-21-99218-1222<br>
                                    </div>
                                  </td>
                                </tr>
                              </tbody>
                            </table>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <p><br>
                  </p>
                </div>
              </div>
            </div>
            _______________________________________________<br>
            CentOS-mirror mailing list<br>
            <a href="mailto:CentOS-mirror@centos.org" target="_blank"
              moz-do-not-send="true">CentOS-mirror@centos.org</a><br>
            <a
              href="https://lists.centos.org/mailman/listinfo/centos-mirror"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.centos.org/mailman/listinfo/centos-mirror</a><br>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">Stephen J Smoogen.<br>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
CentOS-mirror mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS-mirror@centos.org">CentOS-mirror@centos.org</a>
<a class="moz-txt-link-freetext" href="https://lists.centos.org/mailman/listinfo/centos-mirror">https://lists.centos.org/mailman/listinfo/centos-mirror</a>
</pre>
    </blockquote>
  </body>
</html>