Here's an article explaining how dht works. The hash maps are per-directory.
https://joejulian.name/blog/dht-misses-are-expensive/
On 11/08/2016 11:04 AM, Ankireddypalle Reddy wrote:
Hi,
I am trying to make sense of the hash values that get
assigned/used by DHT.
/brick1/vol and /brick2/vol are the directories that are being
used as bricks in a distributed replicated volume.
[root@glusterhackervm3 glus]# getfattr -n trusted.glusterfs.dht -e
hex /brick1/vol
getfattr: Removing leading '/' from absolute path names
# file: brick1/vol
trusted.glusterfs.dht=0x0000000100000000000000007ffffde1
This means that any file gets hashed to a value from 0x00 to
0x7ffffde1 gets stored on this brick.
[root@glusterhackervm3 glus]# getfattr -n trusted.glusterfs.dht -e
hex /brick2/vol
getfattr: Removing leading '/' from absolute path names
# file: brick2/vol
trusted.glusterfs.dht=0x00000001000000007ffffde2ffffffff
This means that any file that’s hashed to a value from 0x7ffffde2 to
0xffffffff gets stored on this brick.
What is confusing is the dht values that are shown for the directories
inside these brick directories. What do the dht values associated with
the sub directories signify.
[root@glusterhackervm3 glus]# getfattr -n trusted.glusterfs.dht -e
hex /brick2/vol/d/
getfattr: Removing leading '/' from absolute path names
# file: brick2/vol/d/
trusted.glusterfs.dht=0x0000000100000000000000007ffffffe
[root@glusterhackervm3 glus]# getfattr -n trusted.glusterfs.dht -e
hex /brick2/vol/d/e
getfattr: Removing leading '/' from absolute path names
# file: brick2/vol/d/e
trusted.glusterfs.dht=0x0000000100000000000000007ffffffe
[root@glusterhackervm3 glus]# getfattr -n trusted.glusterfs.dht -e
hex /brick2/vol/d/f
getfattr: Removing leading '/' from absolute path names
# file: brick2/vol/d/f
trusted.glusterfs.dht=0x00000001000000007fffffffffffffff
Thanks and Regards,
Ram
***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material
for the
sole use of the intended recipient. Any unauthorized review, use or
distribution
by others is strictly prohibited. If you have received the message by
mistake,
please advise the sender by reply email and delete the message. Thank
you."
**********************************************************************
_______________________________________________
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users
_______________________________________________
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users