<div dir="ltr"><div><div>Hi there,<br><br></div>Thanks to both Soumya and Prashanth. Actually you are both right. With the approach proposed by Soumya I would avoid the FUSE overhead but, as Prashanth says, the network transfer overhead would be always present. This is particularly important for me because I deal with very big files
 (usually around 100 GB and even more), so that network transfer have a big impact, while I don&#39;t think the impact of the FUSE overhead is that big. <br>That&#39;s why what I would like to get is a &quot;brick to brick&quot; copy (just server side), so I would like to use the APIs to order the server to make a copy, so that the network transfer can be avoided.<br>
<br>As far as I understood, it is not currently possible with libgfapi. Do you think it would be difficult to implement? Are there any other ways?<br></div>Thank you and best regards,<br><div><div><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: <a href="mailto:giacomo.fazio@wcpmediaservices.com" style="color:rgb(227,6,19);text-decoration:none" target="_blank">giacomo.fazio@wcpmediaservices.com</a>  |  Web: <a 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> Via Zurigo 35, 6900 Lugano, Switzerland<br><span style="color:rgb(227,6,19)">USA Office:</span> 7083 Hollywood Boulevard Los Angeles, CA 90028</div><div style="color:rgb(0,0,0);font-family:&#39;Times New Roman&#39;;font-size:medium;line-height:normal;margin-top:10px">
<img 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 9:36 AM, Prashanth Pai <span dir="ltr">&lt;<a href="mailto:ppai@redhat.com" target="_blank">ppai@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi,<br>
<br>
Even with that approach, data would still be read (over the n/w) at the client (the app using libgfapi). I think what he is looking for is a server side copy (brick to brick) or within same brick _without_ the need for data to go through client.<br>

<br>
Swift has this feature[1] and it would be really cool for glusterfs to have it (may be as an external tool or as a API in libgfapi) :)<br>
<br>
# gluster-copy &lt;src&gt; &lt;dest&gt;<br>
or<br>
glfs_copy(src,dest)<br>
<br>
[1] <a 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>
<br>
<br>
<br>
Regards,<br>
 -Prashanth Pai<br>
<div class=""><div class="h5"><br>
----- Original Message -----<br>
From: &quot;Soumya Koduri&quot; &lt;<a href="mailto:skoduri@redhat.com">skoduri@redhat.com</a>&gt;<br>
To: &quot;Giacomo Fazio&quot; &lt;<a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>&gt;, &quot;John Mark Walker&quot; &lt;<a href="mailto:johnmark@gluster.org">johnmark@gluster.org</a>&gt;<br>

Cc: <a href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a>, &quot;Giovanni Contri&quot; &lt;<a href="mailto:giovanni.contri@wcpmediaservices.com">giovanni.contri@wcpmediaservices.com</a>&gt;, <a href="mailto:forge-admin@gluster.org">forge-admin@gluster.org</a><br>

