<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I think we're basically talking about ODX.
    <a class="moz-txt-link-freetext" href="http://www.google.com/patents/US20120102561">http://www.google.com/patents/US20120102561</a><br>
    <div class="moz-cite-prefix">On 8/22/2014 7:29 AM, Giacomo Fazio
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAO0_EMLVr69vDePS2ukKyU2U_EJ20F-VFQkfS_0gqYaBCzk3+w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hello Niels,<br>
            <br>
          </div>
          Thanks for your explanation. I'm happy you consider my
          proposal doable and that many ideas came to your mind. I would
          like to contribute to it, but I really don't know anything
          about the GlusterFS code and APIs, so I don't know where to
          start and, in this condition, I think it is not an easy job to
          do. I had a rapid look at the functions already existent in
          the APIs, thinking that perhaps a low level copy function was
          already present and I could use it (I saw that, for example,
          the rename function uses this approach), but could not find
          anything. <br>
          Therefore I hope someone has the time and feels like
          implementing this idea, I agree it would be a good
          improvement, not just for me.<br>
          <br>
        </div>
        Giacomo<br>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div dir="ltr">
            <div
style="font-family:Arial,Helvetica,sans-serif;font-size:11px;color:rgb(96,96,96);line-height:14px"
              align="left">
              <div align="left">
                <div align="left">
                  <div align="left"><b style="font-size:12px">Giacomo
                      Fazio</b><br>
                    IT Engineer<br>
                    <br>
                    Tel. +41 91 910 7690<br>
                    E-mail:&nbsp;<a moz-do-not-send="true"
                      href="mailto:giacomo.fazio@wcpmediaservices.com"
                      style="color:rgb(227,6,19);text-decoration:none"
                      target="_blank">giacomo.fazio@wcpmediaservices.com</a>&nbsp;
                    |&nbsp;&nbsp;Web:&nbsp;<a moz-do-not-send="true"
                      href="http://www.wcpmediaservices.com"
                      style="color:rgb(227,6,19);text-decoration:none"
                      target="_blank">www.wcpmediaservices.com</a><br>
                    <br>
                    <span style="color:rgb(227,6,19)">Europe Office:</span>&nbsp;Via
                    Zurigo 35, 6900 Lugano, Switzerland<br>
                    <span style="color:rgb(227,6,19)">USA Office:</span>&nbsp;7083
                    Hollywood Boulevard Los Angeles, CA 90028</div>
                  <div style="color:rgb(0,0,0);font-family:'Times New
                    Roman';font-size:medium;line-height:normal;margin-top:10px">
                    <img moz-do-not-send="true"
