All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: Batch/queue LVM operations
Date: Tue, 1 Aug 2017 19:46:31 +0200	[thread overview]
Message-ID: <4c0a5ae7-2da4-7610-5d06-90d990bd41de@redhat.com> (raw)
In-Reply-To: <alpine.LRH.2.11.1708011720490.9683@mail.ewheeler.net>

Dne 1.8.2017 v 19:24 Eric Wheeler napsal(a):
> On Fri, 28 Jul 2017, Zdenek Kabelac wrote:
> 
>> Dne 28.7.2017 v 21:22 Eric Wheeler napsal(a):
>>> Hello,
>>>
>>> Is there an option to batch LVM operations?
>>>
>>> For example, I would like to delete 100 thin snapshots without updating
>>> the vgmeta 100 times.
>>
>> You could possibly use --select feature to handle all removals with
>> just one lvremove command.
> 
> I tried --select, but there is a long pause between removals so it is
> clearly doing a metadata operation for each removal.
> 
> Is it possible to do something like this:
> 
> 1. Hold a lock (how?)
> 2. vgcfgbackup -f /my-backup/file --ignorelocking-failure
> 3. Modify /my-backup/file (remove LVs)
> 4. dmsetup message pool 0 delete ID (each ID)
> 5. vgcfgrestore --ignorelocking-failure
> 6. Release lock
> 
> --
> Eric Wheeler
> 

Hi

Unfortunately this optimization is currently not possible.

lvm2 is strictly working on 1-by-1 logic - since resolving more complex
recovery path is beyond capabilities of this tool.

We do plan to 'group' 'lvremove' operation in future -
so i.e. if you pass multiple  LVs on cmdline -
sort them by  VG and do a single VG commit to remove them all.

But with thinLV this is different level as we would need to also
join all delete thin-pool transactions together - and we do not have good 
interface for this to resolve 'what have been delete and what's been left in 
case of error' so there is some space for improvements ATM - but I could see 
some possibilities, but it's still in queue behind bigger fishes for hunting...

What we would could possibly improve more easily is to remove ALL thin LVs
from a pool - such 'pool' reset could be implemented in more simple way.

So far the remove or creation of large numbers of LVs was not seen
as time-critical operation - so we are rather focused on simpler code here.


Regards

Zdenek



  reply	other threads:[~2017-08-01 17:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 19:22 Batch/queue LVM operations Eric Wheeler
2017-07-28 19:43 ` Zdenek Kabelac
2017-07-28 21:55   ` Eric Wheeler
2017-07-31 12:16   ` Bryn M. Reeves
2017-08-01 17:24   ` Eric Wheeler
2017-08-01 17:46     ` Zdenek Kabelac [this message]
2017-08-01 18:39       ` Zdenek Kabelac
2017-08-04  0:59         ` Eric Wheeler
2017-08-14 12:36           ` Zdenek Kabelac
2017-08-04  0:38       ` Eric Wheeler
2017-08-14 12:29         ` Zdenek Kabelac
2017-07-31  9:01 ` Germano Percossi
2017-07-31  9:19   ` Zdenek Kabelac
2017-07-31  9:22     ` Germano Percossi
2017-08-01 17:20     ` Eric Wheeler

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=4c0a5ae7-2da4-7610-5d06-90d990bd41de@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.