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

4245 Commits

Author SHA1 Message Date
Mike Snitzer
43d99aab6c Default to checking LV's progress before waiting in _wait_for_single_lv.
Support "wait before testing" using '+' in pvmove and lvconvert
interval.  Doing so overrides the new default of sleeping after checking
the LV's progress.

Sleeping before checking progress can lead to extraneous polldaemons
being left running.  These polldaemons would have otherwise exited had
they checked before sleeping.  Checking progress before sleeping helps
workaround the subtly unreliable nature of "finished" state checking
in _percent_run.

Update test/t-mirror-names.sh to use '+' when providing its lvconvert
interval.
2010-01-22 21:59:42 +00:00
Jonathan Earl Brassow
794b3b1605 a little more information for the cmirrord man page 2010-01-22 21:48:17 +00:00
Milan Broz
9a2cde9519 Fix syntax error in cmirror init script
- break cannot be used here
 - remove CLVMDOPTS
 - add echo to stop call
2010-01-22 16:19:38 +00:00
Mike Snitzer
537f7456e2 Eliminate extra ioctls just to check open_count in _add_new_lv_to_dtree.
DM >= 4.7.0 always returns open_count so just use the associated nodes'
existing info.

Introduce _cached_info() to get an LV's cached info.
2010-01-22 15:40:31 +00:00
Milan Broz
ff26b68abc Document undocumented commits which fixed some bugs.
Go WHATS_NEW!
2010-01-22 14:33:33 +00:00
Mike Snitzer
5cb0d45d18 Removed inactive_table check from _lv_has_target_type. This check
doesn't offer any benefit (that I can recall) and testing validates
that.
2010-01-22 13:28:54 +00:00
Milan Broz
81d19574f7 Switch memory debugging off for now if compiled with dmeventd,
functions are not thread-safe in debug mode.
2010-01-22 13:20:32 +00:00
Milan Broz
676b511245 Fix syslog prefix in the first message (dmeventd->lvm). 2010-01-22 12:48:58 +00:00
Milan Broz
257bb03948 Fix exported symbols for lvm2 dmeventd wrapper. 2010-01-22 12:38:16 +00:00
Milan Broz
98d85f25be Move error message to locking constructor and print
more descriptive message if locking fails instead of
"Locking type -1 initialisation failed."

Use read-only locking instead of misleading ignorelocking option
in message.
2010-01-22 09:45:29 +00:00
Alasdair Kergon
59dd86581a post-release 2010-01-22 01:09:09 +00:00
Alasdair Kergon
86dce60ffe missing header 2010-01-22 00:43:28 +00:00
Alasdair Kergon
fff0de4865 fix lib include 2010-01-22 00:18:37 +00:00
Alasdair Kergon
1014cf876a pre-release 2010-01-21 23:55:17 +00:00
Alasdair Kergon
d3d98fdc1e Add libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use. 2010-01-21 22:15:45 +00:00
Dave Wysochanski
a7ca101517 Call _alloc_pv() inside _pv_read() and clean up error paths.
We should be consistent with pv constructors so call _alloc_pv()
here as we do from pv_create().
2010-01-21 21:09:23 +00:00
Dave Wysochanski
1d749d01fb Remove useless memory allocation for pv->vg_name in _alloc_pv().
All this seems to do is provide a memory leak so remove it.
The only caller of _alloc_pv() later explicitly sets
pv->vg_name = fmt->orphan_vg_name so clearly this allocation
should be removed.  I also saw no where in the code where
strncpy was used to assign pv->vg_name - only direct assignments
and strdup's.
2010-01-21 21:04:44 +00:00
Dave Wysochanski
2b1446c7d6 Correct 'void *' usage in pvcreate_single.
Remove needless cast.
2010-01-21 21:04:20 +00:00
Zdenek Kabelac
488298a5af Log entry for the last lvmcmdline.c commit 2010-01-21 17:14:18 +00:00
Zdenek Kabelac
d40821aabc Reset released pointer and counters.
DSO is currently not dl_close-ing pluing during it is unregister handling,
so clear structure and related counter, so there are no memory problems.
Futher fixes are needed.
2010-01-21 13:41:39 +00:00
Mike Snitzer
dfcb905db0 Preload the origin prior to suspend IFF snapshot(s) still exist after a
merge completes.  This narrows the scope of this "hack" (which still
needs a proper fix within the deptree).

This stops dmeventd from trying to access snapshot devices that were
already removed.
2010-01-20 21:53:10 +00:00
Jonathan Earl Brassow
13acd33b2f Fill in a little more on the man page for cmirrord 2010-01-20 15:17:25 +00:00
Alasdair Kergon
e408cf6906 Deal with a few more compiler warnings. 2010-01-20 02:43:19 +00:00
Mike Snitzer
13ecd94aef Add t-topology-support.sh and t-snapshot-merge.sh tests. 2010-01-19 23:02:04 +00:00
Mike Snitzer
fc6dc34429 add test/t-snapshot-merge.sh to provide coverage of snapshot-merge support 2010-01-19 22:55:00 +00:00
Alasdair Kergon
9bad95bd95 Remove mknod() and add FIXMEs.
In the udev-world, this function should work differently.
2010-01-19 18:21:03 +00:00
Alasdair Kergon
acdd91b3ce remove more compiler warnings
add FIXMEs for incomplete write()s
2010-01-19 17:24:29 +00:00
Mike Snitzer
cf760281f0 test/t-topology-support.sh requires scsi_debug from >= 2.6.31 2010-01-19 17:06:50 +00:00
Alasdair Kergon
c75ebae789 remove no-longer-used header 2010-01-19 17:04:05 +00:00
Alasdair Kergon
49095061cd remove no-longer-used files 2010-01-19 17:01:17 +00:00
Mike Snitzer
8e8f77f8f3 Add a common way to establish a scsi_debug-based 4K drive for use by an
LVM2 test (rather than using the traditional loop device).