src="http://wcpapp.wcpmediaservices.net/images/firma-wcpmediaservices.png"
                      alt="" height="130" width="380"></div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
        <br>
        <div class="gmail_quote">On Fri, Aug 22, 2014 at 3:27 PM, Niels
          de Vos <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:ndevos@redhat.com" target="_blank">ndevos@redhat.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div class="">On Fri, Aug 22, 2014 at 01:26:02PM +0200,
              Giacomo Fazio wrote:<br>
              &gt; Hi there,<br>
              &gt;<br>
              &gt; Thanks to both Soumya and Prashanth. Actually you are
              both right. With the<br>
              &gt; approach proposed by Soumya I would avoid the FUSE
              overhead but, as<br>
              &gt; Prashanth says, the network transfer overhead would
              be always present. This<br>
              &gt; is particularly important for me because I deal with
              very big files<br>
              &gt; (usually around 100 GB and even more), so that
              network transfer have a big<br>
              &gt; impact, while I don't think the impact of the FUSE
              overhead is that big.<br>
              &gt; That's why what I would like to get is a "brick to
              brick" copy (just server<br>
              &gt; side), so I would like to use the APIs to order the
              server to make a copy,<br>
              &gt; so that the network transfer can be avoided.<br>
              &gt;<br>
              &gt; As far as I understood, it is not currently possible
              with libgfapi. Do you<br>
              &gt; think it would be difficult to implement? Are there
              any other ways?<br>
              &gt; Thank you and best regards,<br>
              <br>
            </div>
            "Difficult" is always relative, it depends on many factors
            :) But<br>
            I think implementing server-side copy is quite doable. You
            should start<br>
            with thinking of, and proposing a design. Some ideas that
            would work:<br>
            <br>
            a.<br>
            &nbsp; &nbsp; Have a server-side daemon (maybe glusterd) handle the
            copy. Some new<br>
            &nbsp; &nbsp; libgfapi or gluster-cli function can then connect to the
            daemon and<br>
            &nbsp; &nbsp; pass the instruction on (src brick + dst volume +
            src+dst filename).<br>
            &nbsp; &nbsp; This daemon can then connect to it's instance on the
            server hosting<br>
            &nbsp; &nbsp; the source-brick, and initiate the copy.<br>
            <br>
            b.<br>
            &nbsp; &nbsp; Add a new file operation to the GlusterFS protocol,
            something like<br>
            &nbsp; &nbsp; copy-to-brick. This operation would receive the request
            from the<br>
            &nbsp; &nbsp; client (the client talks to the src-brick hosting the
            src-file as<br>
            &nbsp; &nbsp; usual), and the brick process needs to learn how to
            connect to an<br>
            &nbsp; &nbsp; other brick (from a different volume) and create/write
            the file<br>
            &nbsp; &nbsp; there. The client application should be smart enough to
            pass the<br>
            &nbsp; &nbsp; path to the dst-brick that should contain the dst-file.<br>
            <br>
            While writing this, I have convinced myself that (a) would
            surely be<br>
            easier to do.&nbsp; GlusterD could spawn a special copy process
            (like<br>
            a libgfapi client) that connects to the source and
            destination volumes,<br>
            do the copy, and exit.<br>
            <br>
            This also makes it much easier to start contributing!<br>
            <br>
            1.<br>
            &nbsp; &nbsp; A relatively simple libgfapi binary that implements "cp"
            with<br>
            &nbsp; &nbsp; volume:/path/to/file as parameters should not be too
            difficult. Of<br>
            &nbsp; &nbsp; course, you may need to mkdir the (parent) structure on
            the<br>
            &nbsp; &nbsp; destination too, possibly adding a "-r" option for
            recursive<br>
            &nbsp; &nbsp; copying.<br>
            <br>
            2.<br>
            &nbsp; &nbsp; A second step could then integrate this cp/libgfapi
            implementation<br>
            &nbsp; &nbsp; in some gluster-cli/glusterd procedures.<br>
            <br>
            3.<br>
            &nbsp; &nbsp; Making it smarter and initiate the copy from one of the
            source<br>
            &nbsp; &nbsp; bricks, can then be an other step.<br>
            <br>
            <br>
            For (1), it could be easier to extend some available
            copy-tool.<br>
            Something like rsync already supports different protocols.
            Maybe it is<br>
            possible to teach rsync how and what functions to call from
            libgfapi.<br>
            rsync supports many useful options already, writing a new
            cp/libgfapi<br>
            from scratch that matches only a subset from the features
            that rsync<br>
            has, will be a major project.<br>
            <br>
            The above are just some ideas, thinking out loud... But,
            starting with<br>
            integrating libgfapi in rsync or similar sounds like a major
            usability<br>
            improvement for many Gluster users.<br>
            <br>
            Niels<br>
            <div class=""><br>
              <br>
              &gt;<br>
              &gt; *Giacomo Fazio*<br>
              &gt; IT Engineer<br>
              &gt;<br>
              &gt; Tel. <a moz-do-not-send="true"
                href="tel:%2B41%2091%20910%207690" value="+41919107690">+41
                91 910 7690</a><br>
            </div>
            &gt; E-mail: <a moz-do-not-send="true"
              href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>&nbsp;
            |&nbsp; Web: <a moz-do-not-send="true"
              href="http://www.wcpmediaservices.com" target="_blank">www.wcpmediaservices.com</a><br>
            <div class="im HOEnZb">&gt;<br>
              &gt; Europe Office: Via Zurigo 35, 6900 Lugano,
              Switzerland<br>
              &gt; USA Office: 7083 Hollywood Boulevard Los Angeles, CA
              90028<br>
              &gt;<br>
              &gt;<br>
            </div>
            <div class="HOEnZb">
              <div class="h5">&gt; On Fri, Aug 22, 2014 at 9:36 AM,
                Prashanth Pai &lt;<a moz-do-not-send="true"
                  href="mailto:ppai@redhat.com">ppai@redhat.com</a>&gt;
                wrote:<br>
                &gt;<br>
                &gt; &gt; Hi,<br>
                &gt; &gt;<br>
                &gt; &gt; Even with that approach, data would still be
                read (over the n/w) at the<br>
                &gt; &gt; client (the app using libgfapi). I think what
                he is looking for is a server<br>
                &gt; &gt; side copy (brick to brick) or within same
                brick _without_ the need for data<br>
                &gt; &gt; to go through client.<br>
                &gt; &gt;<br>
                &gt; &gt; Swift has this feature[1] and it would be
                really cool for glusterfs to<br>
                &gt; &gt; have it (may be as an external tool or as a
                API in libgfapi) :)<br>
                &gt; &gt;<br>
                &gt; &gt; # gluster-copy &lt;src&gt; &lt;dest&gt;<br>
                &gt; &gt; or<br>
                &gt; &gt; glfs_copy(src,dest)<br>
                &gt; &gt;<br>
                &gt; &gt; [1]<br>
                &gt; &gt; <a moz-do-not-send="true"
