1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

385 Commits

Author SHA1 Message Date
Alasdair Kergon
c496bc13e2 Attempt to fix buildbot failure in t-lvconvert-mirror.sh due to failing to
wait for mirror to get into sync before running subsequent command.
2010-08-17 22:01:41 +00:00
Mike Snitzer
ed878c8a9a Add some v1 to v2 metadata upgrade testing. 2010-08-16 23:21:20 +00:00
Mike Snitzer
9ac9e06b5c fix t-pvcreate-operation-md.sh to require kernel.org Linux >= 2.6.33 for
the final alignment_offset check.  In the future, might look to check
for the RHEL6 kernel too.
2010-08-12 04:56:05 +00:00
Mike Snitzer
b123a82d73 Change default alignment of pe_start to 1MB.
The new standard in the storage industry is to default alignment of data
areas to 1MB.  fdisk, parted, and mdadm have all been updated to this
default.

Update LVM to align the PV's data area start (pe_start) to 1MB.  This
provides a more useful default than the previous default of 64K (which
generally ended up being a 192K pe_start once the first metadata area
was created).

Before this patch:
# pvs -o name,vg_mda_size,pe_start
  PV         VMdaSize  1st PE
  /dev/sdd     188.00k 192.00k

After this patch:
# pvs -o name,vg_mda_size,pe_start
  PV         VMdaSize  1st PE
  /dev/sdd    1020.00k   1.00m

The heuristic for setting the default alignment for LVM data areas is:
- If the default value (1MB) is a multiple of the detected alignment
  then just use the default.
- Otherwise, use the detected value.

In practice this means we'll almost always use 1MB -- that is unless:
- the alignment was explicitly specified with --dataalignment
- or MD's full stripe width, or the {minimum,optimal}_io_size exceeds
  1MB
- or the specified/detected value is not a power-of-2
2010-08-12 04:11:48 +00:00
Mike Snitzer
dff224669d Require --restorefile when using pvcreate --uuid.
Introduce --norestorefile to allow user to override the new requirement.

This can also be overridden with "devices/require_restorefile_with_uuid"
in lvm.conf -- however the default is 1.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2010-08-12 04:08:59 +00:00
Mike Snitzer
57d31c99cc Require logical volume(s) to be explicitly named for lvconvert --merge. 2010-08-03 20:22:31 +00:00
Zdenek Kabelac
1342414a8d Minor speedup of lock test -
Instead of waiting for flock process finish kill the flock process.
2010-08-02 13:23:01 +00:00
Zdenek Kabelac
3015a9ab9c Add shell function to trim spaces.
Test values as "$val" to avoid weird results when spaces are in output.
2010-08-02 13:20:50 +00:00
Zdenek Kabelac
380cd989ac Using count=0 is sufficient for creation of zeroed files. 2010-08-02 13:18:42 +00:00
Zdenek Kabelac
c133a264b0 Visually better align lines which are executed as a result of true
or false result of previous command.
2010-08-02 13:18:01 +00:00
Alasdair Kergon
64f95b40ca add copyright notices to new files 2010-07-28 12:20:38 +00:00
Petr Rockai
8b90730e41 Do not create a clustered volume group in t-nomda-missing. 2010-07-27 21:08:32 +00:00
Petr Rockai
82c99fb63f Make vgck warn about missing PVs. 2010-07-27 20:05:29 +00:00
Petr Rockai
65d20c2f32 Don't fail t-pvcreate-operation-md if mdadm is broken. 2010-07-21 14:12:47 +00:00
Dave Wysochanski
96c3c4645f Add --force to pvchange, and allow override of prompt involving metadataignore.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-07-07 19:14:57 +00:00
Dave Wysochanski
05d2c210e1 Test failed commit of mda on new pv - failed vgextend.
Test the auto-repair capability when we fail committing to an mda
on a new pv adding to a vg.  This test should fail until we fix
the auto-repair in this case.
2010-07-07 14:43:57 +00:00
Dave Wysochanski
3a3281c195 Update metadata-balance test for --vgmetadatacopies 0.
Should be equivalent to "unmanaged".
2010-06-30 22:22:00 +00:00
Milan Broz
6117bfc0af Fix vgremove to allow removal of VG with missing PVs. (2.02.52) 2010-06-30 14:01:39 +00:00
Dave Wysochanski
2dbb08a4fe Update nightly tests for vgextend --metadataignore. 2010-06-30 13:04:59 +00:00
Dave Wysochanski
7f119c2236 Update pvcreate tests for --metadataignore. 2010-06-30 12:17:55 +00:00
Dave Wysochanski
763888abef Update t-covercmd pvck to take proper device argument. 2010-06-28 21:49:31 +00:00
Dave Wysochanski
7815d8263a Update tests to handle phase 2 (vg based) metadata balance.
Test vgcreate/vgchange --vgmetadatacopies, vgextend, vgreduce,
vgsplit, vgmerge.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-28 20:40:27 +00:00
Dave Wysochanski
7088fb9260 Ensure --metadatacopies parameter gets interpreted based on command.
Now that we have both --pvmetadatacopies and --vgmetadatacopies,
we need to make sure --metadatacopies gets interpreted correctly.

For pv commands, --metadatacopies should imply --pvmetadatacopies,
and for vg commands, --vgmetadatacopies.

