]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agoSwitch memory debugging off for now if compiled with dmeventd,
Milan Broz [Fri, 22 Jan 2010 13:20:32 +0000 (13:20 +0000)]
Switch memory debugging off for now if compiled with dmeventd,
functions are not thread-safe in debug mode.

14 years agoFix syslog prefix in the first message (dmeventd->lvm).
Milan Broz [Fri, 22 Jan 2010 12:48:58 +0000 (12:48 +0000)]
Fix syslog prefix in the first message (dmeventd->lvm).

14 years agoFix exported symbols for lvm2 dmeventd wrapper.
Milan Broz [Fri, 22 Jan 2010 12:38:16 +0000 (12:38 +0000)]
Fix exported symbols for lvm2 dmeventd wrapper.

14 years agoMove error message to locking constructor and print
Milan Broz [Fri, 22 Jan 2010 09:45:29 +0000 (09:45 +0000)]
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.

14 years agopost-release
Alasdair Kergon [Fri, 22 Jan 2010 01:09:09 +0000 (01:09 +0000)]
post-release

14 years agomissing header
Alasdair Kergon [Fri, 22 Jan 2010 00:43:28 +0000 (00:43 +0000)]
missing header

14 years agofix lib include
Alasdair Kergon [Fri, 22 Jan 2010 00:18:37 +0000 (00:18 +0000)]
fix lib include

14 years agopre-release
Alasdair Kergon [Thu, 21 Jan 2010 23:55:17 +0000 (23:55 +0000)]
pre-release

14 years agoAdd libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use.
Alasdair Kergon [Thu, 21 Jan 2010 22:15:45 +0000 (22:15 +0000)]
Add libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use.

14 years agoCall _alloc_pv() inside _pv_read() and clean up error paths.
Dave Wysochanski [Thu, 21 Jan 2010 21:09:23 +0000 (21:09 +0000)]
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().

14 years agoRemove useless memory allocation for pv->vg_name in _alloc_pv().
Dave Wysochanski [Thu, 21 Jan 2010 21:04:44 +0000 (21:04 +0000)]
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.

14 years agoCorrect 'void *' usage in pvcreate_single.
Dave Wysochanski [Thu, 21 Jan 2010 21:04:20 +0000 (21:04 +0000)]
Correct 'void *' usage in pvcreate_single.

Remove needless cast.

14 years agoLog entry for the last lvmcmdline.c commit
Zdenek Kabelac [Thu, 21 Jan 2010 17:14:18 +0000 (17:14 +0000)]
Log entry for the last lvmcmdline.c commit

14 years agoReset released pointer and counters.
Zdenek Kabelac [Thu, 21 Jan 2010 13:41:39 +0000 (13:41 +0000)]
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.

14 years agoPreload the origin prior to suspend IFF snapshot(s) still exist after a
Mike Snitzer [Wed, 20 Jan 2010 21:53:10 +0000 (21:53 +0000)]
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.

14 years agoFill in a little more on the man page for cmirrord
Jonathan Earl Brassow [Wed, 20 Jan 2010 15:17:25 +0000 (15:17 +0000)]
Fill in a little more on the man page for cmirrord

14 years agoDeal with a few more compiler warnings.
Alasdair Kergon [Wed, 20 Jan 2010 02:43:19 +0000 (02:43 +0000)]
Deal with a few more compiler warnings.

14 years agoAdd t-topology-support.sh and t-snapshot-merge.sh tests.
Mike Snitzer [Tue, 19 Jan 2010 23:02:04 +0000 (23:02 +0000)]
Add t-topology-support.sh and t-snapshot-merge.sh tests.

14 years agoadd test/t-snapshot-merge.sh to provide coverage of snapshot-merge support
Mike Snitzer [Tue, 19 Jan 2010 22:55:00 +0000 (22:55 +0000)]
add test/t-snapshot-merge.sh to provide coverage of snapshot-merge support

14 years agoRemove mknod() and add FIXMEs.
Alasdair Kergon [Tue, 19 Jan 2010 18:21:03 +0000 (18:21 +0000)]
Remove mknod() and add FIXMEs.
In the udev-world, this function should work differently.

14 years agoremove more compiler warnings
Alasdair Kergon [Tue, 19 Jan 2010 17:24:29 +0000 (17:24 +0000)]
remove more compiler warnings
add FIXMEs for incomplete write()s

