[Gluster-users] Fwd: how debuge dht translator?

Mohammed Rafi K C rkavunga at redhat.com
Wed Feb 22 13:09:38 UTC 2017

On 02/22/2017 05:16 PM, Tahereh Fattahi wrote:
> Hello
> I want to undrestand the operation of dht translator, then i decide to
> debug the code for this aim.
> But i can not do that:(
> I think i should run gdb in client side, but how? I can not mount the
> file system for client from gdb. And if I mount seperately, I can not
> run any glusterfs within gdb
1) Install debuginfo if you are using rpm, if you are using source code
then configure with --enable-debig.
2) Do a fuse mount from client (mount -t glusterfs
server_hostname:/volname /mount_point)
3) find the pidof the mount process (you can grep for glusterfs or with
you volname)
4) Attach gdb to the client process using gdb -p <pidof glusterfs>
5) put your break points in dht functions and then you are good to go :)

Rafi KC

> Is there any way to not using gdb and debug with printf (Iknow it is
> very stupid but is easy) and see the serult in the terminal? 
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://lists.gluster.org/mailman/listinfo/gluster-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20170222/ffa05c28/attachment.html>

More information about the Gluster-users mailing list