| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Fix alloc cling to cling to PVs already found with contiguous policy.
|
|
|
|
|
| |
policies it shouldn't be using when --alloc cling is specified but no tags
are defined.
|
|
|
|
| |
Remove some unnecesary prev_lvseg checks.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
pool_lv is not a sub lv in terms for this function.
It has caused problem with renaming thin_volume, where it has tried to
rename pool LV as well.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When mirrors are up-converted, a transient mirror layer is put in so that
only the new devices are sync'ed. That transient layer must carry the tags
of the original mirror LV, otherwise it will fail to activate when activation
is regulated by lvm.conf:activation/volume_list. The conversion would then
fail.
The fix is to do exactly the same thing that is being done for linear ->
mirror converting (lib/metadata/mirror.c:_init_mirror_log()). We copy the
tags temporarily for the new LV and remove them after the activation.
|
|
|
|
|
|
|
|
|
|
|
| |
Snapshots of RAID logical volumes are allowed (including "raid1"). However,
snapshots of "mirror" logical volumes has been disallowed due to unsolvable
issues inherent to the design. The fact that mirroring (dm-raid1.c) must
stop all I/O as the result of a failure and wait for userspace intervention
can lead to a circular dependency if userspace is simultaneously waiting for
snapshots (on mirrors) to make an I/O update before proceeding.
Various snapshot on mirror tests have been removed as a result.
|
|
|
|
|
| |
Mirror and snapshot LVs are already checked for when switching the cluster
attribute of a VG. This patch adds RAID.
|
|
|
|
|
|
| |
If two devices in an array failed, it was previously impossible to replace
just one of them. This patch allows for the replacement of some, but perhaps
not all, failed devices.
|
| |
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
| |
The code should have been calling [suspend|resume]_lv_origin() rather than
[suspend|resume]_lv.
This addresses bug 807069.
|
|
|
|
|
|
|
|
| |
The logic for resuming the original and newly split LVs was not properly
done to handle situations where anything but the last device in the array
was split. It did not take into account the possible name collisions that
might occur when the original LV undergoes the shifting and renaming of its
sub-LVs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Libudev does not provide transactions when querying udev database - once we
get the list of block devices (devices/obtain_device_list_from_udev=1) and
we iterate over the list to get more detailed information about device node
and symlink names used etc., the device could be removed just in between we
get the list and put a query for more info. In this case, libudev returns
NULL value as the device does not exist anymore.
Recently, we've added a warning message to reveal such situations. However,
this could be misleading if the device is not related to the LVM action
we're just processing - the non-related block device could be removed in
parallel and this is not an error but a possible and normal operation.
(N.B. This "missing info" should not happen when devices are related to
the LVM action we're just processing since all such processing should be
synchronized with udev and the udev db must always be in consistent state
after the sync point. But we can't filter this situation out from others,
non-related devices, so we have to lower the message verbosity here for a
general solution.)
|
|
|
|
| |
in the array was specified for removal. This change addresses that (bz806111).
|
|
|
|
| |
Just some missing checks revealed by Coverity in recent code.
|
|
|
|
| |
Just small updates and remove <backtrace> after log_error.
|
|
|
|
|
|
|
|
|
| |
Activation on remote node should be tried only if it is masked by tags
locally (like when hosttags enabled, IOW activate_lv_excl_local()
doesn't return error.)
Introduced change caused that lvchange -aey succeeded even if volume was
activated exclusively remotely.
|
|
|
|
|
|
|
| |
Pvmove should never try to downgrade exclusive lock
for LVs.
This allows pvmove to work again for exclusive activated LVs.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
In this case we should allow to use local mirror, check for cmirror
should apply only for lvconvert/lvcreate.
Introduced in 2.02.86 by removing !(lv->status & ACTIVATE_EXCL).
(Partially workaround, it is minimalistic patch for now.)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Patch https://www.redhat.com/archives/lvm-devel/2012-February/msg00118.html
removed initilization of thin volume monitoring, leaving it only for
thin pool - but missed the code move part for monitoring of thin pools.
Effectively making thin pools not monitorable.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are kernel drivers (smblk) which set '-1' as their device major number.
This number is listed in /proc/devices then - but the kernel itself is using
just 12 bits - thus device is accessible via 4095 - there is posted patch
for 3.4 to fix this behavior (0 for auto allocation was mean to be used).
However to still allow using such devices with older kernels add some code
to use same behavior - so cut 12 bits from the major number from /proc/devices.
For now use log_warn() - maybe the severity of the message could be lowered
to just verbose level.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When down-converting a RAID1 device, it is the last device that is extracted
and removed when the user does not specify a particular device. However,
when a device is specified (and it is not the last), the device is removed and
the remaining sub-LVs are "shifted down" to fill the hole. This cause problems
when resuming the LV because if the shifted devices were resumed (and thus
renamed) before the sub-LV being extracted, there would be a name conflict.
The solution is to resume the extracted sub-LVs first so that they can be
properly renamed preventing a possible conflict.
This addresses bug 801967.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
If specified - use given path without test (Path could be empty)
If autodetection is in use - check for command in available PATH.
|
|
|
|
|
| |
Since we are in error path were vg must be always NULL,
skip call of release_vg() like we do in other places.
|
| |
|
|
|
|
|
|
| |
Save some relocation entries and use directly char[].
Since we do not need yes more then 127 partitions per device, use just int8_t.
Move lvm_type_filter_destroy into local static function.
|
|
|
|
|
| |
Use 'int' counter.
Use 'bad' with goto_bad macro.
|
|
|
|
| |
Here it's not an error case - so do not push this message to stderr.
|
|
|
|
|
|
|
| |
Never return unfinished toolcontext - since error path is hit on
various stages of initialization we cannot leave it partially uninitialized,
since we would need to spread many more test across the code for config_valid.
Instead return NULL and properly release udev library resources as well.
|
| |
|
|
|
|
| |
Avoid use 32bit math for extent_size.
|
|
|
|
|
|
|
|
|
| |
If the lvcreate may decide some automagical values for a user,
try to keep the pool metadata size into 128MB range for optimal
perfomance (as suggested by Joe).
So if the pool metadata size and chunk_size were not specified,
try to select such values they would fit into 128MB 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.
|
|
|
|
|
| |
Prevent 32bit overflow and resulting weird error reports when working
with TB sizes..
|
|
|
|
|
|
| |
Avoid using NULL pointers from udev. It seems like some older versions of udev
were improperly returning NULL in some case, so do not silently break here,
and give at least a warning to the user.
|
|
|
|
| |
Make more obvious, the origin LV for snapshot must be active.
|
| |
|
|
|
|
| |
Don't leave space on EOL.
|