14 years agotest/t-topology-support.sh requires scsi_debug from >= 2.6.31
Mike Snitzer [Tue, 19 Jan 2010 17:06:50 +0000 (17:06 +0000)]
test/t-topology-support.sh requires scsi_debug from >= 2.6.31

14 years agoremove no-longer-used header
Alasdair Kergon [Tue, 19 Jan 2010 17:04:05 +0000 (17:04 +0000)]
remove no-longer-used header

14 years agoremove no-longer-used files
Alasdair Kergon [Tue, 19 Jan 2010 17:01:17 +0000 (17:01 +0000)]
remove no-longer-used files

14 years agoAdd a common way to establish a scsi_debug-based 4K drive for use by an
Mike Snitzer [Tue, 19 Jan 2010 16:44:57 +0000 (16:44 +0000)]
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.

14 years agoupdate test/t-pvcreate-operation-md.sh attempt loading raid0.ko if raid0
Mike Snitzer [Tue, 19 Jan 2010 15:59:34 +0000 (15:59 +0000)]
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).

14 years agoSignal handling FIXMEs.
Alasdair Kergon [Tue, 19 Jan 2010 15:58:45 +0000 (15:58 +0000)]
Signal handling FIXMEs.
A few integer type changes.

14 years agoNever scan suspended devices in clvmd.
Milan Broz [Tue, 19 Jan 2010 13:25:00 +0000 (13:25 +0000)]
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).

14 years agoAnd more fixes for cmirror build.
Alasdair Kergon [Tue, 19 Jan 2010 02:04:33 +0000 (02:04 +0000)]
And more fixes for cmirror build.

14 years agomore build fixes
Alasdair Kergon [Tue, 19 Jan 2010 01:10:46 +0000 (01:10 +0000)]
more build fixes

14 years agoClean up include files.
Alasdair Kergon [Mon, 18 Jan 2010 21:07:24 +0000 (21:07 +0000)]
Clean up include files.

14 years agoFix some compiler warnings.
Jonathan Earl Brassow [Mon, 18 Jan 2010 20:58:50 +0000 (20:58 +0000)]
Fix some compiler warnings.

14 years agoMisc compilation clean-ups.
Alasdair Kergon [Mon, 18 Jan 2010 20:08:44 +0000 (20:08 +0000)]
Misc compilation clean-ups.

14 years agoChange dev_manager_mirror_percent()'s 'struct logical_volume *' to be
Mike Snitzer [Fri, 15 Jan 2010 22:58:25 +0000 (22:58 +0000)]
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."

14 years agoUse tabs, not spaces.
Jonathan Earl Brassow [Fri, 15 Jan 2010 21:48:03 +0000 (21:48 +0000)]
Use tabs, not spaces.

14 years agoInitial version of the cmirrord init script
Jonathan Earl Brassow [Fri, 15 Jan 2010 20:47:52 +0000 (20:47 +0000)]
Initial version of the cmirrord init script

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoinitial cmirrord man page
Jonathan Earl Brassow [Fri, 15 Jan 2010 20:24:04 +0000 (20:24 +0000)]
initial cmirrord man page

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoMake the intermachine communication structures architecture independant
Jonathan Earl Brassow [Fri, 15 Jan 2010 19:49:35 +0000 (19:49 +0000)]
Make the intermachine communication structures architecture independant
to allow for mixed architecture clusters.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoWhen moving the cluster log server into the LVM tree, the in memory
Jonathan Earl Brassow [Fri, 15 Jan 2010 18:48:24 +0000 (18:48 +0000)]
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>
14 years agoDetect case of both merging_store and cow_store supplied in
Mike Snitzer [Fri, 15 Jan 2010 17:46:08 +0000 (17:46 +0000)]
Detect case of both merging_store and cow_store supplied in
_snap_text_import().

14 years agoImprove target type compatibility checking in _percent_run().
Mike Snitzer [Fri, 15 Jan 2010 16:35:26 +0000 (16:35 +0000)]
Improve target type compatibility checking in _percent_run().
Add 'target_status_compatible' method to 'struct segtype_handler'.

14 years agoudpate WHATS_NEW*
Jonathan Earl Brassow [Fri, 15 Jan 2010 16:18:14 +0000 (16:18 +0000)]
udpate WHATS_NEW*

