struct volume_group *vg_create(struct cmd_context *cmd, const char *vg_name);
int vg_remove_mdas(struct volume_group *vg);
int vg_remove_check(struct volume_group *vg);
+void vg_remove_pvs(struct volume_group *vg);
int vg_remove(struct volume_group *vg);
int vg_rename(struct cmd_context *cmd, struct volume_group *vg,
const char *new_name);
int vg_remove_check(struct volume_group *vg)
{
unsigned lv_count;
- struct pv_list *pvl, *tpvl;
if (vg_read_error(vg) || vg_missing_pv_count(vg)) {
log_error("Volume group \"%s\" not found, is inconsistent "
if (!archive(vg))
return 0;
+ return 1;
+}
+
+void vg_remove_pvs(struct volume_group *vg)
+{
+ struct pv_list *pvl, *tpvl;
+
dm_list_iterate_items_safe(pvl, tpvl, &vg->pvs) {
del_pvl_from_vgs(vg, pvl);
dm_list_add(&vg->removed_pvs, &pvl->list);
}
- return 1;
}
int vg_remove(struct volume_group *vg)