Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
mdadm
0006-Create-check-the-node-nums-when-create-clu...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0006-Create-check-the-node-nums-when-create-clustered-rai.patch of Package mdadm
From 9844c8dbbd3176698374c078f79b4af0e837df26 Mon Sep 17 00:00:00 2001 From: Guoqing Jiang <gqjiang@suse.com> Date: Wed, 4 May 2016 15:59:25 +0800 Subject: [PATCH] Create: check the node nums when create clustered raid 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> --- 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.6.2
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