prepare_scsi_debug_dev currently assumes exclussive access to the
scsi_debug module.  Any script that tries to use prepare_scsi_debug_dev
when scsi_debug is unavailable or already loaded into the kernel will be
skipped.

t-topology-support.sh shows how prepare_scsi_debug_dev function can be
used repeatedly (within a script) to test LVM2 ontop of a ramdisk-based
SCSI device w/ arbitrary scsi_debug features.
2010-01-19 16:44:57 +00:00
Mike Snitzer
fd6ca7415f update test/t-pvcreate-operation-md.sh attempt loading raid0.ko if raid0
isn't already available (in /proc/mdstat).

switch to requiring 2.6.33 for the alignment_offset tests; 2.6.{31,32}
alignment_offset values aren't reliable.  2.6.33 _should_ have mkp's
alignment_offset fixes but so far it doesn't (as of 2.6.33-rc4).
2010-01-19 15:59:34 +00:00
Alasdair Kergon
fc0c0cb075 Signal handling FIXMEs.
A few integer type changes.
2010-01-19 15:58:45 +00:00
Milan Broz
7a96516819 Never scan suspended devices in clvmd.
For mirror repair (and similar tasks) it can happen that full
device rescan is issued from clvmd.

Because code can be in the middle of repair (calling suspend)
clvmd should never try to scan suspended devices
(otherwise it causes deadlock).

Also code must not change ignore_suspended_device flag when
doing refresh_filters (called from lvmcache scan code).
2010-01-19 13:25:00 +00:00
Alasdair Kergon
81410c8f09 And more fixes for cmirror build. 2010-01-19 02:04:33 +00:00
Alasdair Kergon
f7729ec651 more build fixes 2010-01-19 01:10:46 +00:00
Alasdair Kergon
667c6be176 Clean up include files. 2010-01-18 21:07:24 +00:00
Jonathan Earl Brassow
98998134de Fix some compiler warnings. 2010-01-18 20:58:50 +00:00
Alasdair Kergon
3c4310d6ef Misc compilation clean-ups. 2010-01-18 20:08:44 +00:00
Mike Snitzer
6c1c02dc52 Change dev_manager_mirror_percent()'s 'struct logical_volume *' to be
'const'.  Be consistent with its use (and dev_manager_snapshot_percent()).

Pass 'lv' from dev_manager_snapshot_percent() to _percent() to
_percent_run().  _percent_run() always dereferenced 'lv' (when
initializing segh) even though it may have been NULL (as was the case
until now for dev_manager_snapshot_percent()).

If a "snapshot-origin" LV (snapshot-merge whose merge was deferred
becuase it was open) was passed to _percent_run() it would always return
100%.

Update _percent_run() to NOT return PERCENT_100 et. al. if
->target_percent() wasn't ever called and supplied 'lv' is a merging
origin.  A default return of 100% does not work for snapshot-merge.

Also tweak a related lvconvert log_error() to include "Aborting merge."
2010-01-15 22:58:25 +00:00
Jonathan Earl Brassow
7fef83d687 Use tabs, not spaces. 2010-01-15 21:48:03 +00:00
Jonathan Earl Brassow
c9362fe854 Initial version of the cmirrord init script
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 20:47:52 +00:00
Jonathan Earl Brassow
c2b22f5633 initial cmirrord man page
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 20:24:04 +00:00
Jonathan Earl Brassow
27318b98a1 Make the intermachine communication structures architecture independant
to allow for mixed architecture clusters.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 19:49:35 +00:00
Jonathan Earl Brassow
3579eeb2b0 When moving the cluster log server into the LVM tree, the in memory
bitmap tracking was switched from the e2fsprogs implementation to
the device-mapper implementation (dm_bitset_t).  The latter has a
leading uin32_t field designed to hold the number of bits that are
being tracked.  The code was not properly handling this change in
all places.  Specifically, when getting the bitmap to/from disk.

Endian adjustments will likely need to be made on the accounting
field as well, since bitmaps are passed between machines on
start-up.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 18:48:24 +00:00
Mike Snitzer
eb9454ab68 Detect case of both merging_store and cow_store supplied in
_snap_text_import().
2010-01-15 17:46:08 +00:00
Mike Snitzer
e47a591d76 Improve target type compatibility checking in _percent_run().
Add 'target_status_compatible' method to 'struct segtype_handler'.
2010-01-15 16:35:26 +00:00
Jonathan Earl Brassow
ed2bef01e5 udpate WHATS_NEW* 2010-01-15 16:18:14 +00:00
Jonathan Earl Brassow
e30f6c899d At some point "clustered_[core|disk]" was changed to "clustered-[core|disk]".
This patch makes the log server recognise the new format.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 16:03:19 +00:00
Jonathan Earl Brassow
49b95a5e21 Off-by-one count was causing not all the mirror table parameters
that were necessary to be passed on to userspace.

The cluster mirror table (log portion only) used to look like this:
        clustered-disk <parm_count> <disk> <region_size> <uuid> \
                        [[no]sync] [block_on_error]
Now it looks like this:
        userspace <parm_count> <uuid> clustered-disk <disk> <region_size> \
                        [[no]sync]

So, there is one extra argument in the latter case - this was
unaccounted for.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
2010-01-15 16:00:23 +00:00