<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    When you perform a tier-attach, why are the bricks attached in the
    reverse order? <br>
    <br>
    For example:<br>
    ----------------------------<br>
    <tt>#gluster v create testvol  replica 3
      127.0.0.2:/home/ravi/bricks/brick{1..3} force</tt><tt><br>
    </tt><tt>#gluster volume tier testvol attach replica 3
      127.0.0.2:/home/ravi/bricks/brick{4..9}</tt><tt><br>
    </tt><tt>#gluster v info</tt><tt><br>
    </tt><tt><br>
    </tt><tt>Volume Name: testvol</tt><tt><br>
    </tt><tt>Type: Tier</tt><tt><br>
    </tt><tt>Volume ID: 2400b2d7-9f66-4e98-9357-f80baf282853</tt><tt><br>
    </tt><tt>Status: Created</tt><tt><br>
    </tt><tt>Number of Bricks: 9</tt><tt><br>
    </tt><tt>Transport-type: tcp</tt><tt><br>
    </tt><tt>Hot Tier :</tt><tt><br>
    </tt><tt>Hot Tier Type : Distributed-Replicate</tt><tt><br>
    </tt><tt>Number of Bricks: 2 x 3 = 6</tt><tt><br>
    </tt><tt>Brick1: 127.0.0.2:/home/ravi/bricks/brick9</tt><tt><br>
    </tt><tt>Brick2: 127.0.0.2:/home/ravi/bricks/brick8</tt><tt><br>
    </tt><tt>Brick3: 127.0.0.2:/home/ravi/bricks/brick7</tt><tt><br>
    </tt><tt>Brick4: 127.0.0.2:/home/ravi/bricks/brick6</tt><tt><br>
    </tt><tt>Brick5: 127.0.0.2:/home/ravi/bricks/brick5</tt><tt><br>
    </tt><tt>Brick6: 127.0.0.2:/home/ravi/bricks/brick4</tt><tt><br>
    </tt><tt>Cold Tier:</tt><tt><br>
    </tt><tt>Cold Tier Type : Replicate</tt><tt><br>
    </tt><tt>Number of Bricks: 1 x 3 = 3</tt><tt><br>
    </tt><tt>Brick7: 127.0.0.2:/home/ravi/bricks/brick1</tt><tt><br>
    </tt><tt>Brick8: 127.0.0.2:/home/ravi/bricks/brick2</tt><tt><br>
    </tt><tt>Brick9: 127.0.0.2:/home/ravi/bricks/brick3</tt><tt><br>
    </tt><tt>Options Reconfigured:</tt><tt><br>
    </tt><tt>cluster.tier-mode: cache</tt><tt><br>
    </tt><tt>features.ctr-enabled: on</tt><tt><br>
    </tt><tt>performance.readdir-ahead: on</tt><br>
    ----------------------------<br>
    <br>
    Because it is this way, there is a lot of code written in cli and
    glusterd to handle this reverse order. It is rather
    counter-intuitive that when you do a `list_for_each_entry
    (brickinfo, &amp;volinfo-&gt;bricks, brick_list)`, you get
    brick9..brick4 (in reverse order) and then brick1..brick3 in the
    forward order. <br>
    <br>
    For arbiter volumes the 3rd brick of a 3 way replica is the arbiter
    (for eg, in {b1,b2, b3} , b3 is arbiter). In the above example, if
    we were to support an arbiter volume as hot-tier, b7 and b4 would be
    the arbiter bricks, instead of the intuitive b6 and b9. Of course we
    could always code it to whatever we want, but my real question boils
    down to <br>
    <br>
    1) Is there is a compelling reason as to why the bricks of hot-tier
    are in the reverse order ?<br>
    2) If there isn't one, should we spend time to fix it so that the
    bricks appear in the order in which they were given at the time of
    volume creaction/ attach-tier  <b>OR</b>  just continue with the
    way things are currently because it is not that much of an issue? <br>
    <br>
    Thanks,<br>
    Ravi<br>
  </body>
</html>