Red Hat Bugzilla – Bug 765037
enable changing of volume type after its creation
Last modified: 2013-12-18 19:06:37 EST
ie, if volume is created with plain distribute, and user want to make it a 'replciate' type volume with 2 copies.
Or if a volume has replica 2 as the setup, enable it to change to 'replica 3' during run time.
same with stripe.
also enable reducing the replica count.
Just for future reference:
Anand Avati: writing a generic balanced tree check is quite easy and elegant
you have to do two checks
1. depth of tree taking any path is the same
2. width of tree at any depth is the same
both these checks can be implemented without awareness of dht/afr/stripe so, build graph from existing volfile
prune out leaves based on the list of bricks to be removed normalize the graph (i.e, if a node has 0 subvolumes, take out that node - recursively upwards)
then check two constraints
1. graph is balanced
2. stripe degree has not decreased
this function will be so generic that tomorrow even if we re-architect volgen to cascade cluster xlators differently (says, stripe over afr over dht) even then it will work fine
3. if distributed degree is getting decreased, then unless it is a commit op, mark as decommissioned subvol
all these can be done very generically
CHANGE: http://review.gluster.com/158 (with this patch, one can do all the below operations:) merged in master by Vijay Bellur (firstname.lastname@example.org)
This feature is not going to be backported to release-3.2 version, and hence resolving this bug