1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

93 Commits

Author SHA1 Message Date
Petr Rockai
60668f823e Automatically restore MISSING PVs with no MDAs. 2012-11-25 20:41:56 +01:00
Zdenek Kabelac
400f644286 lv_manip: fix regresion from bf2741376d
Commit bf2741376d started to use
lv_is_active() instead of call for lv_info & info.exists so
we cover also cluster activated devices.
For snapshost the conversion was not correct and introduced
regression by blocking creation of snapshot of inactive LV.

Fix it by assigning lv_is_active() directly.
Note: we still have minor issue to fix - to make
lv_is_???? function able to return error states since
lv_info() may fail.
2012-11-21 12:15:09 +01:00
Zdenek Kabelac
a7893ae858 test: testing lvconvert 2012-11-19 14:38:17 +01:00
Petr Rockai
09d77d0c94 test: Check that overriding use_lvmetad with --config works. 2012-10-30 09:16:15 +01:00
Petr Rockai
2fdd0840d5 lvmetad: Disable and warn when locking_type is 3. 2012-10-25 14:31:08 +02:00
Zdenek Kabelac
c7c53ad41d pvcreate: fix leak on error path
Missing vg release on error path.
Add tests for few more error cases.
2012-10-19 15:32:21 +02:00
Jonathan Brassow
831ce3cda9 TEST: Re-add testing of lvconvert-raid for kernels < 3.2
I'm not sure what 'BUG's were being encountered when the restriction
to limit lvconvert-raid.sh tests to kernels > 3.2 was added.  I do know
that there were BUG's that could be triggered when testing snapshots and
some of the earliest DM RAID available in the kernel.  I've taken out
the 3.2 kernel restriction and added a dm-raid >= 1.2 restriction instead.
This will allow the test to run on patched production kernels.
2012-10-15 15:43:15 -05:00
Zdenek Kabelac
d864c6eacd test: resync is for mirror devices 2012-10-15 14:31:41 +02:00
Zdenek Kabelac
faa9a52085 test: detect compilation with readline
check lvm shell functionality only if compiled with readline.
2012-10-15 14:07:06 +02:00
Zdenek Kabelac
3972bd98fb thin: add support to unmount volumes
Reset counter after thin pool resize failure.

If the pool goes above threshold, support unmounting
of all thin volumes if the lvextend fails to avoid
overfilling of the pool.
2012-10-14 23:19:20 +02:00
Zdenek Kabelac
c6f2821b9f test: speedup a bit
Do not wait full 10s if the invalid snapshot is already dropped.
2012-10-14 23:17:33 +02:00
Zdenek Kabelac
a6f53b5c0d test: coverage
Improve a bit code coverage.
Use lvm shell to reduce a bit CPU time.
2012-10-14 23:14:48 +02:00
Zdenek Kabelac
98124361ae test: update global_filter
use simplier filter for test suite
2012-10-12 17:59:11 +02:00
Zdenek Kabelac
bb867abe11 test: typo fix from last commit 2012-10-12 17:35:44 +02:00
Zdenek Kabelac
45b1fcdb4e test: move global_filter only to mdata_string test
Tries to help with lvmetad test and pvdisplay and unknown device.
2012-10-12 17:27:29 +02:00
Zdenek Kabelac
3058f662cf thin: prohibit lvcreate --thinpool with mirrors
Disable --thinpool to be used with mirror on lvcreate.
2012-10-12 12:21:45 +02:00
Petr Rockai
d6d207006a lvmetad: Fix the fix for 813766 (lvmetad connection warning). 2012-10-12 11:22:47 +02:00
Petr Rockai
413d91dc29 test: Add lvmetad-dump.sh. 2012-10-11 20:32:25 +02:00
Petr Rockai
b165e9f3f8 test: Skip lvconvert-raid on kernels < 3.2 since they BUG out. 2012-10-11 18:13:37 +02:00
Zdenek Kabelac
316ce655a3 thin: raise required version to 1.4
Stay safe and require 1.4 (kernel 3.6) for non-power-of-2
support for thin pool chunk_size.
2012-10-11 14:09:07 +02:00
Petr Rockai
57460fe5a8 test: Skip the topology test if setting up scsi_debug fails. 2012-10-11 11:51:04 +02:00
Petr Rockai
deea86c7f4 pvscan --cache: Also read metadata from LVM1 PVs (BZ 863401). 2012-10-10 21:55:24 +02:00
Zdenek Kabelac
14283662b9 test: use exclusive activation for created mirrors 2012-10-10 21:22:12 +02:00
Zdenek Kabelac
9db5217a31 test: thin support for non power of 2 chunk size 2012-10-10 21:22:12 +02:00
Zdenek Kabelac
876514eb34 test: drop clustered flag control from thin tests 2012-10-10 21:22:12 +02:00
Zdenek Kabelac
d4eded9fd6 test: move common code for thin init 2012-10-10 21:22:11 +02:00
Jonathan Brassow
b296e30f98 TEST: Add lvchange-partial.sh and vgchange-partial.sh to the test suite
Commit 3501f17fd0 enables a limited set
of metadata updates for partial LV/VGs when issuing lvchange or vgchange.
These tests verify those changes operate as intended.
2012-10-10 11:47:04 -05:00
Petr Rockai
f65754e6fc test: Check that lvmetad is refreshed correctly on restart. 2012-10-10 13:54:36 +02:00
Petr Rockai
71d718a4a4 lvmetad: Warn if lvmetad is running but disabled. 2012-10-10 13:54:29 +02:00
Petr Rockai
6e523f01d0 test: Skip thin tests if thin support is configured out. 2012-10-10 00:20:22 +02:00
Zdenek Kabelac
439989adab test: more thin tests 2012-10-09 16:38:42 +02:00
Zdenek Kabelac
d7b3179669 test: move raid10 test into separate test files
New features tested in new files.
2012-10-09 16:38:12 +02:00
Zdenek Kabelac
93d7d3ed2c test: split raid tests
Separate original raid test and new raid10 test,
so the old could be tested on platforms without raid10 support.

