[linux-lvm] bug? shrink lv by specifying pv extent to be removed does not behave as expected

Roger Heflin rogerheflin at gmail.com
Tue Apr 11 17:05:16 UTC 2023

On Tue, Apr 11, 2023 at 1:44 AM matthew patton <pattonme at yahoo.com> wrote:
> > my plan is to scan a disk for usable sectors and map the logical volume
> > around the broken sectors.
> 1977 called, they'd like their non-self-correcting HD controller implementations back.
> From a real-world perspective there is ZERO (more like negative) utility to this exercise. Controllers remap blocks all on their own and the so-called geometry is entirely fictitious anyway. From a script/program "because I want to" perspective you could leave LVM entirely out of it and just use a file with arbitrary offsets scribbled with a "bad" signature.

The disks should be able to remap sectors all on their own.  Few
(none?) of the sata/sas non-raid controllers I know of do any disk
level remapping.  Some of the hardware raid ones may.   As implemented
the decision to remap (in the disk) seems to not always work
correctly.  I have a number of disks over several generations that
will refuse to re-map what is a clearly bad sector (re-writes to a
given sector succeed, and then immediate re-reads fail and on another
re-write succeed again and immediately fail on re-read, but do not get

So given this, if one does not want to be replacing the given disks
there is room for software level remaps still to use the significant
number of disks with limited bad sectors on them.

More information about the linux-lvm mailing list