1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cleanup: update messages

This commit is contained in:
Zdenek Kabelac 2017-06-23 10:59:12 +02:00
parent a7c7d53543
commit cc03a872c0
2 changed files with 10 additions and 10 deletions

View File

@ -122,13 +122,13 @@ static int _check_region_size_constraints(struct logical_volume *lv,
uint32_t stripe_size) uint32_t stripe_size)
{ {
if (region_size < stripe_size) { if (region_size < stripe_size) {
log_error("Regionsize may not be smaller than stripe size on %s LV %s.", log_error("Region size may not be smaller than stripe size on %s LV %s.",
segtype->name, display_lvname(lv)); segtype->name, display_lvname(lv));
return 0; return 0;
} }
if (region_size > lv->size) { if (region_size > lv->size) {
log_error("Regionsize too large for %s LV %s.", log_error("Region size is too large for %s LV %s.",
segtype->name, display_lvname(lv)); segtype->name, display_lvname(lv));
return 0; return 0;
} }
@ -2442,14 +2442,14 @@ static int _reshape_requested(const struct logical_volume *lv, const struct segm
!seg_is_any_raid0(seg) && !seg_is_any_raid0(seg) &&
(region_size || stripe_size) && (region_size || stripe_size) &&
((region_size ?: seg->region_size) < (stripe_size ?: seg->stripe_size))) { ((region_size ?: seg->region_size) < (stripe_size ?: seg->stripe_size))) {
log_error("region size may not be smaller than stripe size on LV %s.", log_error("Region size may not be smaller than stripe size on LV %s.",
display_lvname(lv)); display_lvname(lv));
return 2; return 2;
} }
if (seg_is_any_raid10(seg) && seg->area_count > 2 && if (seg_is_any_raid10(seg) && seg->area_count > 2 &&
stripes && stripes < seg->area_count - seg->segtype->parity_devs) { stripes && stripes < seg->area_count - seg->segtype->parity_devs) {
log_error("Can't remove stripes from raid10"); log_error("Can't remove stripes from raid10.");
return 2; return 2;
} }

View File

@ -3762,7 +3762,7 @@ int process_each_lv(struct cmd_context *cmd,
ret_max = ret; ret_max = ret;
if (dm_list_empty(&arg_vgnames) && dm_list_empty(&arg_tags)) { if (dm_list_empty(&arg_vgnames) && dm_list_empty(&arg_tags)) {
ret_max = ECMD_FAILED; ret_max = ECMD_FAILED;
goto out; goto_out;
} }
} }
@ -4693,7 +4693,7 @@ int pvcreate_params_from_args(struct cmd_context *cmd, struct pvcreate_params *p
if (arg_is_set(cmd, pvmetadatacopies_ARG) && if (arg_is_set(cmd, pvmetadatacopies_ARG) &&
!arg_int_value(cmd, pvmetadatacopies_ARG, -1) && !arg_int_value(cmd, pvmetadatacopies_ARG, -1) &&
pp->pva.metadataignore) { pp->pva.metadataignore) {
log_error("metadataignore only applies to metadatacopies > 0"); log_error("metadataignore only applies to metadatacopies > 0.");
return 0; return 0;
} }
@ -4711,7 +4711,7 @@ int pvcreate_params_from_args(struct cmd_context *cmd, struct pvcreate_params *p
} }
if (arg_sign_value(cmd, dataalignmentoffset_ARG, SIGN_NONE) == SIGN_MINUS) { if (arg_sign_value(cmd, dataalignmentoffset_ARG, SIGN_NONE) == SIGN_MINUS) {
log_error("Physical volume data alignment offset may not be negative"); log_error("Physical volume data alignment offset may not be negative.");
return 0; return 0;
} }
pp->pva.data_alignment_offset = arg_uint64_value(cmd, dataalignmentoffset_ARG, UINT64_C(0)); pp->pva.data_alignment_offset = arg_uint64_value(cmd, dataalignmentoffset_ARG, UINT64_C(0));
@ -4725,7 +4725,7 @@ int pvcreate_params_from_args(struct cmd_context *cmd, struct pvcreate_params *p
(pp->pva.pe_start != PV_PE_START_CALC)) { (pp->pva.pe_start != PV_PE_START_CALC)) {
if ((pp->pva.data_alignment ? pp->pva.pe_start % pp->pva.data_alignment : pp->pva.pe_start) != pp->pva.data_alignment_offset) { if ((pp->pva.data_alignment ? pp->pva.pe_start % pp->pva.data_alignment : pp->pva.pe_start) != pp->pva.data_alignment_offset) {
log_warn("WARNING: Ignoring data alignment %s" log_warn("WARNING: Ignoring data alignment %s"
" incompatible with restored pe_start value %s)", " incompatible with restored pe_start value %s.",
display_size(cmd, pp->pva.data_alignment + pp->pva.data_alignment_offset), display_size(cmd, pp->pva.data_alignment + pp->pva.data_alignment_offset),
display_size(cmd, pp->pva.pe_start)); display_size(cmd, pp->pva.pe_start));
pp->pva.data_alignment = 0; pp->pva.data_alignment = 0;
@ -4878,10 +4878,10 @@ static void _check_pvcreate_prompt(struct cmd_context *cmd,
log_error("PV %s is used by VG %s so please use vgreduce first.", pvname, vgname); log_error("PV %s is used by VG %s so please use vgreduce first.", pvname, vgname);
log_error("(If you are certain you need pvremove, then confirm by using --force twice.)"); log_error("(If you are certain you need pvremove, then confirm by using --force twice.)");
} else if (pp->yes) { } else if (pp->yes) {
log_warn("WARNING: PV %s is used by VG %s", pvname, vgname); log_warn("WARNING: PV %s is used by VG %s.", pvname, vgname);
answer_yes = 1; answer_yes = 1;
} else if (ask) { } else if (ask) {
log_warn("WARNING: PV %s is used by VG %s", pvname, vgname); log_warn("WARNING: PV %s is used by VG %s.", pvname, vgname);
if (yes_no_prompt("Really WIPE LABELS from physical volume \"%s\" of volume group \"%s\" [y/n]? ", pvname, vgname) == 'n') if (yes_no_prompt("Really WIPE LABELS from physical volume \"%s\" of volume group \"%s\" [y/n]? ", pvname, vgname) == 'n')
answer_no = 1; answer_no = 1;
else else