Re: Where are the data blocks of an LV?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Checkout https://github.com/sdgathman/lbatofile
It was written to identify the file affected by a bad block (so it goes
the opposite direction), but the getpvmap() function obtains pe_start and pe_size plus the list of segments. findlv() goes through the segments to find the one an absolute sector is in. That should tell you what you want to know.

On Fri, 22 Jul 2022, Marcin Owsiany wrote:

I know that it is possible to find where a given logical volume's extents
start on a PVs thanks to the information printed by lvdisplay --maps.

I was also able to experimentally establish that the actual data of an LV
starts one megabyte after that location. Is that offset documented anywhere,
or can I somehow discover it at runtime for a given LV?

_______________________________________________
linux-lvm mailing list
linux-lvm@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux