All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: lvm-devel@redhat.com
Subject: atime/mtime for VG/PV
Date: Wed, 24 Nov 2021 08:55:59 -0600	[thread overview]
Message-ID: <20211124145559.GA13560@redhat.com> (raw)
In-Reply-To: <CAJNi=XryUgjw3BuiMZV4CX6GSUD7sfLyaa2a-_gpj9f_iH+Yug@mail.gmail.com>

On Tue, Nov 23, 2021 at 04:58:20PM +0100, Marian Csontos wrote:
> Hi folks, as various issues with duplicates are being solved, I wondered if
> it would be beneficial to include things like atime/mtime in metadata.
> 
> Actually mtime is already there in the VG metadata: seqno + timestamp.
> 
> So what would atime be?
> Store a timestamp on activation of an LV in the VG? Write on any lvm
> operation? Or write timestamp more frequently when there are active devices?
> 
> atime should be stored in PV metadata, even if there is no VG MDA - these
> would benefit the most as there is no VG MDA and thus no "mtime".
> 
> When there are duplicates higher atime would be almost certainly the
> correct device, unless user intends to use a LUN's snapshot, but that would
> require an input from user anyway.
> 
> User MUST be able to turn it of ("noatime") in case of being slow for
> hundreds/thousands of PVs.
> 
> Perhaps this would not have to be fsynced all the time, but then there may
> be a chance for mismatch and for snapshot having higher timestamp than
> original PV.

It's interesting, it would be nice to think of some other problem(s) we
could address with it or something like it.  A local file might work in
place of metadata, depending on what it's used for.

The issue of duplicate PVs should soon go away with the devices file in
use.  When the devices file is used, a new cloned/copied PV will often not
be included in the devices file, so lvm won't see it.  But if it is, we
also store the WWID of each PV in the VG metadata, so if there are
duplicates we use the one with the correct WWID.



      reply	other threads:[~2021-11-24 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 15:58 atime/mtime for VG/PV Marian Csontos
2021-11-24 14:55 ` David Teigland [this message]

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=20211124145559.GA13560@redhat.com \
    --to=teigland@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.