[Gluster-users] About read-subvolume

Chris Jin chris at pikicentral.com
Thu Apr 8 02:07:44 UTC 2010


Thanks for replying so quickly.

Is there a particular reason why lookup(), open(), and close() have to
be sent to all up nodes?

As I can see from the debug information, lookup() is called all the
time, these lookups must be sent to all up nodes. But when I read a
file(e.g./0/0/0/2.html), there are 5 lookups, 1 open, 1 readv, 1 flush.
They should be sent to particular node, if I turned self-healing off. Is
it right?

[2010-04-07 12:22:26] N [trace.c:1289:trace_lookup] trace: 38: (loc
{path=/0/0/0/2.html, ino=0})
[2010-04-07 12:22:26] N [trace.c:590:trace_lookup_cbk] trace: 38:
(op_ret=0, ino=0, *buf {st_ino=24772749, st_mode=100644, st_nlink=1,
st_uid=0, st_gid=0, st_size=5121, st_blocks=24, st_atime=[Apr 07
12:16:55], st_mtime=[Apr 07 11:38:19], st_ctime=[Apr 07 11:38:19]},
*postparent {st_ino=24772749, st_mode=100644, st_nlink=1, st_uid=0,
st_gid=0, st_size=5121, st_blocks=24, st_atime=[Apr 07 12:16:55],
st_mtime=[Apr 07 11:38:19], st_ctime=[Apr 07 11:38:19]}
[2010-04-07 12:22:26] N [trace.c:1289:trace_lookup] trace: 39: (loc
{path=/.htaccess, ino=0})
[2010-04-07 12:22:26] N [trace.c:599:trace_lookup_cbk] trace: 39:
(op_ret=-1, op_errno=2)
[2010-04-07 12:22:26] N [trace.c:1289:trace_lookup] trace: 40: (loc
{path=/0/.htaccess, ino=0})
[2010-04-07 12:22:26] N [trace.c:599:trace_lookup_cbk] trace: 40:
(op_ret=-1, op_errno=2)
[2010-04-07 12:22:26] N [trace.c:1289:trace_lookup] trace: 41: (loc
{path=/0/0/.htaccess, ino=0})
[2010-04-07 12:22:26] N [trace.c:599:trace_lookup_cbk] trace: 41:
(op_ret=-1, op_errno=2)
[2010-04-07 12:22:26] N [trace.c:1289:trace_lookup] trace: 42: (loc
{path=/0/0/0/.htaccess, ino=0})
[2010-04-07 12:22:26] N [trace.c:599:trace_lookup_cbk] trace: 42:
(op_ret=-1, op_errno=2)
[2010-04-07 12:22:26] N [trace.c:1587:trace_open] trace: 43: (loc
{path=/0/0/0/2.html, ino=24772749}, flags=32768, fd=0x7fa5f4004c90,
wbflags=0)
[2010-04-07 12:22:26] N [trace.c:142:trace_open_cbk] trace: 43:
(op_ret=0, op_errno=0, *fd=0x7fa5f4004c90)
[2010-04-07 12:22:26] N [trace.c:1623:trace_readv] trace: 44:
(*fd=0x7fa5f4004c90, size=8192, offset=0)
[2010-04-07 12:22:26] N [trace.c:211:trace_readv_cbk] trace: 44:
(op_ret=5121, *buf {st_dev=5454681080932077908, st_ino=24772749,
st_mode=100644, st_nlink=1, st_uid=0, st_gid=0, st_rdev=0, st_size=5121,
st_blksize=4096, st_blocks=24, st_atime=[Apr 07 12:16:55], st_mtime=[Apr
07 11:38:19], st_ctime=[Apr 07 11:38:19]})
[2010-04-07 12:22:26] N [trace.c:1677:trace_flush] trace: 45:
(*fd=0x7fa5f4004c90)
[2010-04-07 12:22:26] N [trace.c:793:trace_flush_cbk] trace: 45:
(op_ret=0, op_errno=-1)

On Wed, 2010-04-07 at 17:05 -0700, Vikas Gorur wrote:
> On Apr 7, 2010, at 4:55 PM, Chris Jin wrote:
> 
> > Hi, I got a question about read-subvolume.
> > 
> > Actually I want to do an replicate translator across two servers, but
> > only read from the local server using read-subvolume option. I turned
> > off self-healing because I want to do self-healing manually. When I
> > limited the bandwidth between the client and the other server, the
> > reading was really slow, but what I expected is the client only contacts
> > the local server.
> > 
> > After searching on the internet, I found that we must suffer the latency
> > of checking the metadata on both servers, even when we only need to read
> > from one server.
> > 
> > So my question is if there is a way to stop checking the metadata on
> > both servers when reading only one server.
> 
> With read-subvolume set, readv() is sent only to the specified subvolume.
> However, lookup(), open(), and close() have to go to both subvolumes. There is no way
> to disable this.
> 
> ------------------------------
> Vikas Gorur
> Engineer - Gluster, Inc.
> +1 (408) 770 1894
> ------------------------------
> 
> 
> 
> 
> 
> 
> 
> 




More information about the Gluster-users mailing list