diff options
Diffstat (limited to 'tools/vgchange.c')
-rw-r--r-- | tools/vgchange.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c index af59f3a55..b66d13769 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -303,6 +303,7 @@ static int _vgchange_resizeable(struct cmd_context *cmd, static int _vgchange_clustered(struct cmd_context *cmd, struct volume_group *vg) { + struct lv_list *lvl; int clustered = arg_int_value(cmd, clustered_ARG, 0); if (clustered && (vg_is_clustered(vg))) { @@ -317,6 +318,17 @@ static int _vgchange_clustered(struct cmd_context *cmd, return 0; } + if (clustered) { + dm_list_iterate_items(lvl, &vg->lvs) { + if (!segtype_allowed_in_cluster_vg(first_seg(lvl->lv)->segtype)) { + log_error("LV %s segtype %s is not allowed in cluster VG.", + display_lvname(lvl->lv), + first_seg(lvl->lv)->segtype->name); + return 0; + } + } + } + if (clustered && !arg_count(cmd, yes_ARG)) { if (!clvmd_is_running()) { if (yes_no_prompt("LVM cluster daemon (clvmd) is not" |