href="http://programmerthoughts.com/openstack/server-side-object-copy-in-openstack-storage/"
                  target="_blank">http://programmerthoughts.com/openstack/server-side-object-copy-in-openstack-storage/</a><br>
                &gt; &gt;<br>
                &gt; &gt;<br>
                &gt; &gt;<br>
                &gt; &gt; Regards,<br>
                &gt; &gt;&nbsp; -Prashanth Pai<br>
                &gt; &gt;<br>
                &gt; &gt; ----- Original Message -----<br>
                &gt; &gt; From: "Soumya Koduri" &lt;<a
                  moz-do-not-send="true"
                  href="mailto:skoduri@redhat.com">skoduri@redhat.com</a>&gt;<br>
                &gt; &gt; To: "Giacomo Fazio" &lt;<a
                  moz-do-not-send="true"
                  href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>&gt;,
                "John Mark<br>
                &gt; &gt; Walker" &lt;<a moz-do-not-send="true"
                  href="mailto:johnmark@gluster.org">johnmark@gluster.org</a>&gt;<br>
                &gt; &gt; Cc: <a moz-do-not-send="true"
                  href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a>,
                "Giovanni Contri" &lt;<br>
                &gt; &gt; <a moz-do-not-send="true"
                  href="mailto:giovanni.contri@wcpmediaservices.com">giovanni.contri@wcpmediaservices.com</a>&gt;,
                <a moz-do-not-send="true"
                  href="mailto:forge-admin@gluster.org">forge-admin@gluster.org</a><br>
                &gt; &gt; Sent: Friday, August 22, 2014 12:40:01 PM<br>
                &gt; &gt; Subject: Re: [Gluster-devel] Question about
                file copy through libgfapi<br>
                &gt; &gt;<br>
                &gt; &gt; Hi Giacomo,<br>
                &gt; &gt;<br>
                &gt; &gt; If your requirement is to get away with
                fuse/protocol clients and do<br>
                &gt; &gt; server-side operations, I think its doable by
                writing a simple libgfapi<br>
                &gt; &gt; application. But since there is no libgfapi
                API equivalent to "cp"<br>
                &gt; &gt; command, you may need to implement that
                functionality using "glfs_open,<br>
                &gt; &gt; glfs_read &amp; glfs_write" APIs.<br>
                &gt; &gt;<br>
                &gt; &gt; Here are the few links which Humble has
                documented on how to use<br>
                &gt; &gt; libgfapi and different APIs supported by it-<br>
                &gt; &gt;<br>
                &gt; &gt; <a moz-do-not-send="true"
                  href="http://humblec.com/libgfapi-interface-glusterfs/"
                  target="_blank">http://humblec.com/libgfapi-interface-glusterfs/</a><br>
                &gt; &gt; <a moz-do-not-send="true"
