phill at thesusis.net
Mon May 22 13:49:32 UTC 2023
graeme vetterlein <graeme.lvm at vetterlein.com> writes:
> I have a desktop Linux box (Debian Sid) with a clutch of disks in it
> (4 or 5) and have mostly defined each disk as a volume group.
Why? The prupose of a VG is to hold multiple PVs.
> Now a key point is *some of the disks are NAS grade disks.* This means
> they do NOT reallocate bad sectors silently. They report IO errors and
> leave it to the OS (i.e. the old fashion way of doing this)
Are you sure that you are not confusing the ERC feature here? That lets
the drive give up in a reasonable amount of time and report the (read)
error rather than keep trying. Most often there is nothing wrong with
the disk physically and writing to the sector will succeed. If it
doesn't, then the drive will remap it.
> Then *the penny dropped!* The only component that has a view on the
> real physical disk is lvm2 and in particular the PV ...so if anybody
> can mark(and avoid) badblocks it's the PV...so I should be looking for
> something akin to the -cc option of fsck , applied to a PV command?
Theoretically yes, you can create a mapping to relocate the block
elsewhere, but there are no tools that I am aware of to help with this.
Again, are you sure there is actually something wrong with the disk?
Try writing to the "bad block" and see what happens. Every time I have
done this in the last 20 years, the problem just goes away. Usually
without even triggering a reallocation. This is because the data just
got a little scrambled even though there is nothing wrong with the
More information about the linux-lvm