1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-12 07:33:16 +03:00

Never scan internal LVM devices.

This commit is contained in:
Petr Rockai
2010-08-09 14:05:16 +00:00
parent 40f03c4c2c
commit dd5d9aa6bc
2 changed files with 10 additions and 5 deletions

View File

@@ -153,12 +153,17 @@ int device_is_usable(struct device *dev)
if (!dm_task_get_info(dmt, &info))
goto_out;
if (!info.exists || info.suspended)
if (!info.exists)
goto out;
name = dm_task_get_name(dmt);
uuid = dm_task_get_uuid(dmt);
if (info.suspended && ignore_suspended_devices()) {
log_debug("%s: Suspended device %s not usable.", dev_name(dev), name);
goto out;
}
/* FIXME Also check for mirror block_on_error and mpath no paths */
/* For now, we exclude all mirrors */
@@ -166,8 +171,8 @@ int device_is_usable(struct device *dev)
next = dm_get_next_target(dmt, next, &start, &length,
&target_type, &params);
/* Skip if target type doesn't match */
if (target_type && !strcmp(target_type, "mirror")) {
log_debug("%s: Mirror device not usable.", dev_name(dev));
if (target_type && !strcmp(target_type, "mirror") && ignore_suspended_devices()) {
log_debug("%s: Mirror device %s not usable.", dev_name(dev), name);
goto out;
}
} while (next);