int r;
struct dev_manager *dm;
- if (!activation())
+ if (!lv_info(lv->vg->cmd, lv, 0, NULL, 0, 0))
return 0;
log_debug_activation("Checking snapshot percent for LV %s/%s", lv->vg->name, lv->name);
{
int r;
struct dev_manager *dm;
- struct lvinfo info;
/* If mirrored LV is temporarily shrinked to 1 area (= linear),
* it should be considered in-sync. */
return 1;
}
- if (!activation())
+ if (!lv_info(cmd, lv, 0, NULL, 0, 0))
return 0;
log_debug_activation("Checking mirror percent for LV %s/%s", lv->vg->name, lv->name);
- if (!lv_info(cmd, lv, 0, &info, 0, 0))
- return_0;
-
- if (!info.exists)
- return 0;
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
return_0;
*dev_health = NULL;
- if (!activation())
- return_0;
+ if (!lv_info(lv->vg->cmd, lv, 0, NULL, 0, 0))
+ return 0;
log_debug_activation("Checking raid device health for LV %s/%s",
lv->vg->name, lv->name);
- if (!lv_is_active_locally(lv))
- return 0;
-
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
return_0;
*cnt = 0;
- if (!activation())
+ if (!lv_info(lv->vg->cmd, lv, 0, NULL, 0, 0))
return 0;
log_debug_activation("Checking raid mismatch count for LV %s/%s",
lv->vg->name, lv->name);
- if (!lv_is_active_locally(lv))
- return_0;
-
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
return_0;
*sync_action = NULL;
- if (!activation())
+ if (!lv_info(lv->vg->cmd, lv, 0, NULL, 0, 0))
return 0;
log_debug_activation("Checking raid sync_action for LV %s/%s",
lv->vg->name, lv->name);
- if (!lv_is_active_locally(lv))
- return_0;
-
if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1)))
return_0;
return 0;
}
- if (!lv_is_active_locally(lv)) {
+ if (!lv_info(lv->vg->cmd, lv, 0, NULL, 0, 0)) {
log_error("Unable to send message to an inactive logical volume.");
return 0;
}