Skip to contentSkip to conversation

raid 4, and bitmap.

DISCUSSION JaniD++ 2 participants 7 messages Feb 3, 2006 – Feb 5, 2006 2 messages not in the archive MD RAID

lore
Share & tools
lore

JaniD++

author
#0 lore raw

Hello, list, Neil,

I try to add bitmaps to raid4, and mdadm is done this fine. In the /proc/mdstat shows this, and it is really works well.

But on reboot, the kernel drops the bitmap(, and resync the entire array if it is unclean). :(

It is still uncomplete now? (2.6.16-rc1)

Thanks,
Janos

#1 lore raw
Quoted 9 lines · On Friday February 3, [email protected] wrote:

Hello, list, Neil,

I try to add bitmaps to raid4, and mdadm is done this fine. In the /proc/mdstat shows this, and it is really works well.

But on reboot, the kernel drops the bitmap(, and resync the entire array if it is unclean). :(

It is still uncomplete now? (2.6.16-rc1)

It is an 'internal' bitmap, or is the bitmap in a file?

If the bitmap is in a file, you need to me sure that the file is provided by mdadm when the array is assembled - using in-kernel autodetect won't work.

If it is an internal bitmap.... it should work.
Are there any kernel messages during boot that might be interesting?

NeilBrown

author
#2 lore raw

----- Original Message -----
From: "Neil Brown" <[email protected]>
To: "JaniD++" <[email protected]>
Cc: <[email protected]>
Sent: Friday, February 03, 2006 1:09 AM
Subject: Re: raid 4, and bitmap.

Quoted 7 lines · On Friday February 3, [email protected] wrote:
Quoted 6 lines

Hello, list, Neil,

I try to add bitmaps to raid4, and mdadm is done this fine. In the /proc/mdstat shows this, and it is really works well.

But on reboot, the kernel drops the bitmap(, and resync the entire array

if

Quoted 6 lines
Quoted 3 lines

it is unclean). :(

It is still uncomplete now? (2.6.16-rc1)

It is an 'internal' bitmap, or is the bitmap in a file?

It is internal.
The external bitmap is not works for me, because on the boot, only the NFS is reachable, and it cause crash.

(note: this is raid4 not raid5!)

Quoted 7 lines

If the bitmap is in a file, you need to me sure that the file is provided by mdadm when the array is assembled - using in-kernel autodetect won't work.

If it is an internal bitmap.... it should work.
Are there any kernel messages during boot that might be interesting?

It is something, i will find it one minute! :-)

Quoted 2 lines

NeilBrown

#4 lore raw
In reply to a message not in the archive
Quoted 8 lines · On Friday February 3, [email protected] wrote:
Quoted 3 lines

If it is an internal bitmap.... it should work.
Are there any kernel messages during boot that might be interesting?

Sorry, i did not log this, and i dont want to restart the sync and system for this.
Anyway, i add back the bitmap, and the next crash we will see....

Quoted 5 lines

I mean this was:
"bitmap is only support in raid1.
bitmap is removed."

But not so sure. :(

Close enough. Here is the fix.

NeilBrown

### Diffstat output

 ./drivers/md/md.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/md.c renamed from drivers/md/md.c~current~ +2 -1
diff ./drivers/md/md.c~current~ ./drivers/md/md.c
@@ -763,7 +763,8 @@ static int super_90_validate(mddev_t *md
 
 		if (sb->state & (1<<MD_SB_BITMAP_PRESENT) &&
 		    mddev->bitmap_file == NULL) {
-			if (mddev->level != 1 && mddev->level != 5 && mddev->level != 6
+			if (mddev->level != 1 && && mddev->level != 4
+			    && mddev->level != 5 && mddev->level != 6
 			    && mddev->level != 10) {
 				/* FIXME use a better test */
 				printk(KERN_WARNING "md: bitmaps not supported for this level.\n");
author
#6 lore raw
In reply to a message not in the archive

----- Original Message -----
From: "Neil Brown" <[email protected]>
To: "JaniD++" <[email protected]>
Cc: <[email protected]>
Sent: Friday, February 03, 2006 1:23 AM
Subject: Re: raid 4, and bitmap.

Quoted 6 lines · On Friday February 3, [email protected] wrote:
Quoted 5 lines
Quoted 3 lines

If it is an internal bitmap.... it should work.
Are there any kernel messages during boot that might be interesting?

Sorry, i did not log this, and i dont want to restart the sync and

system

Quoted 10 lines
Quoted 8 lines

for this.
Anyway, i add back the bitmap, and the next crash we will see....

I mean this was:
"bitmap is only support in raid1.
bitmap is removed."

But not so sure. :(

Close enough. Here is the fix.

Thanks!

This was fast! :)

Ahh, i almost forget!
The mdadm is sometimes drop "cannot allocate memory" and next try "segfault" when i try -G --bitmap=internal on 2TB arrays!
And after segfault, the full raid is stops...

Cheers,
Janos

Quoted 22 lines

NeilBrown

### Diffstat output

 ./drivers/md/md.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c

drivers/md/md.c 2006-02-03 11:22:57.000000000 +1100 renamed from drivers/md/md.c~current~ 2006-02-03 08:57:28.000000000 +1100 +2 -1
@@ -763,7 +763,8 @@ static int super_90_validate(mddev_t *md
 
  if (sb->state & (1<<MD_SB_BITMAP_PRESENT) &&
      mddev->bitmap_file == NULL) {
- if (mddev->level != 1 && mddev->level != 5 && mddev->level != 6
+ if (mddev->level != 1 && && mddev->level != 4
+     && mddev->level != 5 && mddev->level != 6
      && mddev->level != 10) {
  /* FIXME use a better test */
  printk(KERN_WARNING "md: bitmaps not supported for this level.\n");
author
#7 lore raw
Quoted 2 lines

Ahh, i almost forget!
The mdadm is sometimes drop "cannot allocate memory" and next try

"segfault"

Quoted 5 lines

when i try -G --bitmap=internal on 2TB arrays!
And after segfault, the full raid is stops...

Cheers,
Janos

I think i found the bug, its me. :-)

Today it happens again, and i see, i have misstyped the "internal" word like "intarnal".
The mdadm is accepted that, and try to make the bitmap on NFS again, and crashed the raid.

I think it is neccessary to better test:

- the bitmap file's fs
- the filename itself.
(i mean did not allow the current directory, or the internal and none to be a separated option)

Cheers,
Janos

#8 lore raw
Quoted 16 lines · On Saturday February 4, [email protected] wrote:
Quoted 2 lines

Ahh, i almost forget!
The mdadm is sometimes drop "cannot allocate memory" and next try

"segfault"

Quoted 5 lines

when i try -G --bitmap=internal on 2TB arrays!
And after segfault, the full raid is stops...

Cheers,
Janos

I think i found the bug, its me. :-)

Today it happens again, and i see, i have misstyped the "internal" word like "intarnal".
The mdadm is accepted that, and try to make the bitmap on NFS again, and crashed the raid.

Quoted 6 lines

I think it is neccessary to better test:

- the bitmap file's fs
- the filename itself.
(i mean did not allow the current directory, or the internal and none to be a separated option)

That sound's like a good idea... require a filename to contain at least one '/', and quite possibly test the filesystem type. bitmaps are known to have problems on reiserfs and nfs. They were developed and tested on ext3 and there is some slightly hairy code in there...

Thanks for the suggestions.

NeilBrown