| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The block of code that acquires the global lock for
process_each_pv() was in the wrong location given
the way report_type is munged, and does not equal
PVS until later in the function.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When ignoring 'listed' volume, print info message.
(So the final command error message is a bit less confusing,
i.e. when user tries to deactive virtual origin:
> lvchange -an vg/lvol2_vorigin
Ignoring virtual origin logical volume vg/lvol2_vorigin.
One or more specified logical volume(s) not found.
(Reapplied after revert.)
|
|
|
|
|
|
| |
Add a workaround for a bug somewhere that can cause
a pv with no mda to appear in both its real vg and
in the orphan vg when not using lvmetad.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "warnings" arg was used to enable logging of warnings
when reading a pv. This arg is turned into a set of flags
with the WARN_PV_READ flag matching the existing behavior.
A new flag WARN_INCONSISTENT is added that will cause
vg_read_internal() to log the "vg is not consistent"
warning, and the various callers do not need to log
this warning themselves.
A new vg_read flag READ_WARN_INCONSISTENT is used from
reporting to enable the WARN_INCONSISTENT flag in
vg_read_internal.
|
|
|
|
| |
In the non-repair case.
|
|
|
|
|
|
| |
Process pvs by iterating through vgs, then iterating through
devs if the command wants to process non-pv devices. The
process_single function can always use the vg and pv args.
|
|
|
|
|
|
|
| |
The ENABLE_ALL_DEVS flag is added to the command structure
for commands that should process all devs (pvs and non-pvs)
when they call process_each_pv and the command includes the
--all arg. This will be used in a later process_each_pv patch.
|
|
|
|
|
| |
The failed_lvnames arg is no longer used since the
cmd_vg replicator wrapper was removed.
|
|
|
|
| |
Include in the error message the lv name args that were not found.
|
|
|
|
|
|
| |
- Copy the same form as the new process_each_vg.
- Replace unused struct cmd_vg and cmd_vg_read() replicator
code with struct vg and vg_read() directly.
|
|
|
|
|
|
|
|
| |
- Split the collecting of arguments from processing them.
- The split allows the two different loops through vgs to
be replaced by a single loop.
- Replace unused struct cmd_vg and cmd_vg_read() replicator
code with struct vg and vg_read() directly.
|
|
|
|
|
|
|
| |
The ALL_VGS_IS_DEFAULT flag is added to the command structure
for commands that should process all vgs when they call
process_each_vg or process_each_lv with no args.
This will be used in later patches to process_each functions.
|
|
|
|
|
|
| |
This reverts commit 7f4b1e7411d7ff59abe2063db7273fd600e2bf72.
will reapply this on top of toollib patch set
|
|
|
|
| |
This reverts commit b0dde9e8f026ddd6799d6ca534ff9523d633c735.
|
|
|
|
| |
This reverts commit 911d6efa51fac96846e109dbff8839cd3fb6cb25.
|
|
|
|
| |
This reverts commit 89e1190ef01943b59207c2093e643a6b06dc9be6.
|
|
|
|
| |
This reverts commit 0d4baeba18646478e1edb7b26a9f9c74d6add1f5.
|
|
|
|
| |
This reverts commit ad60805ffd6a2a5a52c81bc52d818098f674f44e.
|
|
|
|
|
| |
Users will probably run across the alternate syntax,
so we should explain how it relates to what is used here.
|
|
|
|
| |
This reverts commit f120c954fc065d67c1aacd5cfba58843eb552b0f.
|
|
|
|
|
|
|
|
|
| |
We need to use proper filter chain when we disable lvmetad use
explicitly in the code by calling lvmetad_set_active(0) while
overriding existing configuration. We need to reinitialize filters
in this case so proper filter chain is used. The same applies
for the other way round - when we enable lvmetad use explicitly in
the code (though this is not yet used).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not reevaluated for any lvmetad response
With this change, the filter chains used look like this now:
A) When *lvmetad is not used*:
- persistent filter -> regex filter -> sysfs filter ->
global regex filter -> type filter ->
usable device filter(FILTER_MODE_NO_LVMETAD) ->
mpath component filter -> partitioned filter ->
md component filter
B) When *lvmetad is used* (two separate filter chains):
- the lvmetad filter chain used when scanning devs for lvmetad update:
sysfs filter -> global regex filter -> type filter ->
usable device filter(FILTER_MODE_PRE_LVMETAD) ->
mpath component filter -> partitioned filter ->
md component filter
- the filter chain used for lvmetad responses:
persistent filter -> usable device filter(FILTER_MODE_POST_LVMETAD) ->
regex filter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usable device filter is responsible for filtering out unusable DM devices.
The filter has 3 modes of operation:
- FILTER_MODE_NO_LVMETAD:
When this mode is used, we check DM device usability by looking:
- whether device is empty
- whether device is blocked
- whether device is suspended (only on devices/ignore_suspended_devices=1)
- whether device uses an error target
- whether device name/uuid is reserved
- FILTER_MODE_PRE_LVMETAD:
When this mode is used, we check DM device usability by looking:
- whether device is empty
- whether device is suspended (only on devices/ignore_suspended_devices=1)
- whether device uses an error target
- whether device name/uuid is reserved
- FILTER_MODE_POST_LVMETAD:
When this mode is used, we check DM device usability by looking:
- whether device is blocked
- whether device is suspended (only on devices/ignore_suspended_devices=1)
These modes will be used by subsequent patch to create different
instances of this filter, depending on lvmetad use.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
device_is_usable fn
Currently, there are 5 things that device_is_usable function checks
(for DM devices only, of course):
- is device empty?
- is device blocked? (mirror)
- is device suspended?
- is device composed of an error target?
- is device name/uuid reserved?
If answer to any of these questions is "yes", then the device is not usable.
This patch just adds possibility to choose what to check for exactly - the
device_is_usable function now accepts struct dev_usable_check_params make
this selection possible. This is going to be used by subsequent patches.
|
| |
|
|
|
|
|
| |
The existing method for single step thin-pool + thin creation
makes sense.
|
|
|
|
|
|
| |
This reverts commit 17a1869df506a3641d49d52c413b5bc04ec2adc9.
We've agreed on the clearer syntax.
|
|
|
|
|
|
|
|
|
| |
When compiled with valgrind pool support - don't waste time
with preallocation of memory - it just waste of CPU cycles to
trace access to this memory.
We also may get slightly better estimation about real memory usage
during command processing.
|
| |
|
|
|
|
| |
Use new toollib function for validation.
|
|
|
|
| |
Function for parsing and validating of lvname parameter.
|
|
|
|
|
|
|
| |
Update name of function read_and_validate_major_minor
and put it into the right header file toollib.h.
(In release update for f09f85d027d8833)
|
|
|
|
|
|
|
|
|
|
|
| |
Split internals of extract_vgname into _extract_vgname.
This common code will be used for other similar function.
Reuse skip_dev_dir() instead of less mature coded to skip
device dir.
Instead of duplicating full vg/lv name - allocate string
only vg portion of lv name.
|
|
|
|
| |
Detect dev dir just once.
|
|
|
|
|
|
|
|
| |
Revert: --cachepool and --thipnpool is the right way
they both take arg
This is a major difference from --cache and --thin
|
|
|
|
|
|
|
|
| |
Revert: --cachepool and --thipnpool is the right way
they both take arg
This is a major difference from --cache and --thin
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, this was the recommended form for creating a thin pool:
lvconvert --thinpool VG/ThinDataLV --poolmetadata VG/ThinMetaLV
but this is confusing, because --thinpool does not actually take
an arg, and is more naturally used to specify an existing thin pool.
The new recommended form is:
lvconvert --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, this was the recommended form for creating a cache pool:
lvconvert --cachepool VG/CacheDataLV --poolmetadata VG/CacheMetaLV
but this is confusing, because --cachepool does not actually take
an arg, and is more natually used to specify an existing cache pool.
The new recommended form is:
lvconvert --type cache-pool --poolmetadata VG/CacheMetaLV VG/CacheDataLV
|
|
|
|
|
|
| |
lv_info is not used here any more.
This code should have been committed with
lv_check_not_in_use API change commit.
|
|
|
|
|
|
|
|
| |
We are not using already defined segement type names where we could.
There is a lot of other places in device-mapper and LVM2 we have those
hardcoded so we should better finally have a common interface in
libdevmapper to avoid this.
|
|
|
|
|
|
| |
When there is need for using gdb within test suite
just prefix command with LVM_DBG and run test in
standard shell (for stdin).
|
|
|
|
| |
We cannot use shell expansion for dmsetup here.
|
|
|
|
|
| |
Since we leave error printing on the called of deactivation,
at least put in debug log for this case.
|
| |
|
|
|
|
| |
Not having labeller on device is not reason eo generate backtrace in log.
|
| |
|
| |
|
|
|
|
| |
Save some code lines.
|
|
|
|
| |
const char == const char const.
|