1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +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 da721ac1ef
commit 07e711ecaa
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.85 - 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. 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 cling policy to recognise PVs already used during the transaction.
Improve normal allocation algorithm to include clinging to existing areas. 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. */ /* Allow partial & exported VGs to be destroyed. */
/* we must have -ff to overwrite a non orphan */ /* we must have -ff to overwrite a non orphan */
if (arg_count(cmd, force_ARG) < 2) { if (arg_count(cmd, force_ARG) < 2) {
log_error("Can't pvremove physical volume \"%s\" of " log_error("PV %s belongs to Volume Group %s so please use vgreduce first.", name, pv_vg_name(pv));
"volume group \"%s\" without -ff", name, pv_vg_name(pv)); log_error("(If you are certain you need pvremove, then confirm by using --force twice.)");
return 0; return 0;
} }