[Gluster-users] "prefer local node for reads" - is there such a setting?

Tomasz Chmielewski mangoo at wpkg.org
Mon Nov 14 07:26:50 UTC 2011


I have a gluster volume which consists of 5 peers (called gl1 - gl5).
Only 2 of the peers are bricks, i.e. they store data in replicate/mirror 
mode; 3 peers only access data from the two bricks. All use glusterfs 3.2.4.

Every peer mounts gluster using this /etc/fstab entry:

localhost:/shared /shared glusterfs defaults,_netdev 0 0


Unfortunately, what happens, is that all peers, including the brick 
keeping the data, read files from one brick only: gl1.
Is there a way to specify which brick should be preferred for reads?

In my opinion, it doesn't make much sense if "gl5" brick reads files 
from "gl1" brick: "gl5" has these files locally already.

Also, I don't like the situation that all other bricks seem to read data 
only from "gl1", but they almost never read anything from "gl5".


root at gl1:~# gluster volume info

Volume Name: shared
Type: Replicate
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: gl1:/data/gluster
Brick2: gl5:/data/gluster
Options Reconfigured:
performance.cache-refresh-timeout: 60
performance.cache-size: 2048MB
performance.write-behind-window-size: 128MB
performance.io-thread-count: 32
performance.flush-behind: on
nfs.disable: on
auth.allow: 192.168.*,127.*



root at gl1:~# gluster peer status
Number of Peers: 4

Hostname: gl2
Uuid: 73cb951a-39f8-4876-82f0-cc9e26462d89
State: Peer in Cluster (Connected)

Hostname: gl3
Uuid: 09c1fdd5-cdbc-4174-9dcb-7785546bff5d
State: Peer in Cluster (Connected)

Hostname: gl4
Uuid: f5bf2828-c673-4d6c-8622-c7586d539ead
State: Peer in Cluster (Connected)

Hostname: gl5
Uuid: 8c8d980f-15f2-4345-90f2-f75365bf9812
State: Peer in Cluster (Connected)



-- 
Tomasz Chmielewski
http://wpkg.org



More information about the Gluster-users mailing list