14 years agoAt some point "clustered_[core|disk]" was changed to "clustered-[core|disk]".
Jonathan Earl Brassow [Fri, 15 Jan 2010 16:03:19 +0000 (16:03 +0000)]
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>
14 years agoOff-by-one count was causing not all the mirror table parameters
Jonathan Earl Brassow [Fri, 15 Jan 2010 16:00:23 +0000 (16:00 +0000)]
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>
14 years agopost-release
Alasdair Kergon [Thu, 14 Jan 2010 14:42:06 +0000 (14:42 +0000)]
post-release

14 years agoNote some problems still to be addressed.
Alasdair Kergon [Thu, 14 Jan 2010 14:39:57 +0000 (14:39 +0000)]
Note some problems still to be addressed.

14 years agopre-release
Alasdair Kergon [Thu, 14 Jan 2010 14:02:34 +0000 (14:02 +0000)]
pre-release

14 years agoUpdate entry for few previous gcc cleanup commits.
Zdenek Kabelac [Thu, 14 Jan 2010 10:19:43 +0000 (10:19 +0000)]
Update entry for few previous gcc cleanup commits.

14 years agoCleanup const compiler warning
Zdenek Kabelac [Thu, 14 Jan 2010 10:17:12 +0000 (10:17 +0000)]
Cleanup const compiler warning

14 years agoCleanup gcc warning: cast discards qualifiers from pointer target type
Zdenek Kabelac [Thu, 14 Jan 2010 10:15:23 +0000 (10:15 +0000)]
Cleanup gcc warning: cast discards qualifiers from pointer target type

API of the library should remain the same as the 'const' is not
mangled into the function name in C.

14 years agoCleanup gcc warning: cast from function call of type 'struct dm_list *'
Zdenek Kabelac [Thu, 14 Jan 2010 10:12:44 +0000 (10:12 +0000)]
Cleanup gcc warning: cast from function call of type 'struct dm_list *'
to non-matching type 'long unsigned int'

Casting pointer to long and back to pointer could be easily
handled with just pointer arithmetic.

14 years agoCleanup gcc warning: null argument where non-null required (arg.2)
Zdenek Kabelac [Thu, 14 Jan 2010 10:11:26 +0000 (10:11 +0000)]
Cleanup gcc warning: null argument where non-null required (arg.2)
As the const declaration of execvp is a bit weird, using local
dmeventdpath string.

14 years agoMove initialization of the 'cmd' member of the struct alloc_handle
Zdenek Kabelac [Thu, 14 Jan 2010 10:09:42 +0000 (10:09 +0000)]
Move initialization of the 'cmd' member of the struct alloc_handle
before the first potentional return.

14 years agolvol%d is generated for NULL name in lv_create_empty().
Zdenek Kabelac [Thu, 14 Jan 2010 10:08:03 +0000 (10:08 +0000)]
lvol%d is generated for NULL name in lv_create_empty().
So just avoid code duplication.

14 years agoupdate WHATS_NEW and WHATS_NEW_DM to include snapshot-merge changes
Mike Snitzer [Wed, 13 Jan 2010 21:48:39 +0000 (21:48 +0000)]
update WHATS_NEW and WHATS_NEW_DM to include snapshot-merge changes

14 years agoFix clvmd automatic target module loading crash.
Milan Broz [Wed, 13 Jan 2010 17:40:17 +0000 (17:40 +0000)]
Fix clvmd automatic target module loading crash.

14 years agoRename segment and lv status flag from SNAPSHOT_MERGE to MERGING.
Mike Snitzer [Wed, 13 Jan 2010 01:56:18 +0000 (01:56 +0000)]
Rename segment and lv status flag from SNAPSHOT_MERGE to MERGING.

Eliminate 'merging_snapshot' from 'struct logical_volume' and just use
'snapshot' for origin lv's reference to the merging snapshot; also set
MERGING in the origin lv's status.

14 years agoAdd snapshot merge wrappers to abstract the associations and flags used
Mike Snitzer [Wed, 13 Jan 2010 01:55:43 +0000 (01:55 +0000)]
Add snapshot merge wrappers to abstract the associations and flags used
to represent merging origin and snapshot volumes.

14 years agoUpdate lvconvert manpage for snapshot --merge
Mike Snitzer [Wed, 13 Jan 2010 01:55:05 +0000 (01:55 +0000)]
Update lvconvert manpage for snapshot --merge

