Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
mdadm.5365
0198-Create-check-the-node-nums-when-create-clu...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0198-Create-check-the-node-nums-when-create-clustered-rai.patch of Package mdadm.5365
From 82d9485e06b2e2cca70ae340d48749d93df6bad0 Mon Sep 17 00:00:00 2001 From: Guoqing Jiang <gqjiang@suse.com> Date: Wed, 4 May 2016 16:33:43 +0800 Subject: [PATCH 264/359] Create: check the node nums when create clustered raid References: bsc#1081910 It doesn't make sense to create a clustered raid with only 1 node. Reported-by: Zhilong Liu <zlliu@suse.com> Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Coly Li <colyli@suse.de> --- Create.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Create.c b/Create.c index 1e4a6ee..717086b 100644 --- a/Create.c +++ b/Create.c @@ -114,8 +114,13 @@ int Create(struct supertype *st, char *mddev, unsigned long long newsize; int major_num = BITMAP_MAJOR_HI; - if (s->bitmap_file && strcmp(s->bitmap_file, "clustered") == 0) + if (s->bitmap_file && strcmp(s->bitmap_file, "clustered") == 0) { major_num = BITMAP_MAJOR_CLUSTERED; + if (c->nodes <= 1) { + pr_err("At least 2 nodes are needed for cluster-md\n"); + return 1; + } + } memset(&info, 0, sizeof(info)); if (s->level == UnSet && st && st->ss->default_geometry) -- 2.16.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor