linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Just a thought - linux raid wiki - raid 5 grows getting stuck at 0%
@ 2016-11-16 23:51 Wols Lists
  2016-11-17  6:18 ` NeilBrown
  0 siblings, 1 reply; 4+ messages in thread
From: Wols Lists @ 2016-11-16 23:51 UTC (permalink / raw)
  To: linux-raid

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Just a thought - linux raid wiki - raid 5 grows getting stuck at 0%
  2016-11-16 23:51 Just a thought - linux raid wiki - raid 5 grows getting stuck at 0% Wols Lists
@ 2016-11-17  6:18 ` NeilBrown
  2016-11-17  9:14   ` Wols Lists
  0 siblings, 1 reply; 4+ messages in thread
From: NeilBrown @ 2016-11-17  6:18 UTC (permalink / raw)
  To: Wols Lists, linux-raid

[-- Attachment #1: Type: text/plain, Size: 2323 bytes --]

On Thu, Nov 17 2016, Wols Lists wrote:

> 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.

>
> 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.

>
> 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");



>
> 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.

>
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Just a thought - linux raid wiki - raid 5 grows getting stuck at 0%
  2016-11-17  6:18 ` NeilBrown
@ 2016-11-17  9:14   ` Wols Lists
  2016-11-17 22:54     ` NeilBrown
  0 siblings, 1 reply; 4+ messages in thread
From: Wols Lists @ 2016-11-17  9:14 UTC (permalink / raw)
  To: NeilBrown, linux-raid

On 17/11/16 06:18, NeilBrown wrote:
>> > 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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Just a thought - linux raid wiki - raid 5 grows getting stuck at 0%
  2016-11-17  9:14   ` Wols Lists
@ 2016-11-17 22:54     ` NeilBrown
  0 siblings, 0 replies; 4+ messages in thread
From: NeilBrown @ 2016-11-17 22:54 UTC (permalink / raw)
  To: Wols Lists; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]

On Thu, Nov 17 2016, Wols Lists wrote:

> On 17/11/16 06:18, NeilBrown wrote:
>>> > 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
>
> 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.

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


>
> And if there isn't any at present, it'll just tell me it's needed even
> more :-)
>
> Cheers,
> Wol

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 800 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-17 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-16 23:51 Just a thought - linux raid wiki - raid 5 grows getting stuck at 0% Wols Lists
2016-11-17  6:18 ` NeilBrown
2016-11-17  9:14   ` Wols Lists
2016-11-17 22:54     ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).