For the test clean-up, I was providing too many devices to the first
command - possibly allowing it to allocate in the wrong place. I was
also not providing a device for the second command - virtually ensuring
the test was not performing correctly at times.
char *dev_health;
char *sync_action;
struct lv_segment *seg = first_seg(lv);
- struct cmd_context *cmd = lv->vg->cmd;
/* If in-sync or hanlding repairs, allow to proceed. */
if (_raid_in_sync(lv) || lv->vg->cmd->handles_missing_pvs)
* Returns: 1 if the state is detected, 0 otherwise.
* FIXME: would be better to return -1,0,1 to allow error report.
*/
-int _lv_raid_has_primary_failure_on_recover(struct logical_volume *lv)
+static int _lv_raid_has_primary_failure_on_recover(struct logical_volume *lv)
{
char *tmp_dev_health;
char *tmp_sync_action;
# - DO allow removal of secondaries while syncing
###########################################
aux delay_dev $dev2 0 100
-lvcreate -aey -l 2 -n $lv1 $vg $dev1 $dev2
+lvcreate -aey -l 2 -n $lv1 $vg $dev1
lvconvert -y -m 1 $vg/$lv1 \
- --config 'global { mirror_segtype_default = "raid1" }'
+ --config 'global { mirror_segtype_default = "raid1" }' $dev2
lvs --noheadings -o attr $vg/$lv1 | grep '^[[:space:]]*r'
not lvconvert --yes -m 0 $vg/$lv1 $dev1
lvconvert --yes -m 0 $vg/$lv1 $dev2