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

4561 Commits

Author SHA1 Message Date
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
Jonathan Earl Brassow
3c76d9abaf Disallow the addition of mirror images while a mirror up-convert
is already occurring.  The addition of new legs can be retried
once the current conversion is complete.
2010-04-21 14:04:24 +00:00
Jonathan Earl Brassow
66f79d05eb Disallow the primary mirror image from being removed when the
mirror is not in-sync.  This restriction is not extended to
repair operations (i.e. it will not limit what 'lvconvert --repair'
can do).
2010-04-21 13:55:08 +00:00
Zdenek Kabelac
0fad905483 Make matcher_t and parse_t compilable
These two old-test/regex utils are usable for testing output of regex
processing at core level. For getting them usable configure need to create
Makefile. This is currently disable by default.
2010-04-21 08:01:51 +00:00
Alasdair Kergon
b2bd4e2d8d Add a regex optimisation pass for shared character prefixes. 2010-04-20 22:31:22 +00:00
Mike Snitzer
4bd1ac728c Re-enable t-topology-support.sh
Reintroduce split teardown (teardown() calls teardown_devs()) because
t-topology-support.sh only needs the teardown_devs() subset of the full
teardown() between each iteration of the topology tests -- in particular
the $TESTDIR must not get removed between each topology test iteration.

prepare_loop() must return if prepare_scsi_debug_dev() already
established $LOOP.

Also fix (and simplify) the unsafe scsi-debug device discovery in
prepare_scsi_debug_dev().
2010-04-20 18:18:59 +00:00
Milan Broz
ff403ee29f Remove -n argument from vgcfgrestore.
This is old lvm1 syntax, because arguments changed
from PVs to VGs compatibility is broken already.

name_ARG is not used in code.
2010-04-20 18:17:56 +00:00
Dave Wysochanski
3332edacb9 Add device creation to basic nightly test.
Ensure we can create devices for use in tests before running the real
tests.  This may in various cases, and may involve machine configuration
rather than a failure in some specific test.
For example, if a test is run with LVM_TEST_DIR=/tmp, selinux is enabled,
and the default security context is set to "<<none>>" for /tmp, all the
tests will fail, unable to create devices, since dmsetup will fail, a
result of machpathcon() returning an error code.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-04-20 15:19:36 +00:00
Christine Caulfield
c407d2bd11 Add -S command to clvmd, so it can restart itself and still
preserve exlusive LV locks.
2010-04-20 14:07:37 +00:00
Alasdair Kergon
49ada7a2c3 Add dm_bitset_equal to libdevmapper. 2010-04-20 13:58:22 +00:00
Alasdair Kergon
c3b712f8a0 typo in comment 2010-04-20 12:18:31 +00:00
Alasdair Kergon
ee90b8197f Move function up file 2010-04-20 12:14:28 +00:00
Alasdair Kergon
a120520fa2 missed files from last commit 2010-04-20 10:58:18 +00:00
Mike Snitzer
d9933eaf1b Add additional test to start the snapshot merge (which had just failed
because an FS was mounted -- origin was still open).
2010-04-19 22:44:42 +00:00
Alasdair Kergon
2b707b6806 Add dm_bit_and. (ejt) 2010-04-19 21:23:01 +00:00
Alasdair Kergon
175b8684a0 fix last commit 2010-04-19 21:10:20 +00:00
Alasdair Kergon
da336123c2 Simplify dm_bitset_create. (ejt) 2010-04-19 21:08:32 +00:00
Alasdair Kergon
72ab7270e0 Speed up dm_bit_get_next with ffs(). 2010-04-19 17:17:55 +00:00
Dave Wysochanski
5e3285ef49 Change lvm2app version number from 1 to 2.
This version number change reflects the memory handling change
for string-based pv/vg/lv string based attributes.
In addition, when adding support for tags, I forgot to increase
the version number.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-04-19 15:24:00 +00:00
Dave Wysochanski
298ec21e29 Use vg->vgmem to allocate vg/lv/pv string properties instead of dm_malloc/fr
Everywhere else in the API the caller can rely on lvm2app taking care of
memory allocation and free, so make the 'name' and 'uuid' properties of a
vg/lv/pv use the vg handle to allocate memory.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-04-19 15:22:24 +00:00
Alasdair Kergon
81182ac07a Change daemon lock filename from lvm2_monitor to lvm2-monitor for consistency. 2010-04-15 19:15:03 +00:00
Zdenek Kabelac
5227ae5388 Install symbolic .so links with relative paths between usrlibdir and libdir. 2010-04-15 15:12:20 +00:00
Zdenek Kabelac
c474c0827b Fix double DESTDIR usage for infodir and mandir. 2010-04-15 15:09:35 +00:00
Zdenek Kabelac
6008aabe91 Added awk script relpath.awk to calculate relative paths. 2010-04-15 15:06:26 +00:00
Alasdair Kergon
adfdf8bb1e post-release 2010-04-14 21:47:48 +00:00
Alasdair Kergon
32c1ea2549 touch file 2010-04-14 20:03:46 +00:00
Alasdair Kergon
a11ad9cc7b fix broken 'make install' for lvm_dump.sh 2010-04-14 20:03:15 +00:00
Alasdair Kergon
3972d7a2a4 pre-release 2010-04-14 18:54:37 +00:00
Alasdair Kergon
9c29f2f509 pre-release 2010-04-14 18:53:04 +00:00
Alasdair Kergon
fadbec996f . 2010-04-14 18:10:30 +00:00
Alasdair Kergon
2e79014bbe pre-release 2010-04-14 17:50:49 +00:00
Dave Wysochanski
212510fdf8 Add missing readline linkage to lvm2app test. 2010-04-14 16:13:34 +00:00
Petr Rockai
e98c922ec5 What's new. 2010-04-14 13:52:20 +00:00
Petr Rockai
a86107dfb1 Allow incomplete mirror restore in lvconvert --repair upon insufficient space. 2010-04-14 13:51:58 +00:00
Peter Rajnoha
1e696b0c15 Do not reset position in metadata ring buffer on vgrename and vgcfgrestore.
We should write metadata into next position in the ring buffer while calling
vgrename and vgcfgrestore. At this code level (_vg_write_raw), we were not able
to determine if this is a rename or not. If yes, then accompanying VG structure
passed here has a new name set, not the old one.

When looking for a location where to put metadata next, we were given a NULL
value because of failed VG name comparison (in _find_vg_rlocn) between the
name in existing metadata and metadata we're just about to write.

This resets the position in the ring buffer, overwriting any existing metadata
(and also incorrectly updates the cache to "orphan" afterwards).

This patch just adds old_name item in struct volume_group that we can check and use
if necessary and detect renames at lower layers as well.

The same applies for vgcfgrestore, but here we're using a special value of
old_name, an empty string, to disable the check with existing metadata totally.
2010-04-14 13:09:16 +00:00
Peter Rajnoha
c6469d46dd Allow VGs with active LVs to be renamed. 2010-04-14 13:03:06 +00:00