All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Farey <chris_farey@stormagic.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Mapping LVs to physical device
Date: Tue, 30 Jun 2009 18:17:44 +0100	[thread overview]
Message-ID: <4A4A48B8.9040401@stormagic.com> (raw)


I have a requirement to be able to work out which areas of a physical 
device assigned to LVM are being used by various logical volumes. I 
haven't found any easy way to do this using an API, so I've resorted to 
spawning off lvm commands and interpretting the output.

I can use lvdisplay to map logical extents to physical extents, but I 
still need to know where the extents start on the physical device, and I 
can't find a good way of doing that.

pvck tells me the offset and the size of the metadata, and assuming that 
the first extent starts after the metadata seems to work. But pvck 
doesn't seem to be present in older versions of LVM (or one of my 
systems starts running them gets killed), and the help implies its doing 
some checks too (and lengthly checks would be bad in my application).

Is there a better way to map the Logical Block Addresses of LVs to 
physical disks?

Chris Farey

             reply	other threads:[~2009-06-30 17:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30 17:17 Chris Farey [this message]
2009-06-30 18:54 ` [linux-lvm] Mapping LVs to physical device Milan Broz
2009-06-30 19:07 ` Stuart D. Gathman

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=4A4A48B8.9040401@stormagic.com \
    --to=chris_farey@stormagic.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.