[Gluster-users] convert one-brick volume to replicated volume by adding brick?

Alexis Huxley alexishuxley at gmail.com
Mon Jun 20 13:45:44 UTC 2016


In order to migrate from my current DRBD+OCFS2 2-node setup to a 2-node
GlusterFS setup, I would need to do the following:

* extract one node from my old DRBD+OCFS2 cluster (easy)
* reinstall it as as a new single-brick-based GlusterFS storage server (easy)
* rsync data from my old (now one-legged) DRBD+OCFS2 storage to new Gluster storage server (easy)
* reinstall second node from DRBD+OCFS2 cluster as a Gluster replica

I see contradictory postings regarding the possibility of adding
a replica (some links below). What I've tried is this:

	#  on fiori2, the first GlusterFS node:
	mkdir /vol/brick0/vmimages
	gluster volume create vmimages fiori2:/vol/brick0/vmimages
	gluster volume start vmimages
	mount fiori2:/vol/brick0/vmimages /mnt
	rsync -a <my-old-drbd+ocfs2-cluster-remaining-node>:/.../ /mnt/
	
	# still on fiori2, try to add the second node's brick to the volume:
	gluster peer probe torchio2
	gluster volume add-brick vmimages replica 2 torchio2:/vol/brick0/vmimages
	
This reports success, but I see no evidence of success; I expected
to see a synchronisation process started, but this doesn't happen. 
Attempts to rebalance, just tell me it is not a distributed volume
(correct, it's meant to replicated, but not distributed).

I also tried creating the volume specifying that there are (meant to
be) two replicas, but providing the name of only one of them:

	gluster volume create vmimages replica 2 fiori2:/vol/brick0/vmimages

but this also failed, telling me I needed to specify more bricks.

So my questions are:

Is it possible to increase the number of replicas after the volume
has been initialised? If yes, then how? Link please. Many thanks!

Alexis

PS Links:

https://github.com/matiu2/rackspace-articles/blob/master/glusterfs/how-to-add-and-remove-a-node.md (right at the bottom)
http://servertopic.com/topic/xA0e-glusterfs-how-to-add-replica-brick-to-system (right at the bottom)
http://prefetch.net/blog/index.php/2011/11/27/some-interesting-insights-on-the-gluster-replicated-volume-replica-value/ 
https://www.gluster.org/pipermail/gluster-users/2011-March/006905.html (says you can't)


More information about the Gluster-users mailing list