Skip to contentSkip to conversation

restore the "removemissing" behaviour of lvconvert --repair --use-policies

PATCH New Petr Rockai 2 participants 4 messages Jun 30, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 restore the "removemissing" behaviour of lvconvert --repair --use-policies

When we are doing lvconvert --repair --use-policies, which is the combination that is used in dmeventd, at the end of the repair, we clean up any bad (missing) PVs from the VG that have become empty. In common cases, this leads to a clean and consistent VG after a repair, with no missing PVs in it.

This feature has regressed with the mirroredlog patches for lvconvert.

I conjecture, that this patch should fix Corey's RHBZ 606528 (it is not entirely clear what exactly happened there yet, but I believe this could definitely explain the behaviour).

Yours,
Petr.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvconvert-repair-removemissing.diff
Type: text/x-diff
Size: 2318 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100630/d633f82e/attachment.bin>

#1 lore raw

PATCH 1/1 restore the "removemissing" behaviour of lvconvert --repair --use-policies

Review

Quoted 4 lines · Peter Rockai
(quoted diff) +1 -2
-	struct dm_list *failed_pvs = NULL;
 
-	if (!(failed_pvs = _failed_pv_list(lv->vg)))
+	if (!(lp->failed_pvs = _failed_pv_list(lv->vg)))

How does the patch work?

Alasdair

#2 lore raw

PATCH 1/1 restore the "removemissing" behaviour of lvconvert --repair --use-policies

Quoted 7 lines · Alasdair G Kergon

Review

Quoted 4 lines · Peter Rockai
(quoted diff) +1 -2
-	struct dm_list *failed_pvs = NULL;
 
-	if (!(failed_pvs = _failed_pv_list(lv->vg)))
+	if (!(lp->failed_pvs = _failed_pv_list(lv->vg)))

How does the patch work?

Ah, this is not mentioned in the patch since it was not changed. The missing piece of the puzzle is this:

   1567                 if (arg_count(cmd, repair_ARG) && arg_count(cmd, use_policies_ARG))
   1568                         _remove_missing_empty_pv(lv->vg, lp->failed_pvs);
                                                                 ^^^^

Yours,
Petr.

#3 lore raw

PATCH 1/1 restore the "removemissing" behaviour of lvconvert --repair --use-policies

Quoted 5 lines · Peter Rockai

Ah, this is not mentioned in the patch since it was not changed. The missing piece of the puzzle is this:

   1567                 if (arg_count(cmd, repair_ARG) && arg_count(cmd, use_policies_ARG))
   1568                         _remove_missing_empty_pv(lv->vg, lp->failed_pvs);
                                                                  ^^^^

So the code - what? - generates one list of PVs then uses another?!

Ack.

Alasdair