]> sourceware.org Git - lvm2.git/commit
Remove empty "repaired" devices if empty in lvconvert.
authorMilan Broz <mbroz@redhat.com>
Wed, 6 Jan 2010 13:26:21 +0000 (13:26 +0000)
committerMilan Broz <mbroz@redhat.com>
Wed, 6 Jan 2010 13:26:21 +0000 (13:26 +0000)
commitbf8c8a6d6115dee99d65460e4d7eb3d679918704
treee363b70dcea08204e1a97de9c08404c92feb89f2
parent5d196aa43091972818bb09fb7fef033ea1a8c674
Remove empty "repaired" devices if empty in lvconvert.

The logic was that lvconvert repair volumes, marking
PV as MISSING and following vgreduce --removemissing
removes these missing devices.

Previously dmeventd mirror DSO removed all LV and PV
from VG by simply relying on
vgreduce --removemissing --force.

Now, there are two subsequent calls:
lvconvert --repair --use-policies
vgreduce --removemissing

So the VG is locked twice, opening space for all races
between other running lvm processes. If the PV reappears
with old metadata on it (so the winner performs autorepair,
if locking VG for update) the situation is even worse.

Patch simply adds removemissing PV functionality into
lvconcert BUT ONLY if running with --repair and --use-policies
and removing only these empty missing PVs which are
involved in repair.
(This combination is expected to run only from dmeventd.)
WHATS_NEW
daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
tools/lvconvert.c
This page took 0.03779 seconds and 5 git commands to generate.