• Uncategorized

About c : how-to-start-lvm-merge-in-background-using-blockdev-in-C

Question Detail

I am trying to start a merge of a LVM snapshot using the blockdev API in C, similar to the “lvconvert —merge -b vg/lvsnap” OS command

The issue is that the merge starts, but it doesn’t go in background
The code waits for the completion of the merge, before it can continue

Not sure what I am doing wrong, or if there is another way to resolve this?

    BDExtraArg          lv_arg = {"--background",""};
    const BDExtraArg    *extra_args[2] = {&lv_arg, NULL};
    g_autoptr(GError)   error = NULL;
    bd_switch_init_checks (FALSE, &error);
    bd_ensure_init (plugins, NULL, &error);

Am I supposed to start this as a background thread instead?

Regards Tomas

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.