14 years agoMerge on activate support.
Mike Snitzer [Wed, 13 Jan 2010 01:54:34 +0000 (01:54 +0000)]
Merge on activate support.

If either the origin or snapshot that is to be merged is open the merge
will not start; only the merge metadata will be written.  The merge will
start on the next activation of the origin (or via lvchange --refresh)
IFF both the origin and snapshot are closed.

Merge on activate is particularly important if we want to merge over a
mounted filesystem that cannot be unmounted (until next boot) --- for
example root.

14 years agoWhen turning merging origin into non-merging origin, there is bad sequence:
Mike Snitzer [Wed, 13 Jan 2010 01:52:58 +0000 (01:52 +0000)]
When turning merging origin into non-merging origin, there is bad sequence:
snapshots are suspended, new origin is created, snapshots are resumed, new
origin is resumed.  So it allocates memory while suspended.

To fix it, move vg_commit after suspend_lv, so that the suspend code will
treat it as precommitted vg and will preload new origin prior to suspend.

NOTE: agk doesn't like this "hack"; need to revisit and fix

14 years agoReload origin if merging has stopped.
Mike Snitzer [Wed, 13 Jan 2010 01:51:45 +0000 (01:51 +0000)]
Reload origin if merging has stopped.

14 years agoStart background polling of merging stores on:
Mike Snitzer [Wed, 13 Jan 2010 01:50:34 +0000 (01:50 +0000)]
Start background polling of merging stores on:
- lvchange -ay or vgchange -ay.
- lvchange --refresh or vgchange --refresh.

14 years agoBackground poll for lvconvert --merge command.
Mike Snitzer [Wed, 13 Jan 2010 01:49:52 +0000 (01:49 +0000)]
Background poll for lvconvert --merge command.
The merging snapshot is removed when the merge finishes.

14 years agoWhen there is merging snapshot, report percentage on the origin LV.
Mike Snitzer [Wed, 13 Jan 2010 01:49:22 +0000 (01:49 +0000)]
When there is merging snapshot, report percentage on the origin LV.
Because the snapshot LV will be hidden this is needed so the user can
see merging progress with "lvs" command.

14 years agoReport merging snapshot as 'S' instead of 's':
Mike Snitzer [Wed, 13 Jan 2010 01:48:38 +0000 (01:48 +0000)]
Report merging snapshot as 'S' instead of 's':
This is useful for when the snapshot is still active and merging hasn't
started yet; it shows a merge is pending.  Once merging starts the
merging snapshot will be hidden but can still be displayed with 'lvs -a'

Report snapshot origin with merging snapshot as 'O' instead of 'o':
Before merge starts this shows that a merge is pending.  While merging
the snapshot will be hidden, 'O' enables a user to see that there is a
snapshot merging.

14 years agoDo not allow merging over mounted logical volumes.
Mike Snitzer [Wed, 13 Jan 2010 01:47:18 +0000 (01:47 +0000)]
Do not allow merging over mounted logical volumes.
When preserving origin, check that the snapshot is not mounted.

14 years agoAdd --merge support to lvconvert to start merging a snapshot into its
Mike Snitzer [Wed, 13 Jan 2010 01:45:15 +0000 (01:45 +0000)]
Add --merge support to lvconvert to start merging a snapshot into its
origin, example usage:  lvconvert --merge vg/snaplv

14 years agoMerging device is loaded with "-cow" suffix and with base name of the
Mike Snitzer [Wed, 13 Jan 2010 01:44:37 +0000 (01:44 +0000)]
Merging device is loaded with "-cow" suffix and with base name of the
origin.  This is needed so that "-cow" device can be found and removed
when lvremove is performed.

14 years agoConditionally push down either the "snapshot-origin" or
Mike Snitzer [Wed, 13 Jan 2010 01:43:32 +0000 (01:43 +0000)]
Conditionally push down either the "snapshot-origin" or
"snapshot-merge" target based on whether the LV is a merging snapshot.

When activating a snapshot-merge target do not attempt to monitor the
LV for events; the polldaemon will monitor the snapshot as it is
merged.

Allow "snapshot-merge" target's usage to be parsed via standard
"snapshot" methods.

NOTE: follow on fixes to the _percent_run change are still needed

