[sheepdog] sheepdog replica number question

Ruoyu liangry at ucweb.com
Mon May 5 08:44:24 CEST 2014


I think the user wants to change the existing replica number of cluster 
or vdi.

We also got the requirement and already achieved it. Currently, only 
changing replica number is permitted. Changing erasure code is not 
implemented.

Some examples are as below.

$ dog cluster copies 2
     __
    ()'`;
    /\|`  Caution! Changing the # of replica will affect
   /  |   all the VDIs to be created later.
(/_)_|_  Are you sure you want to continue? [yes/no]: yes
set the cluster's replica success.

$ dog cluster info -s
Cluster status: running, auto-recovery enabled
Cluster store: plain with 2 redundancy policy

Cluster created at Mon May  5 14:28:02 2014

Epoch Time           Version
2014-05-05 14:28:02      1 [127.0.0.1:7000, 127.0.0.1:7001, 127.0.0.1:7002]

$ dog vdi copies test 3
     __
    ()'`;
    /\|`  Caution! Changing the # of replica will affect
   /  |   the specified VDI and trigger recovery.
(/_)_|_  Are you sure you want to continue? [yes/no]: yes
set the vdi's replica success.

$ dog vdi list
   Name        Id    Size    Used  Shared    Creation time   VDI id 
Copies  Tag
   test         0   12 MB   12 MB  0.0 MB 2014-05-05 14:29 7c2b25      3

I think this feature sometimes is useful. If you think it is worth to do 
it, I am glad to contribute the patch.

>> hello, I have deployed sheepdog for test, and I format the cluster with 3 replica,but if I want to change the replica number of cluster or VDI, how to change it ? thank you.
> You can create a vdi with whatever copies you want as following:
>
> dog vdi create -c x your_vdi 100G
>
> Sheepdog support different copies per vdi for a single cluster.
>
> Thanks
> Yuan
>




More information about the sheepdog mailing list