1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
Commit Graph

491 Commits

Author SHA1 Message Date
Zdenek Kabelac
cd1a76a492 tests: syncaction update
Improve syncaction testing with some minor
workaround for current upstream kernel
2015-02-17 11:05:04 +01:00
Zdenek Kabelac
120e1aa4bd tests: ensure lv1 goes away first
$lv1 may appear in the table after -pvmove0 which could make -pvmove0
unremovable.
2015-02-17 11:05:04 +01:00
Peter Rajnoha
1ced5562cd tests: fix pvcreate-operation-md test to properly clean up devs before their reuse
pvcreate filters out devices with existing partitions defined on them,
we need to properly clean up the devs before we reuse them.
2015-02-13 14:53:26 +01:00
Peter Rajnoha
993c988895 tests: comment in select-tools.sh 2015-02-13 11:45:13 +01:00
Peter Rajnoha
1c005b557a tests: select-tools.sh: pvchange now uses process_each_pv
pvchange now uses process_each_pv so uncomment parts of the test
which check proper functionality of intersection between selection
result and PVs or PV tags directly provided on command line. This
didn't work properly before when pvchange was not using process_each_pv.

For example:

  pvchange -u -S 'pv_name=/dev/sda' /dev/sdb

..changes nothing since clearly the intersection of /dev/sda and
/dev/sdb is empty set. The same applies for tags:

  pvchange -u -S 'pv_name=/dev/sda' @some_tag

