linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Vojtech Trefny <vtrefny@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Can't get merge in background using blockdev api to work
Date: Mon, 3 Jan 2022 16:49:07 +0100	[thread overview]
Message-ID: <CAAkhNO3NOZPHc5SoRGOQBcg=hC14hAx69diwMVqss5W6UWA8SA@mail.gmail.com> (raw)
In-Reply-To: <CACrcyf+mJY9NJ8pgkZUg00kaHpVN96pZ94n7ZF0E4xkS2=yJcA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2046 bytes --]

Hi, libblockdev maintainer here, libblockdev is a separate project from LVM
so it's better to ask on our GitHub[1], but I'm reading this ML too so I
can answer here.

I did a quick test and the background merge works for me, so I think the
problem is somewhere in LVM or with your setup, not in libblockdev -- all
we do is run the "lvm lvconvert --merge <vg>/<snap> --background" command
so there isn't a big room for a bug in our code (but I'm not saying there
isn't one). I've modified your code a little bit[2], can you try running it
again? I've just added logging so we can see what we actually tell LVM to
run and also enabled LVM logging and saved the log to /tmp/lvm.log.

[1] https://github.com/storaged-project/libblockdev
[2] https://gist.github.com/vojtechtrefny/7f379596958a0c4cd4c287c3f7a7dddd

On Mon, Jan 3, 2022 at 9:06 AM Tomas Dalebjörk <tomas.dalebjork@gmail.com>
wrote:

> 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
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://listman.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[-- Attachment #1.2: Type: text/html, Size: 3141 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

  reply	other threads:[~2022-01-04  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01 18:02 [linux-lvm] Can't get merge in background using blockdev api to work Tomas Dalebjörk
2022-01-03 15:49 ` Vojtech Trefny [this message]
2022-01-05  8:12   ` Tomas Dalebjörk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAkhNO3NOZPHc5SoRGOQBcg=hC14hAx69diwMVqss5W6UWA8SA@mail.gmail.com' \
    --to=vtrefny@redhat.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).