Sent: Friday, August 22, 2014 12:40:01 PM<br>
Subject: Re: [Gluster-devel] Question about file copy through libgfapi<br>
<br>
Hi Giacomo,<br>
<br>
If your requirement is to get away with fuse/protocol clients and do<br>
server-side operations, I think its doable by writing a simple libgfapi<br>
application. But since there is no libgfapi API equivalent to &quot;cp&quot;<br>
command, you may need to implement that functionality using &quot;glfs_open,<br>
glfs_read &amp; glfs_write&quot; APIs.<br>
<br>
Here are the few links which Humble has documented on how to use<br>
libgfapi and different APIs supported by it-<br>
<br>
<a href="http://humblec.com/libgfapi-interface-glusterfs/" target="_blank">http://humblec.com/libgfapi-interface-glusterfs/</a><br>
<a 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>
<br>
<br>
Few sample examples (written in &#39;C&#39; and &#39;python&#39;) are copied to -<br>
<a href="https://github.com/gluster/glusterfs/tree/master/api/examples" target="_blank">https://github.com/gluster/glusterfs/tree/master/api/examples</a><br>
<br>
<br>
Thanks,<br>
Soumya<br>
<br>
<br>
<br>
On 08/21/2014 08:45 PM, Giacomo Fazio wrote:<br>
&gt; Hi John,<br>
&gt;<br>
&gt; Thanks for your quick answer. Do you mean that my question can be<br>
&gt; summarized in &quot;can we do server-only operations?&quot;? Yes, I think so.<br>
&gt; Please let me know as soon as you receive any answer or provide me a<br>
&gt; link where I can follow directly this case.<br>
&gt; Thanks in advance and best regards,<br>
&gt;<br>
&gt; *Giacomo Fazio*<br>
&gt; IT Engineer<br>
&gt;<br>
&gt; Tel. <a href="tel:%2B41%2091%20910%207690" value="+41919107690">+41 91 910 7690</a><br>
&gt; E-mail: <a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a><br>
&gt; &lt;mailto:<a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>&gt;  |  Web:Â<br>
&gt; <a href="http://www.wcpmediaservices.com" target="_blank">www.wcpmediaservices.com</a> &lt;<a href="http://www.wcpmediaservices.com" target="_blank">http://www.wcpmediaservices.com</a>&gt;<br>
&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>
&gt; On Thu, Aug 21, 2014 at 5:04 PM, John Mark Walker &lt;<a href="mailto:johnmark@gluster.org">johnmark@gluster.org</a><br>
&gt; &lt;mailto:<a href="mailto:johnmark@gluster.org">johnmark@gluster.org</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Thanks, Giacomo. I&#39;m sending this to the gluster-devel list - it&#39;s<br>
&gt;     an interesting question. Basically, can we do server-only operations?<br>
&gt;<br>
&gt;     -JM<br>
&gt;<br>
&gt;<br>
&gt;     ------------------------------------------------------------------------<br>
&gt;<br>
&gt;         Hello,<br>
&gt;<br>
&gt;         I am currently using GlusterFS version 3.5 with two bricks. What<br>
&gt;         I currently do is mounting the whole storage in some Linux<br>
&gt;         clients (RedHat) through fuse.glusterfs that (I think) uses NFS<br>
&gt;         in the background.<br>
&gt;         What I would like to do is copying a file from a directory to<br>
&gt;         another one in the storage in the quickest way. Using a &quot;cp<br>
&gt;         file1 file2&quot; from my RedHat client is not the best option<br>
&gt;         because the data flows from the storage to my RedHat client<br>
&gt;         through the network and then back to the storage. I would like<br>
&gt;         instead to avoid this waste of time and copy the file directly<br>
&gt;         from the 1st directory to the 2nd one. So, in a nutshell, I<br>
&gt;         would like to have file1 -&gt; file2  , instead of file1 -&gt;<br>
&gt;         RedHatclient -&gt; file2<br>
&gt;         Do you think is it possible, for example using libgfapi? Any<br>
&gt;         example to show me?<br>
&gt;         Thank you in advance and best regards,<br>
&gt;<br>
&gt;         *Giacomo Fazio*<br>
&gt;         IT Engineer<br>
&gt;<br>
&gt;         Tel. +41 91 910 7690 &lt;tel:%2B41%2091%20910%207690&gt;<br>
&gt;         E-mail: <a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a><br>
&gt;         &lt;mailto:<a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>&gt;  |  Web:Â<br>
&gt;         <a href="http://www.wcpmediaservices.com" target="_blank">www.wcpmediaservices.com</a> &lt;<a href="http://www.wcpmediaservices.com" target="_blank">http://www.wcpmediaservices.com</a>&gt;<br>
&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>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Gluster-devel mailing list<br>
&gt; <a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
&gt; <a href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-devel</a><br>
&gt;<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a href="http://supercolony.gluster.org/mailman/listinfo/gluster-devel" target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-devel</a><br>
</div></div></blockquote></div><br></div></div></div></div></div>