| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
|
|
|
|
| |
Global change from --discard to --discards, as that feels more natural.
|
|
|
|
| |
Log (very verbose) the target version present in target_version.
|
|
|
|
|
| |
Add shell variable to override reported min version for testing:
LVM_THIN_VERSION_MIN
|
|
|
|
|
|
|
| |
Change 'lv_passes_volumes_filter' fn back to static as it's not
actually needed in the other code (a remnant from devel version).
Fix lvm.conf comment referencing '--autoactivate' which was finally
decided to be '--activate ay'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define an 'activation_handler' that gets called automatically on
PV appearance/disappearance while processing the lvmetad_pv_found
and lvmetad_pv_gone functions that are supposed to update the
lvmetad state based on PV availability state. For now, the actual
support is for PV appearance only, leaving room for PV disappearance
support as well (which is a more complex problem to solve as this
needs to count with possible device stack).
Add a new activation change mode - CHANGE_AAY exposed as
'--activate ay/-aay' argument ('activate automatically').
Factor out the vgchange activation functionality for use in other
tools (like pvscan...).
|
|
|
|
|
| |
Add missing lockfs option when suspend origin, before thin volume
snapshot is created
|
|
|
|
| |
- The test should be checking the LV as a whole, not just individual segments.
|
|
|
|
| |
(E.g. lvchange --refresh --partial on striped LV if a PV disappeared.)
|
|
|
|
|
|
|
|
|
|
| |
The 'mirror' segtype and 'raid1' segtype both set the 'MIRRORED' flag.
However, due to differences in the way these device-mapper targets behave
'mirror' must be suspended with the 'noflush' option and 'raid1' does not
have to be.
This patch ensures that when the 'MIRRORED' flag is checked to see if
'noflush' is needed that it does not also set it for 'raid1' by mistake.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code adds better support for monitoring of thin pool devices.
update_pool_lv uses DMEVENTD_MONITOR_IGNORE to not manipulate with monitoring.
vgchange & lvchange are checking real thin pool device for existance
as we are using _tpool real device and visible LV pool device might not
be even active (_tpool is activated implicitely for any thin volume).
monitor_dev_for_events is another _lv_postorder like code it might be worth
to think about reusing it here - for now update the code to properly
monitory thin volume deps.
For unmonitoring add extra code to check the usage of thin pool - in case it's in use
unmonitoring of thin volume is skipped.
|
|
|
|
|
|
|
| |
Update a way we handle option passing - so we now support path and options
with space inside.
Fix dm name usage for thin pools with '-' in name.
Use new lvm.conf option thin_check_options to pass in options as string array.
|
|
|
|
| |
Avoid use 32bit math for extent_size.
|
|
|
|
|
|
|
|
| |
Use thin_dump --repair suggestion in log error message
and use just warning on deactivation path without repair info
(since node has been deactivated).
Also check whether there is not 16 args for thin_check configured.
|
|
|
|
|
|
|
|
| |
Use libdm callback to execute thin_check before activation
thin pool and after deactivation as well.
Supporting thin_check_executable which may pass in extra options for
the tool.
|
|
|
|
| |
alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
|
|
|
|
|
|
|
| |
lv_is_active doesn't needs modifiable LV struct so keep it const.
Remove lv_send_message() left bits from code -
they were never released in 2.02.89.
|
|
|
|
| |
lvm.conf *and* lvmetad is running.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 02f6f4902fd90709f55e2e97e969ee28c2945c81 introduced a bug that caused
RAID devices to fail to activate if the device for a single sub-LV failed.
The special case of LVM mirror was handled, but not LVM RAID.
EXAMPLE:
[root@bp-01 ~]# devices vg
LV Copy% Devices
lv 100.00 lv_rimage_0(0),lv_rimage_1(0)
[lv_rimage_0] /dev/sde1(1)
[lv_rimage_1] /dev/sdh1(1)
[lv_rmeta_0] /dev/sde1(0)
[lv_rmeta_1] /dev/sdh1(0)
[root@bp-01 ~]# vgchange -an vg
0 logical volume(s) in volume group "vg" now active
[root@bp-01 ~]# off.sh sdh
Turning off sdh
[root@bp-01 ~]# vgchange -ay vg --partial
Partial mode. Incomplete logical volumes will be processed.
Couldn't find device with uuid fbI0YO-GX7x-firU-Vy5o-vzwx-vAKZ-feRxfF.
Cannot activate vg/lv_rimage_1: all segments missing.
0 logical volume(s) in volume group "vg" now active
AFTER this patch:
[root@bp-01 ~]# vgchange -ay vg --partial
Partial mode. Incomplete logical volumes will be processed.
Couldn't find device with uuid fbI0YO-GX7x-firU-Vy5o-vzwx-vAKZ-feRxfF.
1 logical volume(s) in volume group "vg" now active
[root@bp-01 ~]# devices vg
Couldn't find device with uuid fbI0YO-GX7x-firU-Vy5o-vzwx-vAKZ-feRxfF.
LV Copy% Devices
lv 100.00 lv_rimage_0(0),lv_rimage_1(0)
[lv_rimage_0] /dev/sde1(1)
[lv_rimage_1] unknown device(1)
[lv_rmeta_0] /dev/sde1(0)
[lv_rmeta_1] unknown device(0)
[root@bp-01 ~]# dmsetup table vg-lv; dmsetup status vg-lv
0 1024000 raid raid1 3 0 region_size 1024 2 253:2 253:3 - -
0 1024000 raid raid1 2 AD 1024000/1024000
No WHATSNEW update necessary because this is an intrarelease fix.
brassow
|
| |
|
|
|
|
|
| |
If lstat returns errno different from ENOENT, do not use the content of
struct stat 'buf'.
|
|
|
|
|
|
|
|
|
|
| |
Count number of error and existing areas and if there is no existing area
for the LV avoid its activation.
Always disable partial activatio for thin volumes.
For mirrors currently put in hack to let it pass with a special name
since current mirror code needs to activate such LV during some operations.
|
|
|
|
|
|
| |
For reading % of mapped size of thin volume use as origin for
old style snapshot '-real' device needs to be queried.
Fix log_error report given for lvs -a in this case.
|
|
|
|
| |
Also always initialize maj,min,patchlevel when success is returned.
|
|
|
|
|
| |
During release preparation things has changed, so making sure
we are compilable with --disable-devmapper.
|
|
|
|
|
| |
Since now we have more layered devices i.e. thin volumes - support
selection of layer via flag.
|
| |
|
|
|
|
|
|
|
|
| |
Extend the usage of origin_only flag to allow resume of thin pool LV
(when it's active) to pass only the messages.
origin_only flag will skip detection of already resumed tree for thin_pool,
so we do not need to suspend the tree and we just send messages.
|
|
|
|
|
|
|
|
|
|
| |
Pass in the origin_only flag also for thin volumes - but curently the flag
is not used to its best.
FIXME: achieve the state where only thin volume snapshot origin is
suspended without its childrens - let's explore whether this may
happen automatically inside libdm (might be generic for other targets).
So the code would not need to annotate the node for this.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend lv_activate_opts with bool flag to know for which purpose
dtree is created - and add message only for activation tree
(since that's the only place that may send them).
Extend validation check for thin snapshot creation and test whether
active snapshot origin is suspended before its snapshot is created
(useful in recover scenarios) - in this case also detect, whether
transaction has been already completed and avoid such suspend check
failure in that case.
|
|
|
|
|
|
|
| |
If the origin_only flag is passed for non lv_is_origin LVs,
the extension is not added.
Thin volumes may also use origin_only flag.
|
|
|
|
|
| |
Move comment where it applies and remove unused attribe when the var
is actually used.
|
|
|
|
| |
Easy function to get transaction_id status value.
|
|
|
|
|
|
|
|
|
| |
Similar to the "mirror" segment type's log device, _add_dev_to_dtree should
be called and not _add_lv_to_dtree when adding metadata sub-LVs to the deptree.
Since _add_lv_to_dtree was being called, 'origin_only' could be set if a
snapshot sits on top of the RAID device. This would cause the actual device
that needed to be added to be skipped in favor of the non-existant device,
"<foo>-real".
|
|
|
|
| |
remote nodes and address some existing anomalies.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch to the suspend code - like the similar change for resume -
queries the lock mode of a cluster volume and records whether it is active
exclusively. This is necessary for suspend due to the possibility of
preloading targets. Failure to check to exclusivity causes the cluster target
of an exclusively activated mirror to be used when converting - rather than
the single machine target.
|
|
|
|
|
|
| |
This value returns percentage of 'mapped' size compared with total LV size.
(Without passed seg pointer it return highest mapped size - but it's
not used yet.)
|
|
|
|
|
| |
Support to check also for metadata percent
(By checking whether seg pointer is set)
|
|
|
|
| |
Better fits the code.
|
|
|
|
| |
Use '_' for local const char.
|
|
|
|
| |
"warning: assignment discards 'const' qualifier..."
|
| |
|
| |
|
|
|
|
| |
dev manager function to read percent info from thin pool.
|
|
|
|
|
| |
This is basic version with still few unresolved issue mainly in case,
when the pool resize is failing.
|
| |
|
| |
|