2011/6/20 Jeff Darcy <span dir="ltr">&lt;<a href="mailto:jdarcy@redhat.com">jdarcy@redhat.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt; server1:bigdisk,server1:smalldisk,server2:bigdisk,server2:smalldisk<br><br>
</div>Are you sure? [...]<br></blockquote><div><br></div><div>Nope, sorry, my bad :) I wrote that from memory. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">There is kind of a way to do this, but it&#39;s distinctly non-kosher so I</div>
have to slap a big planet-sized &quot;caveat emptor&quot; on it.  As is explained<br>
in an article I wrote a while ago<br>
(<a href="http://cloudfs.org/2011/04/glusterfs-extended-attributes/" target="_blank">http://cloudfs.org/2011/04/glusterfs-extended-attributes/</a>) the &quot;layout<br>
map&quot; that controls placement of files within a directory is actually<br>
stored in an extended attribute on each copy of that directory (one copy<br>
per brick).  Therefore, by manipulating these extended attributes from<br>
the command line you could affect placement of files in any number of<br>
ways including the way you mention.  In that case, you would set the<br>
xattrs on each server to &quot;claim&quot; hash ranges (see the article) as follows:<br>
<br>
        bigdisk/bigdir     - 0x00000000 to 0xfffffffe<br>
        bigdisk/smalldir   - 0xffffffff to 0xffffffff<br>
        smalldisk/bigdir   - 0xffffffff to 0xffffffff<br>
        smalldisk/smalldir - 0x00000000 to 0xfffffffe<br>[...]</blockquote><div><br></div><div>This is extremely valuable information, thank you for that. It won&#39;t fix my problem (for the reasons you mention below), but it is a very handy way to &quot;mark&quot; temporary directories and such during maintenance. Very good.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> After doing<br>
this, &quot;gluster volume rebalance xxx migrate-data start&quot; should cause<br>
files to be migrated to the &quot;correct&quot; locations, but with two major caveats.<br>
<br>
(1) A subsequent &quot;gluster volume rebalance xxx fix-layout start&quot; will<br>
undo your careful xattr-twiddling, so that files will no longer be<br>
placed the way you intended.<br>
<br>
(2) These values are not inherited by subdirectories (that would be a<br>
very good subject for an enhancement request) so the careful placement<br>
would only apply to the top-level directories.</blockquote><div><br></div><div>Yeah, no, seems like I won&#39;t go there. But being able to choose from different layout strategies per directory in the future ... that would be sweet.</div>
<div><br></div><div>Again, thanks a bunch for the above information,</div><div>Philip</div></div>