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

26 Commits

Author SHA1 Message Date
Zdenek Kabelac
57a16abe2c tests: do not use |&
Bash 3.2  doesn't understand this syntax (i.e. RHEL5).
And it's even better - reports syntax error and return success.
2015-05-14 10:52:55 +02:00
Ondrej Kozina
e587b0677b lvmpolld: Add standalone polldaemon.
See doc/lvmpolld_overview.txt
2015-05-09 00:59:18 +01:00
Zdenek Kabelac
95dbedb301 tests: move exa test to separate file
Make it visible the 'exa' test passed on an arch.
2015-04-02 13:38:41 +02:00
Zdenek Kabelac
8d8c1b6624 tests: use snapshot targets 2014-11-19 23:24:18 +01:00
Zdenek Kabelac
e7c130430a tests: explicitely use old snapshots 2014-10-31 00:28:25 +01:00
Zdenek Kabelac
e1dede6f6b tests: new lvcreate functionality
Fixed syntax parsing means that some commands that used to work are now
failing. Particullary this case:

$ invalid lvcreate -l1 --type thin vg/pool
> Needs to fail becase thin type LV needs  --virtualsize

$ invalid lvcreate --type snapshot vg/lv1
> Needs to fail because old-snapshot segment type needs --size

Some reported error messages have been also updated.
2014-10-24 16:39:32 +02:00
Zdenek Kabelac
93597bcbdc tests: add udev sync point
Missed synchronization with udev may lead to error on vgcreate,
if previous vgremove was not handled fast enough by udev.
2014-06-20 11:14:29 +02:00
Zdenek Kabelac
378fa9d158 tests: check new snapshot skills 2014-06-17 13:43:05 +02:00
Zdenek Kabelac
5c5177c37c tests: rename test to inittest
We are getting into problem when we use 'test' for commands like
should/not/...

So avoid overloading test name and change it to inittest.
2014-06-10 10:51:27 +02:00
Zdenek Kabelac
c4e0c61272 tests: typo 2014-06-05 17:49:35 +02:00
Zdenek Kabelac
7b766b0648 tests: updates
Move thin test out of listing.
2014-05-13 10:28:55 +02:00
Zdenek Kabelac
e3d208f7c2 tests: put vars in quotes
This shell var has space in middle
2014-03-17 16:30:52 +01:00
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
d913fcbd46 tests: improve wait for open
Add loop to detect open device from 'sleep <'
2014-03-10 12:24:10 +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
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
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
9c9f4515ae tests: add some quotes
Use quotes for DM_DEV_DIR
2014-02-24 21:13:36 +01:00
Zdenek Kabelac
8eedb18c73 tests: add short delay
Give some extra delay so the file will be opened.
2014-02-17 22:25:53 +01:00
Zdenek Kabelac
fe609141a8 tests: on 32bit test with <16T devs
Add  'can_use_16T' to detect systems where we could
safely use 16T devices without causing system deadlocks.

16T size leads on those to endless loops in udevd
- it calls blkid which tries cached read from such device
- this ends in endless loop.

Related problems:
https://bugzilla.redhat.com/show_bug.cgi?id=1015028
2013-11-19 10:55:14 +01:00
Zdenek Kabelac
7ab5f29a9c tests: add wait
We need to wait till kill really kills sleep
2013-10-16 10:53:03 +02:00
Zdenek Kabelac
0f55d7cccc tests: lvcreate and snapshot update
Test creation really in cluster.
Update test to check removal when snapshot device is being held open.
2013-10-14 00:29:03 +02:00
Zdenek Kabelac
d4308a558d snapshot: fix max size limit check for COW device
Use proper max size as a multiple of extent size.
And use 64bit arithmentic for validation of minsize.
(in release fix).
2013-06-17 09:37:50 +02:00