All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming-Hung Tsai <mingnus@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] How to check if thin volume or snapshot was ever activated
Date: Mon, 9 Aug 2021 11:53:46 +0800	[thread overview]
Message-ID: <CAAYit8S5RZ8wh0WAxWEyuJJ=ejVd+TOXqUDFLhMLDGNEGhhRjQ@mail.gmail.com> (raw)
In-Reply-To: <7956b86706382158e1fddb3c4bfbfde3@assyoma.it>

On Sat, Aug 7, 2021 at 7:43 PM Gionatan Danti <g.danti@assyoma.it> wrote:
>
> Dear all,
> as you know, a thin snapshot does have the "k" (skip activation) flag
> set, so one has to force activation by ignoring the flag (or removing
> the flag itself).
>
> I wonder: can we detect if a volume/snapshot was *ever* activated? My
> reasoning is that a never-activated snapshot surely did not receive any
> application writes, so it can be safely removed (ignoring snapshot
> retention policy).

It sounds like you intend to keep snapshots that have been updated
(written) since its creation, right?
The precise way might be checking the data mappings via thin_dump. An
updated device has data mappings with timestamps greater than the
device's creation time.

Checking device activation might not meet what you need. An activated
device might or might not receive any write, so you don't know whether
a device has been updated by looking into its activation history.

_______________________________________________
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:[~2021-08-09  3:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 11:39 [linux-lvm] How to check if thin volume or snapshot was ever activated Gionatan Danti
2021-08-09  3:53 ` Ming-Hung Tsai [this message]
2021-08-09  4:16   ` Ming-Hung Tsai
2021-08-09  8:33   ` Gionatan Danti
     [not found]     ` <CAAYit8RWCA3W0y4vuZju6aZVSeu7e6SjErkZ1orLceJj0nhsvw@mail.gmail.com>
2021-08-10  8:46       ` Gionatan Danti

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='CAAYit8S5RZ8wh0WAxWEyuJJ=ejVd+TOXqUDFLhMLDGNEGhhRjQ@mail.gmail.com' \
    --to=mingnus@gmail.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 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.