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

4646 Commits

Author SHA1 Message Date
Zdenek Kabelac
3806ab6f1f Link liblvm2cmd.so with devmapper-event and devmapper libs.
and remove generic %.so: %.a target.
2010-05-11 08:34:38 +00:00
Zdenek Kabelac
1b281f408d Headerfile <pthread.h> is no longer needed here 2010-05-11 08:32:22 +00:00
Alasdair Kergon
1641fdf90c Fix truncated total size displayed by pvscan. 2010-05-07 15:24:17 +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
Peter Rajnoha
d50c6d4bf5 Add new --sysinit option for vgchange and lvchange.
A shortcut for --ignorelockingfailure, --ignoremonitoring, --poll n options
and LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable used all at
once in initialisation scripts (e.g. rc.sysinit or initrd).
2010-05-06 11:15:55 +00:00
Zdenek Kabelac
3283f817eb Add dm_list_splice() to join two lists. 2010-05-06 10:10:15 +00:00
Zdenek Kabelac
180b3dea11 Install plugins to subdirs
Target install_dm_plugin installs files to libdir/device-mapper.
Target install_lvm2_plugin installs files to libdir/lvm2.

Both targets creates relative links to libdir to keep the code
compatible with current dlopen handling.

Once we will be able to read plugins from subdir, links
could be removed.
2010-05-06 10:07:46 +00:00
Petr Rockai
2f01958e3e What's new. 2010-05-05 22:38:31 +00:00
Petr Rockai
9409998d71 Suppress duplicate error messages about read failures and missing devices. 2010-05-05 22:37:52 +00:00
Peter Rajnoha
209c58bb35 Specify exactly which ioctl doesn't have a cookie set (for better debugging). 2010-05-03 22:08:38 +00:00
Peter Rajnoha
e92d87cef6 Synchronize "remove" dm task while reverting unsuccessful "create" dm task
(with table provided).

This remove ioctl generates udev events like any other hence it needs to be
synchronized properly as well. Also, add dm task type in debug log when
setting a cookie (for better debugging).
2010-05-03 21:06:53 +00:00
Alasdair Kergon
bde29bc4fa post-release 2010-04-30 15:48:38 +00:00
Alasdair Kergon
5cb00fe6cd typo 2010-04-30 14:51:58 +00:00
Alasdair Kergon
3ceb76089c pre-release 2010-04-30 14:49:42 +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
Alasdair Kergon
aaa2e0468f change awk path 2010-04-30 13:58:08 +00:00
Peter Rajnoha
c7fe469700 And be consistent with return code as well (previous commit). 2010-04-30 13:47:11 +00:00
Peter Rajnoha
5ff4274f9b Don't run any complex initialisation for the "version" lvm2 command.
We can use it even in read-only environment where a try to initialise
file-based locking fails (not to mention other processing related with
lvm2 init). Simply, we want to output the version only, nothing else.
And this should always work.
2010-04-30 13:28:44 +00:00
Zdenek Kabelac
244646902c Initialise _vginfos list staticaly so there is no problem with using uninitialised
variables in case, lvmcache_destory() is called without lvmcache_init().
2010-04-30 12:54:31 +00:00
Zdenek Kabelac
7147cd9fe5 Release pools for regex if there is error during processing
(fixes error messages about unreleased pools).
2010-04-30 12:37:04 +00:00
Zdenek Kabelac
8889fda53d Show string with invalid pattern
and start error message with capital letter.
2010-04-30 12:31:32 +00:00
Alasdair Kergon
9783e5ae7b . 2010-04-29 01:48:19 +00:00
Alasdair Kergon
4fd3355e7e . 2010-04-29 01:45:30 +00:00
Alasdair Kergon
54d7741a3e Remove no-longer-used arg_ptr_value.
Fix -M and --type to use strings not pointers that change on config refresh.
2010-04-29 01:38:12 +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
Jonathan Earl Brassow
c64f9e63eb Don't attempt to convert the log type of an LV if the LV
is not a mirror.
2010-04-28 17:41:30 +00:00
Peter Rajnoha
942d6ef29f Add support for new IMPORT{db} udev rule.
This rule appeared in udev v152 and it helps us to support spurious events
where we didn't have any flags set (events originated in udevadm trigger
or the watch rule). These flags are important to direct the rule application.
Now, with the help of this rule, we can regenerate old udev db content.
To implement this correctly, we need to flag all proper DM udev events with
DM_UDEV_PRIMARY_SOURCE_FLAG. That happens automatically for all ioctls
generating events originated in libdevmapper.
2010-04-28 13:37:36 +00:00
Zdenek Kabelac
8b7fc0da11 Small indent change 2010-04-28 12:23:11 +00:00
Jonathan Earl Brassow
56a5925aed Fix comment from last commit. Additionally, there is no need
to put a comment into the WHATS_NEW file if it is a regression
that was created and fixed inside the same release window.
2010-04-27 15:26:58 +00:00
Jonathan Earl Brassow
d7c9d72390 Patch to fix bug 586021 and mantain historical behavior of
being able to remove more images from a mirror than the
number of PVs directly specified for removal.

