Version 2.03.27 -
==================
+ Do not accept duplicate device names for pvcreate.
Version 2.03.26 - 23rd August 2024
==================================
mdatypes='2'
fi
+# pvcreate fails when the same device appears twice on input
+not pvcreate "$dev1" "$dev1" 2>err
+grep "Duplicate device name found on input" err
+
for mdatype in $mdatypes
do
# pvcreate (lvm$mdatype) refuses to overwrite an mounted filesystem (bz168330)
pv_name = pp->pv_names[i];
+ if (_pvcreate_list_find_name(&pp->arg_devices, pv_name)) {
+ log_error("Duplicate device name found on input: %s.", pv_name);
+ return 0;
+ }
+
if (!(pd = dm_pool_zalloc(cmd->mem, sizeof(*pd)))) {
log_error("alloc failed.");
return 0;