Note: this will change the behavior of vgcreate with --metadatacopies
to be a synonym for --vgmetadatacopies.  Previously, --metadatacopies
would apply to any PVs given with vgcreate that needed an implicit
pvcreate.  As a result, one small change is needed to one of the nightly
tests - t-vgcreate-usage.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-28 20:39:39 +00:00
Dave Wysochanski
c6894cf031 Add tests for phase 1 of metadata balance - manage per-PV ignore bit.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-28 20:36:06 +00:00
Petr Rockai
eddb91d1e7 Minor shell style cleanup. 2010-06-28 19:13:33 +00:00
Petr Rockai
a8dfed8267 Add a test of wait_for_locks behaviour (adapted from an original by Dave). 2010-06-24 07:57:54 +00:00
Milan Broz
31943693c7 Require partial option in lvchange --refresh for partials LVs.
We must not refresh LV if some PVs are missing and partial activation
was not requested.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=598886
2010-06-03 12:45:05 +00:00
Milan Broz
3014fad054 Fix topology test after last changes to not leak loop devices. 2010-05-24 19:27:38 +00:00
Milan Broz
8e0ef70c96 Use mv -f for replace config in test. 2010-05-24 17:19:50 +00:00
Milan Broz
8a65725195 Replace lvm.conf instead of truncating it. 2010-05-24 17:18:05 +00:00
Petr Rockai
84fa520c03 t-lvconvert-repair-transient hangs on .33 and on RHEL6 kernel -> disable 2010-05-24 16:33:21 +00:00
Petr Rockai
d345bf2cd3 Account for mirror transient status when doing lvconvert --repair. 2010-05-24 15:32:20 +00:00
Petr Rockai
1a36448da3 Skip t-pvcreate-operation-md if mdadm fails to create the required device. 2010-05-24 15:28:45 +00:00
Dave Wysochanski
a616c0de2e Test lvm_vgname_from_{pvid|device}. 2010-05-19 11:53:30 +00:00
Alasdair Kergon
bdadde2f7a Use -d to control level of messages sent to syslog by dmeventd.
Change -d to -f to run dmeventd in foreground.
(mornfall)
2010-05-14 14:56:39 +00:00
Petr Rockai
1540955fc6 Chop up the big t-lvconvert-mirror-basic loop across 4 separate test scripts
(and use sourcing to avoid code duplication).
2010-05-12 13:15:38 +00:00
Petr Rockai
d74800fd23 Run tests in alphabetical (and thus stable across machines) order. 2010-05-12 11:59:46 +00:00
Petr Rockai
685d9e615b Bump the debug.log level from 4 to 9 (the numbering is different from verbose). 2010-05-12 11:58:51 +00:00
Petr Rockai
15bd6a29b9 Revert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
to a file using log/file, with log/overwrite set and dump this file in
STACKTRACE. The overall effect is that only the command that ran last before
the failure has been triggered will get its debug output logged. This is
similar to how we treat coredumps.
2010-05-12 11:23:16 +00:00
Petr Rockai
0e7c1ee3e7 A fairly extensive refactor of the mirror testing code. The exhaustive
lvconvert testing is now in its own test, t-lvconvert-mirror-basic ... it
doesn't do anything fancy but it does run lvconvert through a lot of
combinations.

I have also merged the remaining t-mirror-lvconvert tests into
t-lvconvert-mirror and abolished the former. The latter will be split again
later into more thematic divisions. (The previous split was rather arbitrary,
may I even say random...)
2010-05-12 10:08:35 +00:00
Petr Rockai
85ab113b31 Revert the huge device creation in t-lvconvert-mirror and downgrade the
race-induced failure to a warning, until we have a better fix for this.
2010-05-12 06:09:22 +00:00
Petr Rockai
e598348504 Add a test for activation in presence of missing devices. This partially covers
the robustness requirements for system startup that we have.
2010-05-12 06:02:28 +00:00
Petr Rockai
6c53c22139 Rename t-partial-activate to t-activate-partial (more activation tests coming). 2010-05-12 05:59:24 +00:00
Petr Rockai
69638ad6b1 The "should" testing utility should actually only give a warning when the
command fails.
2010-05-12 05:55:42 +00:00
Petr Rockai
4aa8216d7e Improve the "check" testing utility: slightly refactor and provide
active/inactive checks.
2010-05-12 05:55:08 +00:00
Petr Rockai
0b0caec5f6 Add a basic test for dmeventd triggering lvconvert --repair. Needs improvement. 2010-05-06 19:01:26 +00:00
Petr Rockai
b52496b7af Add some basic provisions for automated testing of dmeventd. 2010-05-06 18:54:51 +00:00
Petr Rockai
d6b9d2cbc3 Add a "should" alongside "not" to the test utilities. When a "should" command
fails, the test will carry on but will issue a warning. The harness detects
such warnings from tests and marks tests that passed with warnings with a
special status.
2010-04-30 14:33:39 +00:00
Jonathan Earl Brassow
6c6ce2ba0e Test all combinations of mirror conversion, both while the LV
is active and while it is in-active.

+for i in $(seq 0 4); do
+       for j in $(seq 0 4); do
+               for k in core disk mirrored; do
+                       for l in core disk mirrored; do

The testing code still needs some improvement.  I'd like to add
the ability to test specifying the PVs to be added/removed during
a convert.  It will also be important to test partial PV
specification during down converts (i.e. request to remove more
mirror images than we have provided PVs for).
2010-04-28 17:46:34 +00:00
Mike Snitzer
60267bdce8 Disallow the direct removal of a merging snapshot.
Allow lv_remove_with_dependencies() to know the top-level LV that was
requested to be removed (otherwise it recurses and we lose context).

A merging snapshot cannot be removed directly but the associated origin
can be.  Disallow removal of a merging snapshot unless the associated
origin is also being removed.
2010-04-23 19:27:10 +00:00