<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't think the impact of the FUSE overhead is that big. <br>That's why what I would like to get is a "brick to brick" 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:'Times New Roman';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"><<a href="mailto:ppai@redhat.com" target="_blank">ppai@redhat.com</a>></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 <src> <dest><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: "Soumya Koduri" <<a href="mailto:skoduri@redhat.com">skoduri@redhat.com</a>><br>
To: "Giacomo Fazio" <<a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>>, "John Mark Walker" <<a href="mailto:johnmark@gluster.org">johnmark@gluster.org</a>><br>
Cc: <a href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a>, "Giovanni Contri" <<a href="mailto:giovanni.contri@wcpmediaservices.com">giovanni.contri@wcpmediaservices.com</a>>, <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 "cp"<br>
command, you may need to implement that functionality using "glfs_open,<br>
glfs_read & glfs_write" 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 'C' and 'python') 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>
> Hi John,<br>
><br>
> Thanks for your quick answer. Do you mean that my question can be<br>
> summarized in "can we do server-only operations?"? Yes, I think so.<br>
> Please let me know as soon as you receive any answer or provide me a<br>
> link where I can follow directly this case.<br>
> Thanks in advance and best regards,<br>
><br>
> *Giacomo Fazio*<br>
> IT Engineer<br>
><br>
> Tel. <a href="tel:%2B41%2091%20910%207690" value="+41919107690">+41 91 910 7690</a><br>
> E-mail:Â <a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a><br>
> <mailto:<a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>>Â |Â Â Web:Â<br>
> <a href="http://www.wcpmediaservices.com" target="_blank">www.wcpmediaservices.com</a> <<a href="http://www.wcpmediaservices.com" target="_blank">http://www.wcpmediaservices.com</a>><br>
><br>
> Europe Office:Â Via Zurigo 35, 6900 Lugano, Switzerland<br>
> USA Office:Â 7083 Hollywood Boulevard Los Angeles, CA 90028<br>
><br>
><br>
> On Thu, Aug 21, 2014 at 5:04 PM, John Mark Walker <<a href="mailto:johnmark@gluster.org">johnmark@gluster.org</a><br>
> <mailto:<a href="mailto:johnmark@gluster.org">johnmark@gluster.org</a>>> wrote:<br>
><br>
> Thanks, Giacomo. I'm sending this to the gluster-devel list - it's<br>
> an interesting question. Basically, can we do server-only operations?<br>
><br>
> -JM<br>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> Hello,<br>
><br>
> I am currently using GlusterFS version 3.5 with two bricks. What<br>
> I currently do is mounting the whole storage in some Linux<br>
> clients (RedHat) through fuse.glusterfs that (I think) uses NFS<br>
> in the background.<br>
> What I would like to do is copying a file from a directory to<br>
> another one in the storage in the quickest way. Using a "cp<br>
> file1 file2" from my RedHat client is not the best option<br>
> because the data flows from the storage to my RedHat client<br>
> through the network and then back to the storage. I would like<br>
> instead to avoid this waste of time and copy the file directly<br>
> from the 1st directory to the 2nd one. So, in a nutshell, I<br>
> would like to have file1 -> file2Â , instead of file1 -><br>
> RedHatclient -> file2<br>
> Do you think is it possible, for example using libgfapi? Any<br>
> example to show me?<br>
> Thank you in advance and best regards,<br>
><br>
> *Giacomo Fazio*<br>
> IT Engineer<br>
><br>
> Tel. +41 91 910 7690 <tel:%2B41%2091%20910%207690><br>
> E-mail:Â <a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a><br>
> <mailto:<a href="mailto:giacomo.fazio@wcpmediaservices.com">giacomo.fazio@wcpmediaservices.com</a>>Â |Â Â Web:Â<br>
> <a href="http://www.wcpmediaservices.com" target="_blank">www.wcpmediaservices.com</a> <<a href="http://www.wcpmediaservices.com" target="_blank">http://www.wcpmediaservices.com</a>><br>
><br>
> Europe Office:Â Via Zurigo 35, 6900 Lugano, Switzerland<br>
> USA Office:Â 7083 Hollywood Boulevard Los Angeles, CA 90028<br>
><br>
><br>
><br>
><br>
><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>
><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>