From: Stuart D Gathman <stuart@gathman.org>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] convert logical sector -> physical sector + pv/vg extent number
Date: Thu, 6 Jan 2022 08:47:09 -0500 (EST) [thread overview]
Message-ID: <19a37b3-165e-78fb-f36-f86af8b18b26@gathman.org> (raw)
In-Reply-To: <a6e37c26-77c4-2a8e-ab81-3a909c477a47@web.de>
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
On Mon, 3 Jan 2022, Roland wrote:
> any chance to get retrieve this information for automated/script based
> processing ?
You might find this script enlightening:
https://github.com/sdgathman/lbatofile
It maps bad sectors to partition,LV,file,etc
The relevant function for your question is findlv()
Some of the commands run are:
pvdisplay --units k -m '/dev/lvm_pv'
pvs --units k -o+pe_start '/dev/lvm_pv'
> Am 03.01.22 um 00:12 schrieb Andy Smith:
>> On Sun, Jan 02, 2022 at 08:00:30PM +0100, Roland wrote:
>>> if i have a logical sector/block "x" on a lvm logical volume , is there
>>> a way to easily calculate/determine (optimally by script/cli) the
>>> corresponding physical sector of the physical device it belongs to and
>>> the extent number of the appropiate pv/vg where it resides ?
[-- 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/
prev parent reply other threads:[~2022-01-06 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-02 19:00 [linux-lvm] convert logical sector -> physical sector + pv/vg extent number Roland
2022-01-02 23:12 ` Andy Smith
2022-01-03 11:13 ` Roland
2022-01-03 16:43 ` Roland
2022-01-06 13:47 ` Stuart D Gathman [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=19a37b3-165e-78fb-f36-f86af8b18b26@gathman.org \
--to=stuart@gathman.org \
--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).