14 years agoAdd support for "snapshot-merge" target.
Mike Snitzer [Wed, 13 Jan 2010 01:39:44 +0000 (01:39 +0000)]
Add support for "snapshot-merge" target.

Introduces new libdevmapper function dm_tree_node_add_snapshot_merge_target

Verifies that the kernel (dm-snapshot) provides the 'snapshot-merge'
target.

Activate origin LV as snapshot-merge target.  Using snapshot-origin
target would be pointless because the origin contains volatile data
while a merge is in progress.

Because snapshot-merge target is activated in place of the
snapshot-origin target it must be resumed after all other snapshots
(just like snapshot-origin does) --- otherwise small window for data
corruption would exist.

Ideally the merging snapshot would not be activated at all but if it is
to be activated (because snapshot was already active) it _must_ be done
after the snapshot-merge.  This insures that DM's snapshot-merge target
will perform exception handover in the proper order (new->resume before
old->resume).  DM's snapshot-merge does support handover if the reverse
sequence is used (old->resume before new->resume) but DM will fail to
resume the old snapshot; leaving it suspended.

To insure the proper activation sequence dm_tree_activate_children() was
updated to accommodate an additional 'activation_priority' level.  All
regular snapshots are 0, snapshot-merge is 1, and merging snapshot is 2.

14 years agoAdd 'SNAPSHOT_MERGE' lv_segment 'status' flag.
Mike Snitzer [Wed, 13 Jan 2010 01:35:49 +0000 (01:35 +0000)]
Add 'SNAPSHOT_MERGE' lv_segment 'status' flag.

Make 'merging_snapshot' pointer that points from the origin to the
segment that represents the merging snapshot.

Import/export 'merging_store' metadata.

Do not allow creating snapshots while another snapshot is merging.
Snapshot created in this state would certainly contain invalid data.

NOTE: patches at the end of this series will remove 'merging_snapshot'
and will introduce helpful wrappers and cleanups.

14 years agoFix allocation code not to stop at the first area of a PV that fits.
Alasdair Kergon [Tue, 12 Jan 2010 20:53:20 +0000 (20:53 +0000)]
Fix allocation code not to stop at the first area of a PV that fits.

This spurious 'break' has been here since this code was first committed
in June 2005 and stopped the algorithm behaving as described in the
comment above it and rendered the variable 'already_found_one' useless.

14 years agopost-release
Alasdair Kergon [Tue, 12 Jan 2010 14:46:59 +0000 (14:46 +0000)]
post-release

14 years agopre-release
Alasdair Kergon [Tue, 12 Jan 2010 14:39:07 +0000 (14:39 +0000)]
pre-release

14 years agodisable 'redundant' tests
Alasdair Kergon [Tue, 12 Jan 2010 14:19:46 +0000 (14:19 +0000)]
disable 'redundant' tests

14 years agoRevert so-called "redundant" log until after next release.
Alasdair Kergon [Tue, 12 Jan 2010 14:00:51 +0000 (14:00 +0000)]
Revert so-called "redundant" log until after next release.

14 years ago.
Alasdair Kergon [Mon, 11 Jan 2010 21:44:36 +0000 (21:44 +0000)]
.

14 years agoAdd missing items to WHATS_NEW files.
Alasdair Kergon [Mon, 11 Jan 2010 21:28:04 +0000 (21:28 +0000)]
Add missing items to WHATS_NEW files.
Continue to use 'field' to describe reporting elements.

14 years agoAdd new test cases for mirrors that are under snapshots.
Jonathan Earl Brassow [Mon, 11 Jan 2010 21:27:49 +0000 (21:27 +0000)]
Add new test cases for mirrors that are under snapshots.

14 years agoTestsuite updates and fixes for recently added features.
Jonathan Earl Brassow [Mon, 11 Jan 2010 21:20:19 +0000 (21:20 +0000)]
Testsuite updates and fixes for recently added features.

1. Found bug in 'redundant log' implementation that caused
   problems when converting a linear that spanned multiple
   devices to a mirror (wasn't checking for NULL value of
   provided parameter in _alloc_parallel_area)

2. Testsuite was failing to perform tests when 'not' modifier
   was used.  This allowed a couple issues to slip through.
   Added a 'not_sh' modifier that negates tests performed by
   functions defined in the shell source file.

3. Was initializing a variable to far down, which cause
   previously set value to be overridden.  (This was the
   result of the collision of the "redundant log" and
   lvconvert fix patches.)

