diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2015-06-10 07:42:12 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-06-17 01:43:31 +0200 |
commit | 7e6e839a265190e15742c4ecdd050aa1d9f208c6 (patch) | |
tree | ee0e037be5a8faec38f9163e1f67b56b8bb8fe1b /mdadm.c | |
parent | mdadm: add the ability to change cluster name (diff) | |
download | mdadm-7e6e839a265190e15742c4ecdd050aa1d9f208c6.tar.xz mdadm-7e6e839a265190e15742c4ecdd050aa1d9f208c6.zip |
mdadm: change the num of cluster node
This extends nodes option for assemble mode, make the num of
cluster node could be change by user.
Before that, it is necessary to ensure there are enough space
for those nodes, calc_bitmap_size is introduced to calculate
the bitmap size of each node.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -589,6 +589,7 @@ int main(int argc, char *argv[]) } ident.raid_disks = s.raiddisks; continue; + case O(ASSEMBLE, Nodes): case O(CREATE, Nodes): c.nodes = parse_num(optarg); if (c.nodes <= 0) { @@ -744,6 +745,8 @@ int main(int argc, char *argv[]) continue; if (strcmp(c.update, "home-cluster")==0) continue; + if (strcmp(c.update, "nodes")==0) + continue; if (strcmp(c.update, "devicesize")==0) continue; if (strcmp(c.update, "no-bitmap")==0) @@ -782,7 +785,7 @@ int main(int argc, char *argv[]) Name, c.update); } fprintf(outf, "Valid --update options are:\n" - " 'sparc2.2', 'super-minor', 'uuid', 'name', 'resync',\n" + " 'sparc2.2', 'super-minor', 'uuid', 'name', 'nodes', 'resync',\n" " 'summaries', 'homehost', 'home-cluster', 'byteorder', 'devicesize',\n" " 'no-bitmap', 'metadata', 'revert-reshape'\n" " 'bbl', 'no-bbl'\n" |