Just a thought - linux raid wiki - raid 5 grows getting stuck at 0%
I've just been doing a bit of work on the wiki when I put 2 and 2 together, and hope I haven't made 5 ...
Bitmaps interfere with grow operations, I believe ...
And mdadm has recently been modified so that bitmaps are switched on by default, I also believe ...
Could this be silently blocking the grow, so you don't get any error and it just sits there doing nothing?
But that brings up two points. Should mdadm now explicitly look for a bitmap when growing an array, and warn that the bitmap needs to be disabled? Apparently it currently comes up with some errors that hint at the cause rather than explicitly say so.
And secondly, I'm sure someone sent an email to the list that explained when a bitmap was created. I can't find it in my archives. The man page says it's created if the array is over 100G, but I'm sure the email gave rather more detail than that and that the figure actually varied.
But I'm sure you can see from this that I'm updating this bit of the wiki. Is there anything else I ought to know about bitmaps, so I can document it? :-)
Cheers,
Wol
Quoted 4 lines · Wols Lists
I've just been doing a bit of work on the wiki when I put 2 and 2 together, and hope I haven't made 5 ...
Bitmaps interfere with grow operations, I believe ...
Used to, yes. Don't any more.
Quoted 6 lines
And mdadm has recently been modified so that bitmaps are switched on by default, I also believe ...
Could this be silently blocking the grow, so you don't get any error and it just sits there doing nothing?
Nope. If it was a problem it would explicitly fail.
Quoted 5 lines
But that brings up two points. Should mdadm now explicitly look for a bitmap when growing an array, and warn that the bitmap needs to be disabled? Apparently it currently comes up with some errors that hint at the cause rather than explicitly say so.
If you try to reshape an array which has a bitmap, on a kernel that doesn't support reshaping arrays with bitmaps, mdadm hits this line of code:
if (err == EBUSY &&
(array.state & (1<<MD_SB_BITMAP_PRESENT)))
cont_err("Bitmap must be removed before size can be changed\n");or maybe this one
pr_err("Cannot set array shape for %s\n",
devname);
if (err == EBUSY &&
(info->array.state & (1<<MD_SB_BITMAP_PRESENT)))
cont_err(" Bitmap must be removed before shape can be changed\n");or
if (err == EBUSY &&
(array.state & (1<<MD_SB_BITMAP_PRESENT)))
cont_err("Bitmap must be removed before level can be changed\n");Quoted 5 lines
And secondly, I'm sure someone sent an email to the list that explained when a bitmap was created. I can't find it in my archives. The man page says it's created if the array is over 100G, but I'm sure the email gave rather more detail than that and that the figure actually varied.
if (!s->bitmap_file &&
s->level >= 1 &&
st->ss->add_internal_bitmap &&
(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";
}So it looks like "over 100G" is the only test.
Quoted 4 lines
But I'm sure you can see from this that I'm updating this bit of the wiki. Is there anything else I ought to know about bitmaps, so I can document it? :-)
If only I could run "diff" between my brain and the wiki....
Thanks for doing this!
NeilBrown
Quoted 5 lines · NeilBrown
Quoted 3 lines
Quoted 3 lines
But I'm sure you can see from this that I'm updating this bit of the wiki. Is there anything else I ought to know about bitmaps, so I can document it? :-)
If only I could run "diff" between my brain and the wiki....
:-)
Quoted 4 lines
Thanks for doing this!
NeilBrown
I'll update the wiki in the next day or so.
I'm a bit worried I'll spread myself too thin, but I've been following the threads on the recent patch sets, and I've also picked up on the new Sphinx kernel documentation stuff.
So my aim now is, on top of generally updating the wiki, to link it in to the kernel doc, and update a lot of that doc using re-structured text in the md source files. That's not going to be a problem, I hope?
I'm going to dig and find out more, but if anybody can point me to some kerneldoc code in the md source, and the corresponding links to the doc on the kernel.org website, that'll be wonderful. It'll just give me a leg up on the hardest part - actually getting started.
And if there isn't any at present, it'll just tell me it's needed even more :-)
Cheers,
Wol
Quoted 19 lines · Wols Lists
Quoted 5 lines · NeilBrown
Quoted 3 lines
Quoted 3 lines
But I'm sure you can see from this that I'm updating this bit of the wiki. Is there anything else I ought to know about bitmaps, so I can document it? :-)
If only I could run "diff" between my brain and the wiki....
:-)
Quoted 4 lines
Thanks for doing this!
NeilBrown
I'll update the wiki in the next day or so.
I'm a bit worried I'll spread myself too thin, but I've been following the threads on the recent patch sets, and I've also picked up on the new Sphinx kernel documentation stuff.
Quoted 8 lines
So my aim now is, on top of generally updating the wiki, to link it in to the kernel doc, and update a lot of that doc using re-structured text in the md source files. That's not going to be a problem, I hope?
I'm going to dig and find out more, but if anybody can point me to some kerneldoc code in the md source, and the corresponding links to the doc on the kernel.org website, that'll be wonderful. It'll just give me a leg up on the hardest part - actually getting started.
There is no kerneldoc documentation in md - just a few ad-hoc large comments.
Even Documentation/md.txt isn't in very good shape.
I would be nice to have more documentation, but documentation can so quickly become stale....
Thanks,
NeilBrown
Quoted 6 lines
And if there isn't any at present, it'll just tell me it's needed even more :-)
Cheers,
Wol