ret = dev_find_key_nvme(cmd, dev, may_fail, find_key, found_key,
find_host_id, found_host_id_key,
find_all, found_count, found_all);
- else
+ else if (dev_is_scsi(cmd, dev) || dev_is_mpath(cmd, dev))
ret = dev_find_key_scsi(cmd, dev, may_fail, find_key, found_key,
find_host_id, found_host_id_key,
find_all, found_count, found_all);
+ else
+ return_0;
if (ret && found_all && found_count && *found_all && *found_count > 1) {
qsort(*found_all, *found_count, sizeof(uint64_t), _compare_uint64);
* is registered on any device. If so, then PR is in use. If not, PR
* not in use.
*/
- if (!dev_find_key(cmd, check_dev, 0, our_key_val, &found, 0, NULL, 0, NULL, NULL))
+ if (!dev_find_key(cmd, check_dev, 1, our_key_val, &found, 0, NULL, 0, NULL, NULL))
return 1;
if (!found)
return 1;
.SS vgextend
.P
For local VGs, vgextend starts PR on the new devices before adding them to
-the VG. For shared VGs, the user must use lvmpersist to start PR on the
-new devices, from all hosts, before running vgextend. vgextend verifies
-that the reservation and keys on the new devices match the existing devices.
+the VG (the require or autostart setting must be enabled.) For shared
+VGs, the user must use lvmpersist to start PR on the new devices, from all
+hosts, before running vgextend. vgextend verifies that the reservation
+and keys on the new devices match the existing devices.
.P
.SS vgremove
The vgremove command stops PR on the VG's devices only if "require" or
goto_out;
/* If the VG is using PR, then get PR on new devs. */
- if (!persist_start_extend(cmd, vg))
+ if ((vg->pr & (VG_PR_REQUIRE|VG_PR_AUTOSTART)) &&
+ !persist_start_extend(cmd, vg))
goto_out;
if (arg_is_set(cmd, metadataignore_ARG)) {