> I have a two node cluster, with two bricks replicated, one on each node.
> Lets say one of the node dies and is unreachable.
If you have the disk from the dead node, then all have to do is plug
it in new system and start running following commands.
gluster volume replace-brick <volname> <old-brick> <new-brick>
start
gluster volume replace-brick <volname> <old-brick> <new-brick>
commit
You don't have to migrate the data, this works as expected.
Since you have a replicate you wouldn't see a downtime, but mind you
self-heal will kick in as of 3.2 it will be blocking, wait for 3.3 you
have non-blocking self-healing capabilities.
> I want to be able to spin a new node and replace the dead node's brick
to a location on the new node.
This is out of Gluster's hand, if you already have mechanisms to
decommission a brick and reattach it on new node then above steps are
fairly simple.
Go ahead and try it, it should work.
-Harsha