Replace test-unfriendly `ls /dev/mapper`   with  dmsetup ls
2012-10-09 12:22:26 +02:00
Petr Rockai
9ff2f1a3db TEST: Check that LVM1 VGs work when using lvmetad (BZ 863401). 2012-10-09 07:59:53 +02:00
Zdenek Kabelac
3877ccfe1b test: move raid test to separate tests
Revert changes to origin lvcreate-large test and use separate
test scripts for raid  - so they can be properly skipped when
kernel doesn't support raid targets.
2012-10-08 14:49:21 +02:00
Petr Rockai
0dfafd77d4 TEST: Only run the pvscan --cache test with lvmetad active. 2012-10-08 07:23:13 +02:00
Petr Rockai
e702073235 TEST: Add lvmetad-pvscan-cache to check that pvscan --cache works. 2012-10-07 22:32:32 +02:00
Jonathan Brassow
886656e4ac RAID: Fix problems with creating, extending and converting large RAID LVs
MD's bitmaps can handle 2^21 regions at most.  The RAID code has always
used a region_size of 1024 sectors.  That means the size of a RAID LV was
limited to 1TiB.  (The user can adjust the region_size when creating a
RAID LV, which can affect the maximum size.)  Thus, creating, extending or
converting to a RAID LV greater than 1TiB would result in a failure to
load the new device-mapper table.

Again, the size of the RAID LV is not limited by how much space is allocated
for the metadata area, but by the limitations of the MD bitmap.  Therefore,
we must adjust the 'region_size' to ensure that the number of regions does
not exceed the limit.  I've added code to do this when extending a RAID LV
(which covers 'create' and 'extend' operations) and when up-converting -
specifically from linear to RAID1.
2012-09-27 16:51:22 -05:00
Petr Rockai
f8e287cca2 TEST: Workaround for lvmetad vs inconsistent metadata. 2012-09-26 17:26:23 +02:00
Jonathan Brassow
2e04681248 mirror: 'lvconvert --resync' should reset LV_NOTSYNCED on corelog mirror
When reformatting the 'lvchange_resync' code in commit
05131f5853, a '!' should have been removed
from the condition that checks for the LV_NOTSYNCED flag on a corelog
mirror LV.  The presence of this '!' caused the LV_NOTSYNCED flag to be
cleared when it wasn't present and left when it was present.

It is not allowed to add images to a 'mirror' or 'raid1' LV if the
LV_NOTSYNCED flag is set.  We add some up-convert tests to ensure this
behavior is being enforced and that the LV_NOTSYNCED flag is being
properly cleared by 'lvchange --resync'.

(Not updating WHATS_NEW because this is intrarelease.)
2012-09-19 11:16:45 -05:00
Jonathan Brassow
5cdd7848f4 TEST: Add missing test for RAID module version
RAID10 was added to dm-raid module version 1.3.0.  Omitted test for
this version is causing test suite to fail.
2012-09-12 06:27:37 -05:00
Jonathan Brassow
1b01a2f65a TEST (lvresize-raid): Also test resizing of RAID10 2012-09-05 11:33:07 -05:00
Peter Rajnoha
2a70e98b05 test: snapshot_extend_threshold -> snapshot_autoextend_threshold
Missing the "auto" prefix in the config key name. The unknown
setting is silently ignored otherwise.
2012-08-27 14:04:21 +02:00
Jonathan Brassow
4047e4dfb1 RAID: Add support for RAID10
This patch adds support for RAID10.  It is not the default at this
stage.  The user needs to specify '--type raid10' if they would like
RAID10 instead of stacked mirror over stripe.
2012-08-24 15:34:19 -05:00
Petr Rockai
20ca6d6545 TEST: Add lvmetad-test; checks --test with lvmetad. 2012-07-30 11:21:55 +02:00
Jonathan Brassow
599f18db8a TEST: Conditionalize RAID tests on whether the dm-raid module exists 2012-07-25 09:43:28 -05:00
Jonathan Brassow
5555d2a000 RAID: Fix segfault when attempting to replace RAID 4/5/6 device
Commit 8767435ef8 allowed RAID 4/5/6
LV to be extended properly, but introduced a regression in device
replacement - a critical component of fault tolerance.

When only 1 or 2 drives are being replaced, the 'area_count' needed
can be equal to the parity_count.  The 'area_multiple' for RAID 4/5/6
was computed as 'area_count - parity_devs', which could result in
'area_multiple' being 0.  This would ultimately lead to a division by
zero error.  Therefore, in calc_area_multiple, it is important to take
into account the number of areas that are being requested - just as
we already do in _alloc_init.
2012-07-24 19:02:06 -05:00
Jonathan Brassow
407198e17d TEST: Replace old sync test/wait functions with new library functions
Generic sync test/wait functions have replaced the old mirror/raid functions.
2012-07-24 14:20:30 -05:00
Jonathan Brassow
00d9bf8107 TEST (lvresize-raid): Don't run test when RAID module doesn't exist
Check for RAID module and skip test if not there.
2012-07-17 10:50:21 -05:00
Jonathan Brassow
8767435ef8 RAID: Fix extending size of RAID 4/5/6 logical volumes.
Reducing a RAID 4/5/6 LV or extending it with a different number of
stripes is still not implemented.  This patch covers the "simple" case
where the LV is extended with the same number of stripes as the orginal.
2012-06-26 09:44:54 -05:00