[Gluster-users] How to know (IP of GlusterServer) store a File in a GlusterFS System?

Amar Tumballi amar at gluster.com
Thu Jul 15 11:03:42 UTC 2010


Please apply this patch, and you should be able to get info of hostname:

diff --git a/xlators/storage/posix/src/posix.c
b/xlators/storage/posix/src/posix.c
index 0b7ab19..3275542 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3232,9 +3232,9 @@ posix_getxattr (call_frame_t *frame, xlator_t *this,

        if (loc->inode && S_ISREG (loc->inode->st_mode) && name &&
            (strcmp (name, "trusted.glusterfs.location") == 0)) {
-                ret = dict_set_static_ptr (dict,
-                                           "trusted.glusterfs.location",
-                                           priv->hostname);
+                ret = dict_set_str (dict,
+                                    "trusted.glusterfs.location",
+                                    priv->hostname);
                 if (ret < 0) {
                         gf_log (this->name, GF_LOG_WARNING,
                                 "could not set hostname (%s) in
dictionary",

============================================



On Tue, Jul 13, 2010 at 4:31 AM, Jeff Anderson-Lee
<jonah at eecs.berkeley.edu>wrote:

> On 7/9/2010 2:00 AM, Amar Tumballi wrote:
>
>> As of now (in 3.0.x releases) there is no proper solution.. but you can
>> try
>>
>> bash# getfattr -n trusted.glusterfs.location $filename
>>
>> which gives the hostname of the machine which contains it.. (it gives only
>> one output even if you are using 'replicate')
>>
>>
> I tried this and got nothing.  In fact "getfattr -d somefilename" returned
> nothing as well.
>
> Jeff Anderson-Lee
>
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
>


More information about the Gluster-users mailing list