]> 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)
commitd4421b12ba25b55806018b52ad28b24d1ca86959
treee363b70dcea08204e1a97de9c08404c92feb89f2
parent099b03f038760eaf1f6def2f9285c1b852bc7c8d
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.038686 seconds and 5 git commands to generate.