[Gluster-devel] EHT / DHT

Jan H Holtzhausen janh at holtztech.info
Tue Nov 25 20:00:00 UTC 2014


Hmm
Then something is wrong, 
If I upload 2 identical files, with different paths they only end up on 
the same server 1/4 of the time (I have 4 bricks).
I’ll test the regex quickly.

BR
Jan




On 2014/11/25, 7:55 PM, "Shyam" <srangana at redhat.com> wrote:

>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 at holtztech.info 
>><mailto:janh at holtztech.info>>
>> Date: Tuesday 25 November 2014 at 9:06 PM
>> To: <gluster-devel at gluster.org <mailto:gluster-devel at gluster.org>>
>> Subject: Re: [Gluster-devel] 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 at gluster.org
>http://supercolony.gluster.org/mailman/listinfo/gluster-devel



More information about the Gluster-devel mailing list