[linux-lvm] cmp of inactive mirrored LV fails

starlight at binnacle.cx starlight at binnacle.cx
Fri Dec 2 21:27:24 UTC 2011


At 04:01 PM 12/2/2011 -0500, Stuart D. Gathman wrote:
>Both MD and LVM support
>DISCARD, and discarded blocks are not necessarily synced
>between mirror legs.

Googled it--seems like DISCARD (aka TRIM) is about
telling SSDs that blocks are no longer in use so
that the SSDs can optimally release tracking of the
storage.  I can see how this might result
in random data appearing in the "discarded"
region.  I don't see how the 'mdadm' mirror
check will cope with that result unless SSDs
return zeros or some other constant value when
TRIMed blocks are subsequently read.

However this is a hard-drive scenario--no SSDs.
It would seem that hard drives generally will
either ignore TRIM operations or via drive
flags inform the kernel to not attempt them.

So this leaves me with two LVs where it's
clear that LVM mirroring failed to maintain
synchronization at some point in the last
year or two.

Also based on this thread
http://www.issociate.de/board/post/507507/SSD_-_TRIM_command.html
it would seem TRIM is very much a bleeding-edge
feature.  Unlikely it appears in the CentOS 5.7
kernel in use on the affected system.

So I'm sticking with "turkey" as the appropriate
characterization of LVM mirroring.




More information about the linux-lvm mailing list