diff options
author | Paul Clements <paul.clements@steeleye.com> | 2009-02-11 13:49:26 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-04-21 15:36:13 +1000 |
commit | 25affb56b921041794abfb0774b615476d6ddb11 (patch) | |
tree | f9ed6f0522ef59a5eda668d0e22e09442a417428 /mdadm.c | |
parent | 388953d27c20476f84ca71546d6fd357e0230e25 (diff) | |
download | mdadm-25affb56b921041794abfb0774b615476d6ddb11.tar.gz |
mdadm: allow build to use --size
This patch enables the --size parameter for build operations.
Without this, if you have a raid1, for instance, where the 2 disks are
not the exact same size, and you need to build the array but one of the
disks is not available right at the moment (maybe it's USB and it's
unplugged, or maybe it's a network disk and it's unavailable), then you
have to play some weird games to get the array to size correctly (that
is, to the size of the smaller of the two components or less).
There may be other uses for this too...
--
Paul
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -367,7 +367,8 @@ int main(int argc, char *argv[]) case O(GROW,'z'): - case O(CREATE,'z'): /* size */ + case O(CREATE,'z'): + case O(BUILD,'z'): /* size */ if (size >= 0) { fprintf(stderr, Name ": size may only be specified once. " "Second value is %s.\n", optarg); @@ -1161,7 +1162,8 @@ int main(int argc, char *argv[]) } rv = Build(devlist->devname, mdfd, chunk, level, layout, raiddisks, devlist->next, assume_clean, - bitmap_file, bitmap_chunk, write_behind, delay, verbose-quiet); + bitmap_file, bitmap_chunk, write_behind, delay, + verbose-quiet, size); break; case CREATE: if (delay == 0) delay = DEFAULT_BITMAP_DELAY; |