[linux-lvm] Can't get merge in background using blockdev api to work

Tomas Dalebjörk tomas.dalebjork at gmail.com
Sat Jan 1 18:02:44 UTC 2022


Hi,

I am trying to start a merge to the previous snapshot to be started with
the "-b" flag (background). But it seems to be that the merging has not
started in the background at all.

        BDExtraArg      lv_arg = {"--background",""};
        const BDExtraArg        *extra_args[2] = {&lv_arg, NULL};

        BDPluginSpec lvm_plugin = {BD_PLUGIN_LVM, "libbd_lvm.so.2"};
        BDPluginSpec *plugins[] = {&lvm_plugin,NULL};

        bd_switch_init_checks (FALSE, &error);
        bd_ensure_init (plugins, NULL, &error);
        bd_lvm_lvsnapshotmerge(vg_name,lv_snap,extra_args,&error);

Couldn't find any details about how to do this using the libblockdev api,
but according to the documentation, it should be possible to add the same
flags as for the normal LVM commands.

Could you please give me a hint of what I am doing wrong?

Regards Tomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20220101/b425ffe7/attachment.htm>


More information about the linux-lvm mailing list