Re: EHT / DHT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/25/2014 02:28 PM, Jan H Holtzhausen wrote:
I think I have it.
Unless I’m totally confused, I can hash ONLY on the filename with:

glusterfs --volfile-server=a_server --volfile-id=a_volume \
    --xlator-option a_volume-dht.extra_hash_regex='.*[/\\\\]' \
    /a/mountpoint

Correct?

The hash of a file does not include the full path, it is on the file name _only_. So any regex will not work when the filename remains constant like "myfile".

As Jeff explains the option is really to prevent using temporary parts of the name in the hash computation (for rename optimization). In this case, you do not seem to have any tmp parts to the name, like "myfile" and "myfile~" should evaluate to the same hash, so remove all trailing '~' from the name.

So I am not sure the above is the option you are looking for.


Jan

From: Jan H Holtzhausen <janh@xxxxxxxxxxxxxx <mailto:janh@xxxxxxxxxxxxxx>>
Date: Tuesday 25 November 2014 at 9:06 PM
To: <gluster-devel@xxxxxxxxxxx <mailto:gluster-devel@xxxxxxxxxxx>>
Subject: Re:  EHT / DHT

Are you referring to something else in your request? Meaning, you want

/myfile, /dir1/myfile and /dir2/dir3/myfile to fall onto the same

bricks/subvolumes and that perchance is what you are looking for?


That is EXACTLY whatI  am looking for.

What are my chances?

As far as I know not much out of the box. As Jeff explained, the directory distribution/layout considers the GFID of the directory, hence each of the directories in the above example would/could get different ranges.

The file on the other hand remains constant "myfile" so its hash value remains the same, but due to the distribution range change as above for the directories, it will land on different bricks and not the same one.

Out of curiosity, why is this functionality needed?

Shyam
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://supercolony.gluster.org/mailman/listinfo/gluster-devel





[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux