vgremove -f $vg
pvremove -f $dev1
done
-not vgcreate -c n --metadatacopies 0 $vg $dev1
+not vgcreate -c n --pvmetadatacopies 0 $vg $dev1
pvcreate --metadatacopies 1 $dev2
vgcreate -c n --pvmetadatacopies 0 $vg $dev1 $dev2
check_pv_field_ $dev1 pv_mda_count 0
if (!_merge_synonym(cmd, resizable_ARG, resizeable_ARG) ||
!_merge_synonym(cmd, allocation_ARG, allocatable_ARG) ||
!_merge_synonym(cmd, allocation_ARG, resizeable_ARG) ||
- !_merge_synonym(cmd, virtualoriginsize_ARG, virtualsize_ARG) ||
- !_merge_synonym(cmd, metadatacopies_ARG, pvmetadatacopies_ARG))
+ !_merge_synonym(cmd, virtualoriginsize_ARG, virtualsize_ARG))
+ return EINVALID_CMD_LINE;
+
+ if ((!strncmp(cmd->command->name, "pv", 2) &&
+ !_merge_synonym(cmd, metadatacopies_ARG, pvmetadatacopies_ARG)) ||
+ (!strncmp(cmd->command->name, "vg", 2) &&
+ !_merge_synonym(cmd, metadatacopies_ARG, vgmetadatacopies_ARG)))
return EINVALID_CMD_LINE;
/* Zero indicates success */