1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-27 01:57:55 +03:00

Improve pvremove error message when PV belongs to a VG.

This commit is contained in:
Alasdair Kergon 2011-02-28 19:35:09 +00:00
parent 0de865f20b
commit 9938f0c674
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.85 -
===================================
Improve pvremove error message when PV belongs to a VG.
Extend normal policy to allow mirror logs on same PVs as images if necessary.
Improve cling policy to recognise PVs already used during the transaction.
Improve normal allocation algorithm to include clinging to existing areas.

View File

@ -64,8 +64,8 @@ static int pvremove_check(struct cmd_context *cmd, const char *name)
/* Allow partial & exported VGs to be destroyed. */
/* we must have -ff to overwrite a non orphan */
if (arg_count(cmd, force_ARG) < 2) {
log_error("Can't pvremove physical volume \"%s\" of "
"volume group \"%s\" without -ff", name, pv_vg_name(pv));
log_error("PV %s belongs to Volume Group %s so please use vgreduce first.", name, pv_vg_name(pv));
log_error("(If you are certain you need pvremove, then confirm by using --force twice.)");
return 0;
}