]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agomove WHATS_NEW entries whose changes were made after 2.02.60 to 2.02.61
Mike Snitzer [Tue, 2 Feb 2010 17:48:30 +0000 (17:48 +0000)]
move WHATS_NEW entries whose changes were made after 2.02.60 to 2.02.61

14 years agoAdd copy constructor for struct metadata_area.
Dave Wysochanski [Tue, 2 Feb 2010 16:26:34 +0000 (16:26 +0000)]
Add copy constructor for struct metadata_area.

Clean up cut&paste code with proper copy constructor.

14 years agoRemove pointless versioned symlinks to dmeventd plugin libraries.
Alasdair Kergon [Tue, 2 Feb 2010 14:09:17 +0000 (14:09 +0000)]
Remove pointless versioned symlinks to dmeventd plugin libraries.

14 years agoFix dmeventd snapshot plugin build dependency.
Alasdair Kergon [Tue, 2 Feb 2010 14:03:50 +0000 (14:03 +0000)]
Fix dmeventd snapshot plugin build dependency.

14 years agoMake clvmd -V return zero status rather than 1.
Christine Caulfield [Tue, 2 Feb 2010 08:54:29 +0000 (08:54 +0000)]
Make clvmd -V return zero status rather than 1.

14 years agoRemove unnecessary "dmsetup resume" after "dmsetup create".
Dave Wysochanski [Mon, 1 Feb 2010 19:43:22 +0000 (19:43 +0000)]
Remove unnecessary "dmsetup resume" after "dmsetup create".

It is not necessary to resume after a create since the create will
create the table and make it active.

14 years agoWas using dm_list_iterate_items when I should have been using
Jonathan Earl Brassow [Wed, 27 Jan 2010 22:28:05 +0000 (22:28 +0000)]
Was using dm_list_iterate_items when I should have been using
*_safe.  This had the effect of segfaulting the log daemon when
converting a mirror from one log type to another.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
14 years agoFix pvmove abort when temporary mirror fails to be cluster-aware.
Milan Broz [Wed, 27 Jan 2010 13:29:11 +0000 (13:29 +0000)]
Fix pvmove abort when temporary mirror fails to be cluster-aware.

When activation of pvmove mirror fails on cluster, some nodes
still possibly succeeded in activation.

 - Explicitly deactivate that mirror to be sure
 - properly pair suspend/resume calls to not cause memory lock problems in clvmd

Code cannot simply call _finish_pvmove on cluster in this situation, because
changed LVs are suspended twice (causing memory inbalance) and also temporary
mirror is activated when it is not expected (and we know that it failed already).

Patch prepares special function which remove temporary mirror references from
metadata and then resumes changed LVs.

14 years agoAlways query device by using uuid only and not name in clvmd.
Milan Broz [Wed, 27 Jan 2010 13:23:57 +0000 (13:23 +0000)]
Always query device by using uuid only and not name in clvmd.

Otherwise confusion with the device of the same name
(but different UUID, e.g. non-lvm device) can happen.

14 years agoAdd some missing vg_revrts calls when pvmove aborts.
Milan Broz [Tue, 26 Jan 2010 08:01:18 +0000 (08:01 +0000)]
Add some missing vg_revrts calls when pvmove aborts.

14 years agoUnlock shared lock if activation calls failed.
Milan Broz [Tue, 26 Jan 2010 08:00:02 +0000 (08:00 +0000)]
Unlock shared lock if activation calls failed.

Clvmd should unlock new lock if activation in device-mapper fails.

14 years agoFix return code of info callbacks.
Milan Broz [Tue, 26 Jan 2010 07:58:23 +0000 (07:58 +0000)]
Fix return code of info callbacks.

In dev_manager_info 0 means error and 1 info is returned,
not that device exists (that value is part of info struct).

Fix query by uuid only (no name) which returns 0 when device
does not exist.

14 years agopre-release
Alasdair Kergon [Sat, 23 Jan 2010 02:14:30 +0000 (02:14 +0000)]
pre-release

14 years agoDefault to checking LV's progress before waiting in _wait_for_single_lv.
Mike Snitzer [Fri, 22 Jan 2010 21:59:42 +0000 (21:59 +0000)]
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.

14 years agoa little more information for the cmirrord man page
Jonathan Earl Brassow [Fri, 22 Jan 2010 21:48:17 +0000 (21:48 +0000)]
a little more information for the cmirrord man page

14 years agoFix syntax error in cmirror init script
Milan Broz [Fri, 22 Jan 2010 16:19:38 +0000 (16:19 +0000)]
Fix syntax error in cmirror init script
 - break cannot be used here
 - remove CLVMDOPTS
 - add echo to stop call

14 years agoEliminate extra ioctls just to check open_count in _add_new_lv_to_dtree.
Mike Snitzer [Fri, 22 Jan 2010 15:40:31 +0000 (15:40 +0000)]
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.

14 years agoDocument undocumented commits which fixed some bugs.
Milan Broz [Fri, 22 Jan 2010 14:33:33 +0000 (14:33 +0000)]
Document undocumented commits which fixed some bugs.
Go WHATS_NEW!

14 years agoRemoved inactive_table check from _lv_has_target_type. This check
Mike Snitzer [Fri, 22 Jan 2010 13:28:54 +0000 (13:28 +0000)]
Removed inactive_table check from _lv_has_target_type.  This check
doesn't offer any benefit (that I can recall) and testing validates
that.

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.)

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