Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mdraid: Add 'bitmap' option to MDRaidCreate method #1124

Closed

Conversation

mvollmer
Copy link
Contributor

No description provided.

@StorageGhoul
Copy link

Can one of the admins verify this patch?

Copy link
Member

@tbzatek tbzatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, thanks. Last call as we were planning to make releases next week. Still a last chance to break libblockdev API until it's set in stone for the next 10 years!

Comment on lines +169 to +170
The @bitmap option can have the same values as are accepted by
SetBitmapLocation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explicitly state the values accepted, for the sake of completeness? I.e. The value for the bitmap, currently only the values 'none' and 'internal' are supported.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, looking at the mdadm manpage, in case bd_md_create(bitmap=False), libblockdev doesn't add any --bitmap= option, leaving the logic on automatic mdadm rule:

When creating an array on devices which are 100G or larger, mdadm automatically adds an internal bitmap as it will usually be beneficial. This can be suppressed with --bitmap=none or by selecting a different consistency policy with --consistency-policy.

So either the values in UDisks should read 'auto' and 'internal', or we should change bd_md_create() to accept values of 'none', 'auto' and 'internal'. Intentionally omitting 'clustered' and filename as those we don't want to support.

Copy link
Contributor Author

@mvollmer mvollmer Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When creating an array on devices which are 100G or larger, mdadm automatically adds an internal bitmap as it will usually be beneficial. This can be suppressed with --bitmap=none or by selecting a different consistency policy with --consistency-policy.

Oh, interesting, let's bring in the experts.

@mauelsha, from our discussion in Brno I had the impression that mdadm will never use a bitmap but that it is always a good idea to use one. Now the man page seems to say that a bitmap is not always a good idea, and that mdadm does in fact decides to use a bitmap exactly when it is a good idea.

Can you clarify?

Right now I am thinking that we don't need to change anything, after all. New mdraid devices will have a bitmap or not as decided by the mdraid maintainers, and Cockpit allows it to be adjusted in case the maintainers are wrong in certain situations.

@tbzatek
Copy link
Member

tbzatek commented Jun 20, 2023

Jenkins, ok to test.

@mvollmer mvollmer marked this pull request as draft June 20, 2023 15:59
@mvollmer
Copy link
Contributor Author

Nice addition, thanks. Last call as we were planning to make releases next week.

Please don't hold the release because of this.

@@ -765,7 +766,16 @@ handle_mdraid_create (UDisksManager *_object,
}
disks[disks_top] = NULL;

if (!bd_md_create (array_name, arg_level, disks, 0, NULL, FALSE, arg_chunk, NULL, &error))
g_variant_lookup (arg_options, "bitmap", "^&ay", &option_bitmap);
if (!(g_strcmp0 (option_bitmap, "none") == 0 || g_strcmp0 (option_bitmap, "internal") == 0))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing, revealed by the failed tests - in case of a NULL value this check should be skipped.

@tbzatek
Copy link
Member

tbzatek commented Jun 22, 2023

I've addressed this in #1127 to speed things up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants