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

277 Commits

Author SHA1 Message Date
Zdenek Kabelac
27d556de9e tests: enhance snapshot test
Improve cleanup routine and use it also for vg removal.
2014-03-17 14:31:45 +01:00
Zdenek Kabelac
95f74af404 tests: skip mangling test
Mangling is only using dmsetup commands,
so there is no lvm command and no contact with
clvmd nor lvmetad so skip this test there.
2014-03-17 14:31:45 +01:00
Zdenek Kabelac
909e2207bd tests: test spare volume removal 2014-03-17 14:31:44 +01:00
Zdenek Kabelac
404593c710 tests: more coverage 2014-03-17 14:31:44 +01:00
Peter Rajnoha
12eb284eec tests: fix name-mangling test
We need to use "--verifyudev" for dmsetup mangle command used in
the name-mangling test since without the --verifyudev, we'd end up
with the failed rename.

Also, add direct check for the dev nodes - node with old name must
be gone and node with new name must be present. Before, we checked
just the output of the command.

One bug popped up here when renaming with udev and libdevmapper
fallback checking the udev when target mangle mode is "none"
(fixme added in the libdevmapper's node rename code).
2014-03-17 11:51:30 +01:00
Zdenek Kabelac
a2c64e21fd tests: check we are no reading pool device 2014-03-12 00:26:47 +01:00
Zdenek Kabelac
dd690d5fd1 tests: add inactive pool creation test 2014-03-12 00:25:59 +01:00
Zdenek Kabelac
41e1b12e03 tests: skip another kernel
This kernel has still buggy kmem_cache debugging so skip it for raid456.
2014-03-10 12:24:10 +01:00
Zdenek Kabelac
d913fcbd46 tests: improve wait for open
Add loop to detect open device from 'sleep <'
2014-03-10 12:24:10 +01:00
Zdenek Kabelac
fa23234e71 tests: reuse existing check dev_md5sum
Create md5sum in reusable way and use exiting check function.
2014-03-10 12:24:10 +01:00
Zdenek Kabelac
ef1d910dee tests: updates for new test
snaphost needs exclusive origin for cluster
older md5 needs 2 space char
2014-03-06 18:01:21 +01:00
Zdenek Kabelac
6b561a7a3b tests: check created snapshot has good max size
Testing if we are creating large enough old-snapshot
(so the COW max size is correct)
https://bugzilla.redhat.com/show_bug.cgi?id=1035871
2014-03-06 17:30:10 +01:00
Zdenek Kabelac
d0673b0ddc tests: detect old-snap metadata consitency
Add some test for correctness of snapshot metadata.
Based upon original test from Mikulas.
Needs correctly working kernel snapshot target.
2014-03-06 17:30:10 +01:00
Peter Rajnoha
cfc9e178bf tests: fix name-mangling test and remove udev transaction in dmsetup wrapper 2014-03-06 14:46:50 +01:00
Petr Rockai
3c9887467f test: Use correct path to /dev in lvchange-raid.sh. 2014-03-05 10:22:39 +01:00
Zdenek Kabelac
52007a9191 tests: split raid test
Use separate files for raid1, raid456, raid10.
They need different target versions to work, so support
more precise test selection.

Optimize duplicate tests of target avalability and skip
unsupported test cases sooner.
2014-03-03 11:23:57 +01:00
Marian Csontos
445c0a5585 test: Remove incorrect evaluation 2014-03-03 08:31:33 +01:00
Zdenek Kabelac
33d69162e4 tests: split raid test
Use separate test file for raid456
Change test for broken kernel which has broken raid456 support.
2014-03-02 21:27:26 +01:00
Zdenek Kabelac
3ff10f5e61 tests: disable test which leaks node
This test is not detected as fault but leak device node
on a real /dev.
Added FIXME.
2014-03-02 21:27:26 +01:00
Zdenek Kabelac
a2af5855c5 tests: use longer sleep
Eplore why 30sec is not enough for hydra and try higher value.
2014-03-02 21:27:25 +01:00
Petr Rockai
fade191aed test: Test that we cope with stray device nodes. 2014-03-02 20:53:43 +01:00
Petr Rockai
3b958984f1 test: Properly synchronize direct dmsetup calls. 2014-03-02 20:53:43 +01:00
Zdenek Kabelac
72ecf8e591 tests: detect reiserfs support
Since reiserfs is not commonly available detect its presence in kernel.
Stop reporting skipped test as WARNING.
2014-03-01 14:08:59 +01:00
Petr Rockai
daa897fe90 test: Fix stat calls in lvmetad-pvscan-filter. 2014-02-28 23:33:30 +01:00
Petr Rockai
1bb29bb402 test: Downgrade lvmetad-lvm1 failure to a warning. 2014-02-28 23:33:17 +01:00
Petr Rockai
f3b9fe6024 test: Add lvmetad_talk and lvmetad_dump to aux. 2014-02-28 11:23:53 +01:00
Petr Rockai
bf29eabdba lvmetad: Keep the cache consistent when a PV moves around.
In cases where PV appears on a new device without disappearing from an old one
first, the device->pvid pointers could become ambiguous. This could cause the
ambiguous PV to be lost from the cache when a different PV comes up on one of
the ambiguous devices.
2014-02-28 11:23:52 +01:00
Petr Rockai
a368698672 lvmetad: Hide corrupt MDAs from the cache.
This is probably not optimal, but makes the lvmetad case mimic non-lvmetad code
more closely. It also fixes vgremove of a partially corrupt VG with lvmetad, as
_vg_write_raw (and consequently, entire vg_write) currently panics when it
encounters a corrupt MDA. Ideally, we'd be able to explicitly control when it is
safe to ignore them.
2014-02-28 11:23:52 +01:00
Jonathan Brassow
38ab4c31a6 test: warn rather than fail when %FREE isn't working right
%FREE allocation has been broken for RAID.  At 100%FREE, there is
still an extent left for certain tests.  For now, change the test
to warn rather than completely fail.
2014-02-27 22:47:30 -06:00
Zdenek Kabelac
a7dc422bde tests: remove extra vgremove
These vgremove calls were not correct.
2014-02-27 14:53:33 +01:00
Zdenek Kabelac
c23cd12023 tests: quote dev 2014-02-27 14:49:49 +01:00
Zdenek Kabelac
f4afd07700 tests: drop remove
Generates waaaaay too much log from lvmetad test.

TODO: once we will be able to remove more LVs with a single
write - we may restore....
2014-02-27 14:48:32 +01:00
Zdenek Kabelac
47b15b805e tests: updates
Add some vgremove calls.
Remove uneeded test for some unused commands.
Add tests for missing commands.
2014-02-27 13:01:04 +01:00
Zdenek Kabelac
d00fc1de78 snapshot: correct previous snapshot commit
Condition was swapped - however since it's been based on 'random'
memory content it's been missed as attribute has not been set.

So now we have quite a few possible results when testing.

We have old status without separate metadata and
we have kernels with fixed snapshot leak bug.

(in-release update)
2014-02-27 13:00:49 +01:00
Zdenek Kabelac
40e6176d25 snapshots: fix incorrect calculation of cow size
Code uses target driver version for better estimation of
max size of COW device for snapshot.

The bug can be tested with this script:
VG=vg1
lvremove -f $VG/origin
set -e
lvcreate -L 2143289344b -n origin $VG
lvcreate -n snap -c 8k -L 2304M -s $VG/origin
dd if=/dev/zero of=/dev/$VG/snap bs=1M count=2044 oflag=direct

The bug happens when these two conditions are met
* origin size is divisible by (chunk_size/16) - so that the last
  metadata area is filled completely
* the miscalculated snapshot metadata size is divisible by extent size -
  so that there is no padding to extent boundary which would otherwise
  save us

Signed-off-by:Mikulas Patocka <mpatocka@redhat.com>
2014-02-26 14:25:09 +01:00
Zhiqing Zhang
014ba37cb1 lvresize: fix stripe size validation
While stripe size is twice the physical extent size,
the original code will not reduce stripe size to maximum
(physical extent size).

Signed-off-by: Zhiqing Zhang <zhangzq.fnst@cn.fujitsu.com>
2014-02-26 13:25:50 +01:00
Zdenek Kabelac
b5e03c88b8 tests: support for older snapshot target version
TODO: unsure about 1.10...
2014-02-26 11:17:39 +01:00
Zdenek Kabelac
aef6016011 tests: improve read-only test for snapshot
Switch to use ext2 to make it usable on older systems.
Previous test has not been able to catching problem.

Multiple tests are now put in.

FIXME: validate what is doing kernel target when
the header is undeleted and same chunk size is used.

It seems snapshot target successfully resumes and
just complains COW is not big enough:

kernel: dm-8: rw=0, want=40, limit=24
kernel: attempt to access beyond end of device

When chunk size is different it fails instantly.

For checking this with lvm2 and this test case use this patch:

--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -769,7 +769,7 @@ static int _read_activation_params(struct
lvcreate_params *lp,
        lp->permission = arg_uint_value(cmd, permission_ARG,
                                        LVM_READ | LVM_WRITE);

-       if (lp->snapshot) {
+       if (0 && lp->snapshot) {
                /* Snapshot has to zero COW header */
                lp->zero = 1;
                lp->wipe_signatures = 0;

---
and switch to use  -c 4 for both snapshots
2014-02-26 10:19:46 +01:00
Zdenek Kabelac
2b044452e3 snapshot: zero cow header for read-only snapshot
When read-only snapshot was created, tool was skipping header
initialization of cow device.  If it happened device has been
already containing header from some previous snapshot, it's
been 'reused' for a newly created snapshot instead of being cleared.
2014-02-26 00:22:46 +01:00
Zdenek Kabelac
3e49753e6c tests: cache needs 1.3 2014-02-25 09:36:07 +01:00
Zdenek Kabelac
8083143822 tests: add extra wait
Parallel upconvert & downconvert is now tested separately
in lvconvert-mirror-updown.sh
2014-02-24 21:13:36 +01:00
Zdenek Kabelac
32138969f9 tests: enhance thin test
Add more tests to also check validaty of transaction_id
and also detect we are not leaving active unusable thin pool LVs.
2014-02-24 21:13:36 +01:00
Zdenek Kabelac
9c9f4515ae tests: add some quotes
Use quotes for DM_DEV_DIR
2014-02-24 21:13:36 +01:00
Jonathan Brassow
ee89ac7b88 pvmove: Disallow pvmove of cache LVs
Skip over LVs that have a cache LV in their tree of LV dependencies
when performing a pvmove.

This means that users cannot move a cache pool or a cache LV's origin -
even when that cache LV is used as part of another LV (e.g. a thin pool).

The new test (pvmove-cache-segtypes.sh) currently builds up various LV
stacks that incorporate cache LVs.  pvmove tests are then performed to
ensure that cache related LVs are /not/ moved.  Once pvmove is enabled
for cache, those tests will switch to ensuring that the LVs /are/
moved.
2014-02-24 12:25:18 -06:00
Jonathan Brassow
46223c4284 test: move RAID10 tests from lvcreate-raid.sh to lvcreate-raid10.sh 2014-02-21 18:28:16 -06:00
Petr Rockai
294671fa62 test: Only try raid10 on dm-raid versions that support it. 2014-02-21 19:47:06 +01:00
Zdenek Kabelac
5e83682ccf tests: add small test for clustered conversion of mirror
Test currently fails with make check_cluster - so uses 'should'

CLVMD[4f435880]: Feb 19 23:27:36 Send local reply
format_text/archiver.c:230   WARNING: This metadata update is NOT backed up
metadata/mirror.c:1105   Failed to initialize log device
metadata/mirror.c:1145         <backtrace>
lvconvert.c:1547         <backtrace>
lvconvert.c:3084         <backtrace>
2014-02-19 23:34:07 +01:00
Jonathan Brassow
00ce01e52d cache-pool: Change segtype name from cache_pool to cache-pool
Thin pools use "thin-pool" for the segment type name.  To be consistent,
we use "cache-pool" instead of "cache_pool".
2014-02-19 09:26:03 -06:00
Zdenek Kabelac
c71a3bcbc0 activation: lv_activation_skip remove always same arg.
Remove 'skip' argument passed into the function.
We always used '0' - as this is the only supported
option (-K) and there is no complementary option.

Also add some testing for behaviour of skipping.
2014-02-19 11:33:39 +01:00
Zdenek Kabelac
fdcd95a3b3 tests: check locking is not lost during thin_check 2014-02-18 14:58:41 +01:00