..changes nothing if /dev/sda is not tagged with some_tag.
2015-02-13 11:27:09 +01:00
Zdenek Kabelac
4b7097b96c tests: ensure array is synchronized
Before continue of repair test, ensure mirror is in sync
2015-02-12 15:38:51 +01:00
Peter Rajnoha
54c2e9859f tests: add select-tools.sh to test selection support in toollib
Tests for selection within non-reporting tools while using process_each_* fns.
2015-02-11 18:39:47 +01:00
Peter Rajnoha
599cb41f99 tests: rename report-select.sh to select-report.sh
Let's name all selection-related tests with the "select-" prefix for
better sorting.
2015-02-11 16:17:05 +01:00
Petr Rockai
2ee3bcb877 test: Fix a typo in shell/pvmove-restart.sh. 2015-02-10 12:42:05 +01:00
Petr Rockai
72ee3f920b test: Allow a longer timeout for lvextend-snapshot-dmeventd. 2015-02-05 13:51:06 +01:00
Petr Rockai
839ea48aa9 test: Make dmsetup remove more robust in pvmove-restart. 2015-02-05 13:51:06 +01:00
Petr Rockai
17575403d4 test: Disable lvmetad debug log on another bunch of tests. 2015-02-05 13:51:06 +01:00
Petr Rockai
580370bea3 test: Avoid passing -c to flock. 2015-02-05 13:47:21 +01:00
Petr Rockai
bd0806e1f5 test: Fix failures due to undefined abs_top_builddir. 2015-02-05 13:47:21 +01:00
Petr Rockai
c6f9c46223 test: Avoid running 'dmsetup remove' with no devices. 2015-02-05 13:47:21 +01:00
Petr Rockai
ad0267b2ad test: Fix 100%FREE RAID tests since test device sizes changed slightly. 2015-02-05 13:47:20 +01:00
Petr Rockai
8b80e949ea test: Do not rely on dev/mapper/* nodes in pvmove-restart.sh. 2015-02-05 13:47:20 +01:00
Petr Rockai
f0d314bd6d test: Disable lvmetad logging in lvconvert-{mirror,raid}*. 2015-02-05 13:47:19 +01:00
Zdenek Kabelac
71e88f761d tests: add --force to sfdisk
Avoid udev sync troubles for now.
2015-01-30 16:46:06 +01:00
Zdenek Kabelac
d021284bcf tests: test stacked raid 2015-01-30 12:33:52 +01:00
Zdenek Kabelac
4f1309080a thin: preserve chunksize with lvconvert
When repairing thin pool or swapping thin pool metadata,
preserve  chunk_size property and avoid to be automatically changed
later in the code to better match thin pool metadata size.
2015-01-28 15:15:52 +01:00
Zdenek Kabelac
93b9015760 raid: fix raid image splitting
When raid leg is extracted, now the preload code handles this state
correctly and put proper new table entry into dm tree,
so the activation of extracted leg and removed metadata works
after commit.
2015-01-28 13:45:18 +01:00
Peter Rajnoha
8804023825 tests: pvscan --cache DevicePath does not fail if the device is just filtered
It's not an error if the device is filtered out and hence cleared from
lvmetad cache - "pvscan --cache DevPath" has now the same behaviour in
this case as "pvscan --cache major:minor" (which is more consistent).

Before, the tests expected failure return code for "pvscan --cache DevicePath"
if the device was filtered (which is a different situation if the device
is missing in the system completely!).
2015-01-12 15:16:57 +01:00
Peter Rajnoha
99d895014d dev-type: filter out partitioned device-mapper devices as unsuitable for use as PVs
Normally, if there are partitions defined on top of device-mapper
device, there should be a device-mapper device created for each
partiton on top of the old one and once the underlying DM device
is used by another devices (partition mappings in this case),
it can't be used as a PV anymore.

However, sometimes, it may happen the partition mappings are
missing - either the partitioning tool is not creating them if
it does not contain full support for device-mapper devices or
the mappings were removed.

Better safe than sorry - check for partition header on DM devs
and filter them out as unsuitable for PVs in case the check is
positive. Whatever the user is doing, let's do our best to prevent
unwanted corruption (...by running pvcreate on top of such device
that would corrupt the partition header).
2015-01-12 14:10:44 +01:00
Petr Rockai
e97023804a pvremove: Avoid metadata re-reads & related error messages. 2015-01-06 14:27:30 +01:00
Peter Rajnoha
57af48d734 report: fix segfault on NULL value hit in cache_settings field
We have to use empty list, not NULL if we want to denote that the list
has no items. Otherwise, the code further can segfault as it expects
there's always a sane value (= some list), including empty list,
but never NULL.
2014-12-18 17:26:12 +01:00
Petr Rockai
00ad13eb71 report: Add cache_policy and cache_settings (LV) segment fields. 2014-12-17 14:43:12 +01:00
Zdenek Kabelac
f3bd9a2797 raid: properly rename split image
When we split leg from raid - we take a proper new lock for a new LV.
However for now activation checks only 'existince' of device UUID,
but it's not validating device has a proper name.

As a quick fix call suspend()/resume() to rename after split mirror.
2014-12-05 13:39:42 +01:00
Petr Rockai
5b2726fc61 lvcreate: Implement --cachepolicy/--cachesettings. 2014-11-27 20:22:03 +01:00
Zdenek Kabelac
4bfdb01f78 toollib: fix regression in parsing /dev/mapper/vg-lv
Commit b0dde9e8f0 introduced regression in parsing
/dev/mapper prefix - and tried to check for '/' one char behind.
2014-11-26 17:29:35 +01:00
Zdenek Kabelac
2de11c9e9e thin: add missing 64KB rounding
When chunk size needs to be estimated, the code missed to round
to proper 64kb boundaries  (or power of 2 for older thin pool driver).
So for some data and metadata size (i.e. 10GB and 4MB) it resulted
in incorrect chunk size (not being a multiple of 64KB)

Fix it by adding proper rounding and also use 1 routine for 2 places
where the same calculation is made.

Fix also incorrect printed warning that has used 'ffs()'
(which returns first 'least significant' bit in word)
and it was not really giving any useful size info and replace it
with properly estimated chunk size.
2014-11-26 09:29:25 +01:00
Zdenek Kabelac
1e80265c36 lvconvert: earlier detection of conflicting names
Detect same LV names for lvconvert prior opening VG.
i.e. lvconvert --thinpool vg/lvol0  -T lvol0
2014-11-24 14:39:04 +01:00
Zdenek Kabelac
8eb111dfb8 pool: prevent pool conversion with same name
When same name is given for converted volume and pool volume,
stop further command processing.
2014-11-23 00:49:04 +01:00
Zdenek Kabelac
0782309713 tests: reduce thin test 2014-11-22 18:51:02 +01:00
Zdenek Kabelac
4607cbcb0d tests: use old virt snaps in the test
Don't use thin with its thin requirements for the test.
2014-11-22 18:51:02 +01:00
Petr Rockai
71271cf905 test: Also test repeated --cachesettings in lvchange-cache. 2014-11-20 16:51:07 +01:00
Petr Rockai
c75ae0846e cache: Implement 'default' as a policy settings value to clear the record. 2014-11-20 16:51:07 +01:00
Petr Rockai
4b9b8e1282 toollib: Split --cachesettings from --cachepolicy. 2014-11-20 16:51:07 +01:00
Petr Rockai
310beb73a8 test: Add a test for lvchange --cachepolicy. 2014-11-20 16:51:07 +01:00
Zdenek Kabelac
8d8c1b6624 tests: use snapshot targets 2014-11-19 23:24:18 +01:00
Zdenek Kabelac
542b03ee00 tests: deactivate repaired before swap 2014-11-17 08:44:53 +01:00
Zdenek Kabelac
740fcdae7d tests: thin repair testing
More checks for thin related tools.
Add same functionality for cache related tools.
2014-11-17 00:41:33 +01:00
Zdenek Kabelac
27182e1ddb tests: explicit raid sync 2014-11-14 18:12:44 +01:00
Zdenek Kabelac
8cb79dad0b pool: fix removal of pool metadata spare
Since we support device stack of pools over pool
(thin-pool with cache data volume) the existing code
is no longer able to detect orphan _pmspare.

So instead do a _pmspare check after volume removal,
and remove spare afterwards.
2014-11-13 13:09:07 +01:00
Zdenek Kabelac
094596cfd2 tests: reach cache params 2014-11-10 22:05:49 +01:00
Zdenek Kabelac
10ebabdd2a tests: cache snapshot 2014-11-10 22:05:49 +01:00
Zdenek Kabelac
cebbda0931 tests: duplicate update of config 2014-11-04 15:29:22 +01:00
Zdenek Kabelac
847b2aa5b4 tests: thin 2014-11-03 14:19:34 +01:00
Zdenek Kabelac
e4e96f6b19 tests: usage of -m0 -Mn
Test -m0 passed with types.
Check --readahead and thins.
2014-11-03 14:19:34 +01:00
Zdenek Kabelac
e09ee21fd4 tests: update raid sync 2014-10-31 00:37:35 +01:00