diff --git a/WHATS_NEW b/WHATS_NEW index f16c3fb0e..592262ef6 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.03 - =================================== + pvremove without -f now fails if there's no PV label. Support lvconvert -s. Suppress locking library load failure message if --ignorelockingfailure. Propagate partial mode around cluster. diff --git a/tools/pvremove.c b/tools/pvremove.c index 1fce587a3..75ea7f56a 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -33,9 +33,14 @@ static int pvremove_check(struct cmd_context *cmd, const char *name) return 0; } - /* is there a pv here already */ - if (!(pv = pv_read(cmd, name, NULL, NULL, 1))) - return 1; + /* Is there a pv here already? */ + /* If not, this is an error unless you used -f. */ + if (!(pv = pv_read(cmd, name, NULL, NULL, 1))) { + if (arg_count(cmd, force_ARG)) + return 1; + else + return 0; + } /* orphan ? */ if (!pv->vg_name[0])