27 lines
907 B
Diff
27 lines
907 B
Diff
|
--- mdadm-2.6.2/Create.c.info 2007-07-03 10:18:38.000000000 -0400
|
||
|
+++ mdadm-2.6.2/Create.c 2007-07-03 11:06:23.000000000 -0400
|
||
|
@@ -81,6 +81,14 @@ int Create(struct supertype *st, char *m
|
||
|
if (vers < 9000) {
|
||
|
fprintf(stderr, Name ": Create requires md driver version 0.90.0 or later\n");
|
||
|
return 1;
|
||
|
+ } else {
|
||
|
+ mdu_array_info_t inf;
|
||
|
+ memset(&inf, 0, sizeof(inf));
|
||
|
+ ioctl(mdfd, GET_ARRAY_INFO, &inf);
|
||
|
+ if (inf.working_disks != 0) {
|
||
|
+ fprintf(stderr, Name ": another array by this name already running.\n");
|
||
|
+ return 1;
|
||
|
+ }
|
||
|
}
|
||
|
if (level == UnSet) {
|
||
|
fprintf(stderr,
|
||
|
@@ -225,7 +233,7 @@ int Create(struct supertype *st, char *m
|
||
|
}
|
||
|
if (st->ss->major != 0 ||
|
||
|
st->minor_version != 90)
|
||
|
- fprintf(stderr, Name ": Defaulting to verion %d.%d metadata\n",
|
||
|
+ fprintf(stderr, Name ": Defaulting to version %d.%d metadata\n",
|
||
|
st->ss->major,
|
||
|
st->minor_version);
|
||
|
}
|