The effort to fix bug 581611 corrected a bug that was unnoticed
at the time.  The loop in _remove_mirror_images that looks over
the specified PVs was allowing devices that were previously
counted and moved to the end of the list to be double-counted.
This resulted in the number of devices needed for removal always
being satisfied - even if the user did not specify enough PVs
for removal to satisfy the request.  When 581611 was fixed, this
double-counting no longer took place and the result was to remove
only the minimum of the number of PVs specified or the number
that was asked to be removed.

By simply always setting 'new_area_count' (as used to be done
only in the else statement), we return to the previous behavior.
Indeed, this is exactly what the double-counting was allowing
to happen before the fix of 581611.
2010-04-27 14:57:49 +00:00
Alasdair Kergon
b9c4fc2498 Mention how to get PV to LV mappings. 2010-04-27 13:34:56 +00:00
Alasdair Kergon
21e2ab0e67 Fix lvconvert error message when existing mirrored LV is not found. 2010-04-26 18:31:58 +00:00
Alasdair Kergon
4ed099bafa add comments 2010-04-26 18:12:40 +00:00
Peter Rajnoha
257848229d Also include udev libs in libdevmapper.pc when udev_sync is enabled. 2010-04-26 09:05:50 +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
Mike Snitzer
d6d08486c8 Remove redundant check in _lvs_single now that the caller
(process_each_lv_in_vg) provides it.

Also, removing this check from _lvs_single now allows displaying hidden
LVs that are specifically named on the command line.
2010-04-23 19:10:20 +00:00
Peter Rajnoha
6ddb5ecd72 Set appropriate udev flags for reserved LVs.
There's no need for foreign udev rules to touch LVM reserved devices
(snapshot, pvmove, _mlog, _mimage, _vorigin) even if they happen to
be visible. The same applies for /dev/disk content - no need to create
any content for these devices (and so no need to run any "blkid" etc.).
This also prevents setting any inotify "watch" from udev rules on such
devices that is a source of race conditions (the rules need to honor
DM_UDEV_DISABLE_OTHER_RULES_FLAG for this to work though).
2010-04-23 14:16:32 +00:00
Mike Snitzer
1f661c5dd8 When removing a snapshot avoid preloading the origin if the
snapshot-merge target is not active.
2010-04-23 02:57:39 +00:00
Alasdair Kergon
616eda51e3 don't optimise anything with TARGET_TRANS to avoid intefering with the matcher's counting 2010-04-22 23:09:18 +00:00
Alasdair Kergon
e07803f976 Cache bitset locations to speed up _calc_states. (kabi) 2010-04-22 20:35:24 +00:00
Alasdair Kergon
92f67fed0a avoid ORs rightmost 2010-04-22 20:15:00 +00:00
Alasdair Kergon
d9c67df256 Move regex printing code from test to main tree (may use in debug messages).
Yet another optimiser fix attempt.
2010-04-22 17:42:38 +00:00
Jonathan Earl Brassow
6753ff894f The following tests in the testsuite have race conditions:
1) Test that the primary mirror image cannot be removed while
   the mirror set is sync'ing.
2) Test that you cannot start a second mirror up-convert while
   one is already in progress.

The trouble is that if the sync/conversion finishes before the
tests occur, the tests will fail by why of success where there
should have been failure.  This means the sync/conversion must
happen very quickly, but this is possible because the test
mirrors we are creating are so small.

In order to decrease the likelyhood of these test failing (or
more correctly, failing to test the right thing), I've increase
the size of the mirrors.  It will still be remotely possible that
the tests will fail (by way of failing to test the right thing).
If this continues to happen, more involved mechanisms will need
to be put in place.  (Perhaps these will still be created, but
this change should be a remedy until that time.)
2010-04-22 15:39:40 +00:00
Alasdair Kergon
0e8134800e Don't walk rightmost through NULL pointers. 2010-04-22 14:33:14 +00:00
Alasdair Kergon
6d3dd87bba Fix rightmost rotation, and use LEFT and RIGHT to make symmetry more obvious. 2010-04-22 13:42:34 +00:00
Alasdair Kergon
cab2199de8 fix leftmost rotation 2010-04-22 13:18:27 +00:00
Alasdair Kergon
e8e7a84c64 isprint 2010-04-22 03:42:00 +00:00
Alasdair Kergon
dbd20bbdb7 Still not satisfactory... 2010-04-22 03:24:24 +00:00
Alasdair Kergon
705cf58916 add -r to print out closer to original regex format 2010-04-22 03:12:01 +00:00