| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, pvmove used the function find_pv_in_vg() which did the
equivalent of process_each_pv() by doing:
find_pv_by_name() -> get_pvs() ->
get_pvs_internal() -> _get_pvs() -> get_vgids() ->
/* equivalent to process_each_pv */
dm_list_iterate_items(vgids)
vg = vg_read_internal()
dm_list_iterate_items(&vg->pvs)
With the found 'pv', it would do vg_read() on pv_vg_name(pv),
and then do the actual pvmove processing.
This commit simplifies by using process_each_pv() and putting
the actual pvmove processing into the "single" function.
This eliminates both find_pv_by_name() and the vg_read().
The processing code that followed vg_read remains the same.
|
|
|
|
|
|
| |
This reverts commit 6d09c8c2c45ea1dea243134b8badc841a87cc979.
Try again to remove the workaround.
|
|
|
|
|
| |
Also pass our name to sanlock so it appears in
the sanlock status output.
|
|
|
|
|
|
|
| |
Make the lvb validation rules for convert match
those for unlock (even though it would be very
unlikely or impossible for convert to deal with
zero lvb.)
|
|
|
|
|
|
|
|
| |
When an orphan PV is changed/resized, the
lvmlockd global lock is converted from sh
to ex. If the command is changing two
orphan PVs, the conversion to ex should
be done only once.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Existing cache_settings field displays the settings which are
saved in metadata. Add new kernel_cache_settings fields to display
the settings which are currently used by kernel, including fields
for which default values are used.
This way users have complete view of the set of cache settings
supported (and which they can set) and their values which are used
at the moment by kernel.
For example:
$ lvs -o name,cache_policy,cache_settings,kernel_cache_settings vg
LV Cache Policy Cache Settings KCache Settings
cached1 mq migration_threshold=1024,write_promote_adjustment=2 migration_threshold=1024,random_threshold=4,sequential_threshold=512,discard_promote_adjustment=1,read_promote_adjustment=4,write_promote_adjustment=2
cached2 smq migration_threshold=1024 migration_threshold=1024
cached3 smq migration_threshold=2048
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fix lvm2app to return either 0 or 1 for lvm_vg_is_{clustered,exported},
including internal functions pvseg_is_allocated and vg_is_resizeable
which are not yet exposed in lvm2app but make them consistent with the
rest.
|
|
|
|
|
| |
Get the test mode working (lvmlockd running with no
lock manager).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts e28e22b9e1e4f7243608aa24ddf43ec63afd1751
The problem that that commit was fixing (pytest failure)
no longer appears with the current code, so the commit is
not needed.
That commit is a problem for pvchange, because it prevents
lvmcache from retaining VG metadata even while the global
lock is held. pvchange holds the global lock to ensure
that VG metadata is kept in lvmcache throughout processing.
If the cache is not kept, a PV with zero MDAs will appear
first in its actual VG and then appear again in the orphan VG.
It wrongly appears a second time in the orphan VG only if
the actual VG is dropped from lvmcache.
|
|
|
|
|
|
|
|
| |
in kernel
Thin pool discard mode set in metadata can be different from the one
actually used if any device underneath does not support that mode. Add
kernel_discard report field to make it possible to see this difference.
|
|
|
|
| |
This reverts commit be1b1f3d8941543bcde2f42e65ed0f22fd07b122.
|
|
|
|
|
| |
In last commit when removing if() branch
this 'else' now has to be dropped.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Internal _alloc_init() is only called from allocate_extents(),
which already does prevent usage of virtual segments.
So mark as internal error early and do not process it any further.
|
| |
|
| |
|
|
|
|
| |
Move alloc_snapshot_seg to snapshot_manip and make it local static.
|
|
|
|
|
| |
Before setting static variable with check passed state,
detect if we are allowed to talk to driver.
|
|
|
|
|
| |
Since we check for poolmetadatasize, we need to detect it before
actual test.
|
|
|
|
|
|
|
| |
Add new test for lv_is_snapshot().
Also move few other bitchecks into same place as remaining bit tests.
TODO: drop lv_is_merging_origin() and keep using lv_is_merging().
|
|
|
|
|
|
|
| |
pvchange -xn was getting lost.
All PVs were set to allocatable again after restore.
Moved setting ALLOCATABLE_PV outside pv_setup().
|
|
|
|
|
|
|
| |
The wrong error value was being checked from lockd_gl()
in two cases.
Clarify the use of lockd_gl() in the lock-start case.
|
|
|
|
| |
libdaemon uses 1 for success
|
|
|
|
|
|
|
| |
The problem addressed by this workaround no longer
seems to exist, so remove it. PVs with no mdas
no longer appear in both their actual VG and in
the orphan VG.
|
|
|
|
| |
_do_lvconvert_lv_dup
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Include brackets for the name if the dev is invisible.
This change applies to all callers of _format_pvsegs fn:
- lvseg_devices (the "lvs -o devices")
- lvseg_metadata_devices (the "lvs -o metadata_devices)
- lvseg_seg_pe_ranges (the "lvs -o seg_pe_ranges")
- lvseg_seg_metadata_le_ranges (the "lvs -o seg_metadata_le_ranges")
|
|
|
|
|
|
|
|
|
| |
invisible devices
The common lv_pool_lv fn avoids code duplication and also
the reporting part now uses _lvname_disp and _uuid_disp to display
name and uuid respectively, including brackets for the name if the
dev is invisible.
|
|
|
|
|
|
|
|
|
| |
invisible devices
The common lv_metadata_lv fn avoids code duplication and also
the reporting part now uses _lvname_disp and _uuid_disp to display
name and uuid respectively, including brackets for the name if the
dev is invisible.
|
|
|
|
|
|
|
|
|
| |
invisible devices
The common lv_data_lv fn avoids code duplication and also
the reporting part now uses _lvname_disp and _uuid_disp to display
name and uuid respectively, including brackets for the name if the
dev is invisible.
|
|
|
|
|
|
|
|
|
| |
invisible devices
The common lv_mirror_log_lv fn avoids code duplication and also
the reporting part now uses _lvname_disp and _uuid_disp to display
name and uuid respectively, including brackets for the name if the
dev is invisible.
|
|
|
|
|
|
|
|
|
| |
invisible devices
The common lv_origin_lv fn avoids code duplication and also
the reporting part now uses _lvname_disp and _uuid_disp to display
name and uuid respectively, including brackets for the name if the
dev is invisible.
|
|
|
|
|
|
|
|
|
| |
invisible devices
The common lv_convert_lv fn avoids code duplication and also
the reporting part now uses _lvname_disp and _uuid_disp to display
name and uuid respectively, including brackets for the name if the
dev is invisible.
|
| |
|
|
|
|
|
| |
Fail with an error message if pvmove tries to move PVs
under the lvmlock LV.
|
|
|
|
| |
_cache_policy_disp fn
|