14 years agoUse _LOG_FATAL when aborting on an internal error.
Alasdair Kergon [Mon, 11 Jan 2010 20:41:39 +0000 (20:41 +0000)]
Use _LOG_FATAL when aborting on an internal error.

14 years agoInternal errors triggering abort cannot be suppressed. (kabi)
Alasdair Kergon [Mon, 11 Jan 2010 20:30:32 +0000 (20:30 +0000)]
Internal errors triggering abort cannot be suppressed. (kabi)

14 years agoOnly allow one return from poll_daemon(). If a child polldaemon was
Mike Snitzer [Mon, 11 Jan 2010 19:19:17 +0000 (19:19 +0000)]
Only allow one return from poll_daemon().  If a child polldaemon was
successfully created it must _exit() once it completes.

Update _become_daemon() to differentiate between a failed fork() and a
successful fork().

Added lvm_return_code() to lvmcmdline.[ch]

14 years agoremove errant comment fragment
Mike Snitzer [Mon, 11 Jan 2010 19:12:25 +0000 (19:12 +0000)]
remove errant comment fragment

14 years agoReset _vgs_locked in lvmcache_init()
Mike Snitzer [Mon, 11 Jan 2010 19:08:18 +0000 (19:08 +0000)]
Reset _vgs_locked in lvmcache_init()

Upon successful fork(), _become_daemon() must assert that the locks that
are currently held belong to the parent, not the child.  All of the
child's internal state saying 'this process holds a lock' has to be
reset.

A proper lvmcache_locking_reset() should follow later.

14 years agoFound 2 problems with my previous check-in:
Jonathan Earl Brassow [Mon, 11 Jan 2010 17:13:45 +0000 (17:13 +0000)]
Found 2 problems with my previous check-in:

 date: 2010/01/07 20:42:55;  author: jbrassow;  state: Exp;  lines: +11 -0
 The patch fixes some lvconvert issues (WRT mirror <-> mirror).

1) 'exisiting_mirrors' and 'lp->mirrors' where taken to be in 'n-1'
   notation (i.e a 2-way mirror is '1' and a linear is '0'), but the
   variables were in 'n' notation.
2) After adding the redundant mirror log support, I was calculating
   log_count by looking at the mirror log LV, but didn't take into
   account the fact that there could be no mirror log!

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoSubstitute UDEV_SYNC value for use in the other files and show a warning message...
Peter Rajnoha [Mon, 11 Jan 2010 15:59:54 +0000 (15:59 +0000)]
Substitute UDEV_SYNC value for use in the other files and show a warning message when libudev not found and using udev_sync.

14 years agoShow a warning message when libudev not found and we're using --enable-udev_sync.
Peter Rajnoha [Mon, 11 Jan 2010 15:51:44 +0000 (15:51 +0000)]
Show a warning message when libudev not found and we're using --enable-udev_sync.

Just to emphasize what one can expect - we won't be able to get udev state
and we will consider that udev is not running at all.

14 years agoDefine {DM, LVM}_UDEV_DISABLE_CHECKING=1 env. variables for tests.
Peter Rajnoha [Mon, 11 Jan 2010 15:48:49 +0000 (15:48 +0000)]
Define {DM, LVM}_UDEV_DISABLE_CHECKING=1 env. variables for tests.

We need to disable udev checking for our tests since they use their own
location for device nodes and symlinks.

14 years agoEnable udev_sync and udev_rules in lvm.conf by default while running tests.
Peter Rajnoha [Mon, 11 Jan 2010 15:43:19 +0000 (15:43 +0000)]
Enable udev_sync and udev_rules in lvm.conf by default while running tests.

14 years agoAdd support to disable udev checking: LVM_UDEV_DISABLE_CHECKING=1 env. var.
Peter Rajnoha [Mon, 11 Jan 2010 15:40:03 +0000 (15:40 +0000)]
Add support to disable udev checking: LVM_UDEV_DISABLE_CHECKING=1 env. var.

LVM_UDEV_DISABLE_CHECKING=1 applies for /dev/<vgname> content only.
We still need to define DM_UDEV_DISABLE_CHECKING=1 for /dev/mapper content.

14 years agoAdd support to disable udev checking: DM_UDEV_DISABLE_CHECKING=1 env. variable.
Peter Rajnoha [Mon, 11 Jan 2010 15:36:24 +0000 (15:36 +0000)]
Add support to disable udev checking: DM_UDEV_DISABLE_CHECKING=1 env. variable.

