Skip to content

dm era: a metadata device that never comes back

Denis V. Lunev dm-devel lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dm persistent data: drop the original block only once it is copieddrivers/md/persistent-data/dm-transaction-manager.c+8 -50 replies
2/3dm era: refuse metadata rpcs once the target is suspendeddrivers/md/dm-era-target.c+8 -10 replies
3/3dm era: construct the target suspendeddrivers/md/dm-era-target.c+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] dm era: a metadata device that never comes back

We move running containers between machines without restarting them, and their block volumes travel with them, so dm-era tells us which blocks changed between copy passes.

About one move in three ended with the volume dead rather than moved:
the metadata broke, every commit after it failed, the target reported "era Error", and the writes it tracked began to fail, which takes the workload's filesystem read-only. Rebuilding the device recovers the tracking, not the filesystem.

Three unrelated causes, all of which the kernel log blames on the space map, which is the victim. Two need no bad luck: multipathd asks every target that appears for its status, so one is asked exactly while it resumes, and again while it suspends. The third is older and wider - a transient read failure in the persistent-data library leaves the space map short, and the next commit makes that permanent. dm-thin and dm-cache reach it too, where it costs a transaction rather than the device, because they can abort and dm-era cannot.

Each patch is reproduced on a kernel whose only modification is the fix under test. Patch 3 must not be backported before patch 2, nor before cca2c6aebe86, where the resize goes through the worker the two would refuse.

Denis V. Lunev (3):
dm persistent data: drop the original block only once it is copied dm era: refuse metadata rpcs once the target is suspended dm era: construct the target suspended

 drivers/md/dm-era-target.c                          | 10 +++++++++-
 drivers/md/persistent-data/dm-transaction-manager.c | 13 ++++++++-----
 2 files changed, 17 insertions(+), 6 deletions(-)
Signature · 1 line
2.55.0