goto abort;
}
+ if (s->bitmap_file && strcmp(s->bitmap_file, "none") == 0)
+ s->bitmap_file = NULL;
if (s->bitmap_file && s->level <= 0) {
pr_err("bitmaps not meaningful with level %s\n",
map_num(pers, s->level)?:"given");
pr_err("size set to %lluK\n", s->size);
}
}
+
+ if (!s->bitmap_file &&
+ s->level >= 1 &&
+ (s->write_behind || s->size > 100*1024*1024ULL)) {
+ if (c->verbose > 0)
+ pr_err("automatically enabling write-intent bitmap on large array\n");
+ s->bitmap_file = "internal";
+ }
+ if (s->bitmap_file && strcmp(s->bitmap_file, "none") == 0)
+ s->bitmap_file = NULL;
+
if (!have_container && s->level > 0 && ((maxsize-s->size)*100 > maxsize)) {
if (c->runstop != 1 || c->verbose >= 0)
pr_err("largest drive (%s) exceeds size (%lluK) by more than 1%%\n",
Note: external bitmaps are only known to work on ext2 and ext3.
Storing bitmap files on other filesystems may result in serious problems.
+When creating an array on devices which are 100G or larger,
+.I mdadm
+automatically adds an internal bitmap as it will usually be
+beneficial. This can be suppressed with
+.B "\-\-bitmap=none".
+
.TP
.BR \-\-bitmap\-chunk=
Set the chunksize of the bitmap. Each bit corresponds to that many
.\".B \-\-size
.\"is given, the apparent size of the smallest drive given is used.
+If the array type supports a write-intent bitmap, and if the devices
+in the array exceed 100G is size, an internal write-intent bitmap
+will automatically be added unless some other option is explicitly
+requested with the
+.B \-\-bitmap
+option. In any case space for a bitmap will be reserved so that one
+can be added layer with
+.BR "\-\-grow \-\-bitmap=internal" .
+
If the metadata type supports it (currently only 1.x metadata), space
will be allocated to store a bad block list. This allows a modest
number of bad blocks to be recorded, allowing the drive to remain in
case O(BUILD,Bitmap):
case O(CREATE,'b'):
case O(CREATE,Bitmap): /* here we create the bitmap */
- if (strcmp(optarg, "none") == 0) {
- pr_err("'--bitmap none' only"
- " supported for --grow\n");
- exit(2);
- }
- /* FALL THROUGH */
case O(GROW,'b'):
case O(GROW,Bitmap):
if (strcmp(optarg, "internal")== 0 ||