| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
| |
Add missing lockfs option when suspend origin, before thin volume
snapshot is created
|
| |
|
| |
|
| |
|
|
|
|
| |
Change version number suffix from -cvs to -git.
|
|
|
|
|
| |
Do not increase nr_filt in case of NULL ret value, since the error path
doesn't handle NULL pointers.
|
| |
|
| |
|
|
|
|
| |
- The test should be checking the LV as a whole, not just individual segments.
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support has many limitations and lots of FIXMEs inside,
however it makes initial task when user creates a separate LV for
thin pool data and thin metadata already usable, so let's enable
it for testing.
Easiest API:
lvconvert --chunksize XX --thinpool data_lv metadata_lv
More functionality extensions will follow up.
TODO: Code needs some rework since a lot of same code is getting copied.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Looking at the code in cmirrord/local.c, we can see the various different
request types handled in different ways. Some information that is non-changing
does not need to go around the cluster and can be short-circuited. For
example, once the cluster mirror is in-sync, it is pointless to continue
sending that query around the cluster. We can save network bandwidth and reply
directly back to the kernel. When it comes to status information, there are
two types 'TABLE' and 'INFO'. The 'TABLE' information never changes and
belongs to the group of requests that can be safely short-circuited. The
'STATUS' information can change - and will change if a device fails. Thus it
cannot be short-circuited, but this is exactly what was found. The 'STATUS'
information request was being short-circuited and therefore never reporting the
failure condition to anyone other than the "server" that experienced it
directly.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Thanks to agk for providing the patch that prevents resume from attempting
(and then failing) to create error devices which already exist; having been
created by a corresponding suspend operation.
|
|
|
|
|
|
| |
Support lock conversion
Work also with LCK_READ
TODO: do more validation.
|
|
|
|
|
|
| |
Fix thin_pool -> pool_lv
Add more fields supported by thin provisioning.
Keep fields alphabetically sorted for easier lookup.
|
|
|
|
| |
(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.
|
|
|
|
| |
Use one style for man pages.
|
|
|
|
|
|
|
| |
When resizing thin pool - we need to use strip info from _tdata volume.
In future more generic solution will be necessary once we start to support
lvconvert (resize of stacked devices and stay properly aligned).
For now we just allow striped or linear LV so this code will work.
|
|
|
|
|
|
|
| |
When given lvresize new size - round upward for stripes - unless we use % and
we are at the border of free extents.
This patch is not a complete fix and few more cases will need special care.
|
|
|
|
|
| |
If specifying size with % and we are reaching number
of free extents - round downward with stripes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
| |
various dmeventd plug-ins into a new function called 'dmeventd_lvm2_command',
but the new function did not strip off the "_mlog" extentions that the
mirror plug-in had been doing. This created bug 794904 - failure to replace
devices in a redundant log.
The test suite did catch this scenario because it performs repair tests (mainly)
through the CLI and not dmeventd. It's also not easy to test because the test
itself will hang if the bug is encountered.
|
|
|
|
|
|
| |
When vg_read fails, it internally unlocks VG if it's been locked,
so in error path we should skip unlock_vg for this case.
(user would see ugly internal warning)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
devel/~ # lvconvert --splitmirrors 1 -n vg/splitted_one vg/mirrored_one
Internal error: LV name vg/splitted_one has invalid form.
Intermediate VG metadata write failed.
After:
devel/~ # lvconvert --splitmirrors 1 -n vg/splitted_one vg/mirrored_one
Logical volume mirrored_one converted.
devel/~ # lvconvert --splitmirrors 1 -n abc/splitted_one vg/mirrored_one
Please use a single volume group name ("vg" or "abc")
Run `lvconvert --help' for more information.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Calling vgscan alone should reuse information from the lvmetad (if running).
The --cache option should initiate direct device scan and update lvmetad
appropriately (if running).
This is mainly for vgscan to behave consistently compared to pvscan.
|
|
|
|
|
|
|
| |
Pvmove should never try to downgrade exclusive lock
for LVs.
This allows pvmove to work again for exclusive activated LVs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locally or on more nodes while others are activated exclusively.
Current pvmove code can either use local mirror (for exclusive
activation) or cmirror (for clustered LVs).
Because the whole intenal pvmove LV is just segmented LV containing
segments of several top-level LVs, code cannot properly handle
situation if some segment need to be activated exclusively.
Previously, it wrongly activated exclusive LV on all nodes
(locing code allowed it) but now this is no lnger possible.
If there is exclusively activated LV, pvmove is only
possible if all affected LVs are aslo activated exclusively.
(Note that in non-exclusive mode pvmove still activates LVs
on other nodes during move.)
# lvchange -aly vg_test/lv1
# lvchange -aey vg_test/lv2
# pvmove -i 1 /dev/sdc
Error locking on node bar-01: Device or resource busy
Error locking on node bar-03: Volume is busy on another node
...
Failed to activate lv2
|
| |
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
also in error path
|