href="https://github.com/gluster/glusterfs/blob/master/doc/features/libgfapi.md"
                  target="_blank">https://github.com/gluster/glusterfs/blob/master/doc/features/libgfapi.md</a><br>
                &gt; &gt;<br>
                &gt; &gt;<br>
                &gt; &gt; Few sample examples (written in 'C' and
                'python') are copied to -<br>
                &gt; &gt; <a moz-do-not-send="true"
                  href="https://github.com/gluster/glusterfs/tree/master/api/examples"
                  target="_blank">https://github.com/gluster/glusterfs/tree/master/api/examples</a><br>
                &gt; &gt;<br>
                &gt; &gt;<br>
                &gt; &gt; Thanks,<br>
                &gt; &gt; Soumya<br>
                &gt; &gt;<br>
                &gt; &gt;<br>
                &gt; &gt;<br>
                &gt; &gt; On 08/21/2014 08:45 PM, Giacomo Fazio wrote:<br>
                &gt; &gt; &gt; Hi John,<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt; Thanks for your quick answer. Do you mean
                that my question can be<br>
                &gt; &gt; &gt; summarized in "can we do server-only
                operations?"? Yes, I think so.<br>
                &gt; &gt; &gt; Please let me know as soon as you receive
                any answer or provide me a<br>
                &gt; &gt; &gt; link where I can follow directly this
                case.<br>
                &gt; &gt; &gt; Thanks in advance and best regards,<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt; *Giacomo Fazio*<br>
                &gt; &gt; &gt; IT Engineer<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt; Tel. <a moz-do-not-send="true"
                  href="tel:%2B41%2091%20910%207690"
                  value="+41919107690">+41 91 910 7690</a><br>
                &gt; &gt; &gt; E-mail:&Acirc; <a moz-do-not-send="true"
                  href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a><br>
                &gt; &gt; &gt; &lt;mailto:<a moz-do-not-send="true"
                  href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>&gt;&Acirc;&nbsp;
                |&Acirc; &Acirc; Web:&Acirc;<br>
                &gt; &gt; &gt; <a moz-do-not-send="true"
                  href="http://www.wcpmediaservices.com" target="_blank">www.wcpmediaservices.com</a>
                &lt;<a moz-do-not-send="true"
                  href="http://www.wcpmediaservices.com" target="_blank">http://www.wcpmediaservices.com</a>&gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt; Europe Office:&Acirc; Via Zurigo 35, 6900
                Lugano, Switzerland<br>
                &gt; &gt; &gt; USA Office:&Acirc; 7083 Hollywood Boulevard Los
                Angeles, CA 90028<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt; On Thu, Aug 21, 2014 at 5:04 PM, John
                Mark Walker &lt;<a moz-do-not-send="true"
                  href="mailto:johnmark@gluster.org">johnmark@gluster.org</a><br>
                &gt; &gt; &gt; &lt;mailto:<a moz-do-not-send="true"
                  href="mailto:johnmark@gluster.org">johnmark@gluster.org</a>&gt;&gt;
                wrote:<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp;Thanks, Giacomo. I'm sending this to
                the gluster-devel list - it's<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp;an interesting question. Basically,
                can we do server-only operations?<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp;-JM<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt;&nbsp;
                ------------------------------------------------------------------------<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Hello,<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I am currently using GlusterFS
                version 3.5 with two bricks. What<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I currently do is mounting the
                whole storage in some Linux<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clients (RedHat) through
                fuse.glusterfs that (I think) uses NFS<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;in the background.<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;What I would like to do is
                copying a file from a directory to<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;another one in the storage in the
                quickest way. Using a "cp<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;file1 file2" from my RedHat
                client is not the best option<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;because the data flows from the
                storage to my RedHat client<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;through the network and then back
                to the storage. I would like<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;instead to avoid this waste of
                time and copy the file directly<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;from the 1st directory to the 2nd
                one. So, in a nutshell, I<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;would like to have file1 -&gt;
                file2&Acirc;&nbsp; , instead of file1 -&gt;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RedHatclient -&gt; file2<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Do you think is it possible, for
                example using libgfapi? Any<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;example to show me?<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Thank you in advance and best
                regards,<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*Giacomo Fazio*<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;IT Engineer<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Tel. +41 91 910 7690
                <a class="moz-txt-link-rfc2396E" href="tel:%2B41%2091%20910%207690">&lt;tel:%2B41%2091%20910%207690&gt;</a><br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;E-mail:&Acirc; <a
                  moz-do-not-send="true"
                  href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a><br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;mailto:<a
                  moz-do-not-send="true"
                  href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>&gt;&Acirc;&nbsp;
                |&Acirc; &Acirc; Web:&Acirc;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a moz-do-not-send="true"
                  href="http://www.wcpmediaservices.com" target="_blank">www.wcpmediaservices.com</a>
                &lt;<a moz-do-not-send="true"
                  href="http://www.wcpmediaservices.com" target="_blank">http://www.wcpmediaservices.com</a>&gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Europe Office:&Acirc; Via Zurigo 35,
                6900 Lugano, Switzerland<br>
                &gt; &gt; &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;USA Office:&Acirc; 7083 Hollywood
                Boulevard Los Angeles, CA 90028<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;<br>
                &gt; &gt; &gt;
                _______________________________________________<br>
                &gt; &gt; &gt; Gluster-devel mailing list<br>
                &gt; &gt; &gt; <a moz-do-not-send="true"
                  href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
                &gt; &gt; &gt; <a moz-do-not-send="true"
                  href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel"
                  target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-devel</a><br>
                &gt; &gt; &gt;<br>
                &gt; &gt;
                _______________________________________________<br>
                &gt; &gt; Gluster-devel mailing list<br>
                &gt; &gt; <a moz-do-not-send="true"
                  href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
                &gt; &gt; <a moz-do-not-send="true"
                  href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel"
                  target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-devel</a><br>
                &gt; &gt;<br>
                <br>
                &gt; _______________________________________________<br>
                &gt; Gluster-devel mailing list<br>
                &gt; <a moz-do-not-send="true"
                  href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel"
                  target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-devel</a><br>
                <br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Gluster-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel">http://supercolony.gluster.org/mailman/listinfo/gluster-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>