mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
80b2de9e6a
Enhance lv_info with lv_info_with_name_check. This 'variant' not only check existance if UUID in DM table but also compares its DM name whether it's matching expected LV name. Otherwise activation may 'skip' activation with rename in case the DM UUID already exists, just device is different name. This change make fairly easier manipulation with i.e. detached mirror leg which ATM is using same UUID - just the LV name have been changed. Used code was not able to run 'activation' (and do a rename) and just skipped the call. So the code used to do a workaround and 'tried' to deactivate such LV firts - this however work only in non-clvmd case, as cluster was not having the lock for deactivated LV. With this extended lv_info code will run 'activation' and will synchronize the name to match expected LV name. Patch extends _lv_info() with new paramter 'with_name_check', which is later translated into 'name_check' argument for _info_run() which in case of name mismatch evaluates the check as if device does not exists. Such call is only used in one place _lv_activate() which then let activation run. All other invocation of _info() calls are left intact. TODO: fix mirror table manipulation (and raid).... |
||
---|---|---|
.. | ||
activate.c | ||
activate.h | ||
dev_manager.c | ||
dev_manager.h | ||
fs.c | ||
fs.h | ||
targets.h |