# Re: \[PATCH 0/2\] Check node nums for cluster raid

- List: linux-raid
- 3 messages, 3 authors
- Page: https://ratatoskr.run/linux-raid/2016/05/6632011/t

## Re: \[PATCH 0/2\] Check node nums for cluster raid

- From: Jes Sorensen \<hidden\>
- Date: 2016-05-04 15:12:20 
- Message: https://ratatoskr.run/linux-raid/2016/05/6632011.md

```text
Guoqing Jiang [ref] writes:
> For cluster raid, we do need at least two nodes for it,
> the two patches add the checks before create and change
> bitmap.
>
> Thanks,
> Guoqing    
>
> Guoqing Jiang (2):
>   Create: check the node nums when create clustered raid
>   super1: don't update node nums if it is not more than 1
>
>  Create.c | 7 ++++++-
>  super1.c | 5 +++++
>  2 files changed, 11 insertions(+), 1 deletion(-)

Hi Guoqing,

I am a little confused on this one - albeit I haven't looked at it in
detail. Why should it not be possible to start a cluster with one node?
In theory you should be able to do that, and then add nodes later?

Cheers,
Jes
```

## Re: \[PATCH 0/2\] Check node nums for cluster raid

- From: Doug Ledford \<hidden\>
- Date: 2016-05-04 15:19:17 
- Message: https://ratatoskr.run/linux-raid/2016/05/6632012.md

```text
On 05/04/2016 11:12 AM, Jes Sorensen wrote:
> Guoqing Jiang [ref] writes:
>> For cluster raid, we do need at least two nodes for it,
>> the two patches add the checks before create and change
>> bitmap.
>>
>> Thanks,
>> Guoqing    
>>
>> Guoqing Jiang (2):
>>   Create: check the node nums when create clustered raid
>>   super1: don't update node nums if it is not more than 1
>>
>>  Create.c | 7 ++++++-
>>  super1.c | 5 +++++
>>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> Hi Guoqing,
> 
> I am a little confused on this one - albeit I haven't looked at it in
> detail. Why should it not be possible to start a cluster with one node?
> In theory you should be able to do that, and then add nodes later?

Not typically.  A single node of a cluster is likely the odd man out, so
starting it and allowing changes to the underlying device has a high
potential of creating split brain issues.  For that reason, most cluster
setups require some minimum (usually 2) for a quorum before they will
start.  Otherwise, given a three node cluster, you could end up with
three separate live filesystems and the need to merge changes between
them to bring the cluster back into sync.


-- 
Doug Ledford [ref]
              GPG KeyID: 0E572FDD


```

## Re: \[PATCH 0/2\] Check node nums for cluster raid

- From: Guoqing Jiang \<hidden\>
- Date: 2016-05-05 03:03:11 
- Message: https://ratatoskr.run/linux-raid/2016/05/6632015.md

```text
Hi Jes,

On 05/04/2016 11:12 AM, Jes Sorensen wrote:
> Guoqing Jiang [ref] writes:
>> For cluster raid, we do need at least two nodes for it,
>> the two patches add the checks before create and change
>> bitmap.
>>
>> Thanks,
>> Guoqing
>>
>> Guoqing Jiang (2):
>>    Create: check the node nums when create clustered raid
>>    super1: don't update node nums if it is not more than 1
>>
>>   Create.c | 7 ++++++-
>>   super1.c | 5 +++++
>>   2 files changed, 11 insertions(+), 1 deletion(-)
> Hi Guoqing,
>
> I am a little confused on this one - albeit I haven't looked at it in
> detail. Why should it not be possible to start a cluster with one node?
> In theory you should be able to do that, and then add nodes later?

The "nodes" means how many nodes could run with the clustered raid.
IOW, if nodes is set to 1, then we can't assemble the clustered raid in
node B after clustered raid is created in node A.

And we had provided below protection in md-cluster.c, so it doesn't make
sense to create clustered raid with "nodes = 1" since we can't use this raid
across cluster.

f (nodes < cinfo->slot_number) {
                pr_err("md-cluster: Slot allotted(%d) is greater than available slots(%d).",
                        cinfo->slot_number, nodes);
                ret = -ERANGE;
                goto err;
}

Regards,
Guoqing
```
