1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/activate
Zdenek Kabelac 80b2de9e6a mirror: fix leg splitting
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)....
2019-10-31 15:31:30 +01:00
..
activate.c mirror: fix leg splitting 2019-10-31 15:31:30 +01:00
activate.h mirror: fix leg splitting 2019-10-31 15:31:30 +01:00
dev_manager.c mirror: fix leg splitting 2019-10-31 15:31:30 +01:00
dev_manager.h mirror: fix leg splitting 2019-10-31 15:31:30 +01:00
fs.c activation: synchronize before removing devices 2019-03-20 14:39:09 +01:00
fs.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
targets.h doc: change fsf address 2016-01-21 12:11:37 +01:00