Sometimes it is really needed to switch off udev checking and the warnings we show when
we detect that udev has not done its job right - the messages like "Udev should have done
this and that. Falling back to direct node creation/removal. " etc.

This would be especially handy while setting DM_DEV_DIR env var that could be set to a
different location than standard /dev (udev can't create nodes/symlinks out of that one
directory that is configured into udevd). The exact same situation happens while we're
running our tests.

14 years agoremove unused variable 'i' that was recently introduced in lv_add_segment
Mike Snitzer [Sun, 10 Jan 2010 20:44:09 +0000 (20:44 +0000)]
remove unused variable 'i' that was recently introduced in lv_add_segment

14 years agoupdate comment
Jonathan Earl Brassow [Fri, 8 Jan 2010 23:06:36 +0000 (23:06 +0000)]
update comment

14 years agoAdd the new mirror log type "redundant". The options are now:
Jonathan Earl Brassow [Fri, 8 Jan 2010 22:32:35 +0000 (22:32 +0000)]
Add the new mirror log type "redundant".  The options are now:
--mirrorlog core: in-memory log
--mirrorlog disk: persistent log
--mirrorlog redundant: redundant persistent log

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoudpate WHATS_NEW file for --splitmirror checkin
Jonathan Earl Brassow [Fri, 8 Jan 2010 22:28:54 +0000 (22:28 +0000)]
udpate WHATS_NEW file for --splitmirror checkin

14 years agoThis patch adds the capability to split off a mirror legs.
Jonathan Earl Brassow [Fri, 8 Jan 2010 22:00:31 +0000 (22:00 +0000)]
This patch adds the capability to split off a mirror legs.
It is pretty much the same as reducing the number of
mirror legs, but we just don't delete them afterwards.

The following command line interface is enforced:
  prompt> lvconvert --splitmirror <n> -n <name> <VG>/<LV>
where 'n' is the number of images to split off, and
where 'name' is the name of the newly split off logical volume.

If more than one leg is split off, a new mirror will be the
result.  The newly split off mirror will have a 'core' log.
Example:
[root@bp-01 LVM2]# !lvs
lvs -a -o name,copy_percent,devices
  LV            Copy%  Devices
  lv            100.00 lv_mimage_0(0),lv_mimage_1(0),lv_mimage_2(0),lv_mimage_3(0)
  [lv_mimage_0]        /dev/sdb1(0)
  [lv_mimage_1]        /dev/sdc1(0)
  [lv_mimage_2]        /dev/sdd1(0)
  [lv_mimage_3]        /dev/sde1(0)
  [lv_mlog]            /dev/sdi1(0)
[root@bp-01 LVM2]# lvconvert --splitmirrors 2 --name split vg/lv /dev/sd[ce]1
  Logical volume lv converted.
[root@bp-01 LVM2]# !lvs
lvs -a -o name,copy_percent,devices
  LV               Copy%  Devices
  lv               100.00 lv_mimage_0(0),lv_mimage_2(0)
  [lv_mimage_0]           /dev/sdb1(0)
  [lv_mimage_2]           /dev/sdd1(0)
  [lv_mlog]               /dev/sdi1(0)
  split            100.00 split_mimage_0(0),split_mimage_1(0)
  [split_mimage_0]        /dev/sde1(0)
  [split_mimage_1]        /dev/sdc1(0)

It can be seen that '--splitmirror <n>' is exactly the same
as '--mirrors -<n>' (note the minus sign), except there is the
additional notion to keep the image being detached from the
mirror instead of just throwing it away.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoChange background polldaemon's process name to "(lvm2)".
Mike Snitzer [Fri, 8 Jan 2010 21:53:07 +0000 (21:53 +0000)]
Change background polldaemon's process name to "(lvm2)".

Made .update_metadata optional in 'struct poll_functions' definitions;
eliminated _update_lvconvert_mirror() stub.

Tweak a mirror-specific error message in the generic polldaemon code.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
14 years agoAllow vgremove of a VG with PVs missing.
Petr Rockai [Fri, 8 Jan 2010 14:03:54 +0000 (14:03 +0000)]
Allow vgremove of a VG with PVs missing.

This page took 0.06554 seconds and 5 git commands to generate.