]> sourceware.org Git - lvm2.git/log
lvm2.git
15 years agoFix convert polling to ignore LV with different UUID.
Milan Broz [Mon, 1 Jun 2009 14:43:27 +0000 (14:43 +0000)]
Fix convert polling to ignore LV with different UUID.

When mirror convert polling is started (mainly as backgound process,
in lvchange -a y or in lvconvert itself) it tries to read VG
and LV identified by its name.

Unfortunatelly, the VG can have already different LV under the same name,
and various more or less funny things can happen (note that
_finish_lvconvert_mirror suspends the volume for example).

(the typical example is our testing script which continuously recreates
LVs under the same name in the same VG.)

This patch adds optional uuid parameter which helps to properly
select the monitoring object. For lvconvert polling it is set to LV UUID
and both _get_lvconvert_vg and _get_lvconvert_lv uses it to read proper VG/LV.

(In the pvmove case it is NULL, here we poll for physical volume name).

15 years agoFix log allocation segfault (fix previous commits).
Milan Broz [Mon, 1 Jun 2009 14:23:38 +0000 (14:23 +0000)]
Fix log allocation segfault (fix previous commits).

If there is no free area for log, code should break the loop.
(Otherwise it uses uninitializes areas later.)

Easily reproducible using lvconvert --repair
 - kill device with log
 - run lvconvert --repair vg/lv (with no PV usable for log)

15 years agoFix readahead calculation problems.
Milan Broz [Mon, 1 Jun 2009 12:43:31 +0000 (12:43 +0000)]
Fix readahead calculation problems.

During vgreduce is failed mirror image replaced with error segment,
this segmant type has always area_count == 0.
Current code expects that there is at least one area with device,
patch fixes it by additional check (fixes segfault during vgreduce).

Also do not calculate readahead in every lv_info call, we only need
to cache PV readahead before activation calls which locks memory.

15 years agoRemove verbose 'visited' messages.
Alasdair Kergon [Sat, 30 May 2009 01:54:29 +0000 (01:54 +0000)]
Remove verbose 'visited' messages.

15 years agoHandle multi-extent mirror log allocation when smallest PV has only 1 extent.
Alasdair Kergon [Sat, 30 May 2009 00:09:27 +0000 (00:09 +0000)]
Handle multi-extent mirror log allocation when smallest PV has only 1 extent.

15 years agoFix 'service-default-enabled' rpmlint in clvmd initscript
Mike Snitzer [Fri, 29 May 2009 18:54:48 +0000 (18:54 +0000)]
Fix 'service-default-enabled' rpmlint in clvmd initscript

15 years agoFix rpmlint in clvmd initscript
Mike Snitzer [Fri, 29 May 2009 18:34:10 +0000 (18:34 +0000)]
Fix rpmlint in clvmd initscript

Added missing LSB stanza lines.
Added reload capability.
Remaining warning (incoherent-init-script-name) is not relevant.

15 years agoWhen creating new LV, double-check that name is not already in use.
Alasdair Kergon [Thu, 28 May 2009 01:59:37 +0000 (01:59 +0000)]
When creating new LV, double-check that name is not already in use.

15 years agoRemove /dev/vgname/lvname symlink automatically if LV is no longer visible.
Alasdair Kergon [Thu, 28 May 2009 01:11:29 +0000 (01:11 +0000)]
Remove /dev/vgname/lvname symlink automatically if LV is no longer visible.

15 years agoRename internal vorigin LV to match visible LV.
Alasdair Kergon [Thu, 28 May 2009 00:29:14 +0000 (00:29 +0000)]
Rename internal vorigin LV to match visible LV.

15 years agoSuppress 'removed' messages displayed when internal LVs are removed.
Alasdair Kergon [Wed, 27 May 2009 18:19:21 +0000 (18:19 +0000)]
Suppress 'removed' messages displayed when internal LVs are removed.
Fix lvchange -a and -p for sparse LVs.
Fix lvcreate --virtualsize to activate the new device immediately.

15 years agoMake --snapshot optional with lvcreate --virtualsize.
Alasdair Kergon [Wed, 27 May 2009 16:30:29 +0000 (16:30 +0000)]
Make --snapshot optional with lvcreate --virtualsize.
Generalise --virtualoriginsize to --virtualsize.

15 years agoSkip virtual origins in process_each_lv_in_vg(). (mbroz)
Alasdair Kergon [Wed, 27 May 2009 13:23:41 +0000 (13:23 +0000)]
Skip virtual origins in process_each_lv_in_vg(). (mbroz)

15 years agoFix counting of virtual origin LVs in vg_validate. (mbroz)
Alasdair Kergon [Wed, 27 May 2009 13:19:34 +0000 (13:19 +0000)]
Fix counting of virtual origin LVs in vg_validate. (mbroz)

15 years ago0->NULL (mbroz)
Alasdair Kergon [Wed, 27 May 2009 13:07:37 +0000 (13:07 +0000)]
0->NULL (mbroz)

15 years agoAttempt to load dm-zero module if zero target needed but not present. (mbroz)
Alasdair Kergon [Wed, 27 May 2009 13:05:53 +0000 (13:05 +0000)]
Attempt to load dm-zero module if zero target needed but not present. (mbroz)

15 years agopost-release
Alasdair Kergon [Fri, 22 May 2009 15:23:10 +0000 (15:23 +0000)]
post-release

15 years agoTemporary disable one of lvconvert tests.
Milan Broz [Fri, 22 May 2009 14:56:17 +0000 (14:56 +0000)]
Temporary disable one of lvconvert tests.

15 years agoRename liblvm.so to liblvm2app.so and use configure --enable-applib.
Alasdair Kergon [Fri, 22 May 2009 14:44:59 +0000 (14:44 +0000)]
Rename liblvm.so to liblvm2app.so and use configure --enable-applib.

15 years agoReinstate version in liblvm2cmd.so soname. (2.02.44)
Alasdair Kergon [Thu, 21 May 2009 11:11:29 +0000 (11:11 +0000)]
Reinstate version in liblvm2cmd.so soname. (2.02.44)

15 years agoPre-release cleanups.
Alasdair Kergon [Thu, 21 May 2009 03:04:52 +0000 (03:04 +0000)]
Pre-release cleanups.

15 years agoMissing entries.
Alasdair Kergon [Wed, 20 May 2009 22:44:10 +0000 (22:44 +0000)]
Missing entries.

15 years agoRevert:
Alasdair Kergon [Wed, 20 May 2009 22:24:48 +0000 (22:24 +0000)]
Revert:
    Use lvconvert --repair in dmeventd mirror DSO.
for now.

It replaces bad behaviour in one set of circumstances with bad behaviour
in a different set.  We think the behaviour needs to be more configurable.

15 years agoFix locking query compatibility with old external locking libraries.
Milan Broz [Wed, 20 May 2009 12:58:03 +0000 (12:58 +0000)]
Fix locking query compatibility with old external locking libraries.

15 years agoFix readahead test.
Milan Broz [Wed, 20 May 2009 11:27:14 +0000 (11:27 +0000)]
Fix readahead test.

15 years agoUse readahead of underlying device and not default (smaller) one.
Milan Broz [Wed, 20 May 2009 11:09:49 +0000 (11:09 +0000)]
Use readahead of underlying device and not default (smaller) one.

When we are stacking LV over device, which has for some reason
increased read_ahead (e.g. MD RAID), the read_ahead hint
for libdevmapper is wrong (it is zero).

If the calculated read_ahead hint is zero, patch uses read_ahead of underlying device
(if first segment is PV) when setting DM_READ_AHEAD_MINIMUM_FLAG.

Because we are using dev-cache, it also store this value to cache for future use
(if several LVs are over one PV, BLKRAGET is called only once for underlying device.)

This should fix all the reamining problems with readahead mismatch reported
for DM over MD configurations (and similar cases).

15 years agoUse lock query instead of activate_lv_excl
Milan Broz [Wed, 20 May 2009 09:55:33 +0000 (09:55 +0000)]
Use lock query instead of activate_lv_excl

 - switch lvremove to not force activate volume when removing
 - ditto for force resync

 - fix some wrong return codes in lvchange_resync()

15 years agoUse suspend with flush when device size was changed during table preload.
Milan Broz [Wed, 20 May 2009 09:52:37 +0000 (09:52 +0000)]
Use suspend with flush when device size was changed during table preload.

This allows online mirror resize, also removes condition to preventing
code to do this.

15 years agoAdd test - lvconvert from linear (on multiple PVs) to mirror.
Dave Wysochanski [Tue, 19 May 2009 15:47:50 +0000 (15:47 +0000)]
Add test - lvconvert from linear (on multiple PVs) to mirror.

15 years agoAdd infrastructure for queriying for remote locks.
Milan Broz [Tue, 19 May 2009 10:38:58 +0000 (10:38 +0000)]
Add infrastructure for queriying for remote locks.

Current code, when need to ensure that volume is not
active on remote node, it need to try to exclusive
activate volume.

Patch adds simple clvmd command which queries all nodes
for lock for given resource.

The lock type is returned in reply in text.

(But code currently uses CR and EX modes only.)

15 years agoFix lvconvert check for multiple-segment mirrors (mornfall)
Milan Broz [Tue, 19 May 2009 10:27:47 +0000 (10:27 +0000)]
Fix lvconvert check for multiple-segment mirrors (mornfall)

15 years agoUse lvconvert --repair in dmeventd DSO (mornfall)
Milan Broz [Tue, 19 May 2009 10:25:16 +0000 (10:25 +0000)]
Use lvconvert --repair in dmeventd DSO (mornfall)

This means two things:

1) Non-mirrored LVs will be no longer affected by mirror monitoring. (Before,
if you had a LV that went partially missing on a VG where a mirror leg failed,
this LV would be removed automatically by dmeventd... Probably not an
unrecoverable dataloss bug, but still quite unpleasant.)

2) If enough parallel PV space is available at the time of the mirror failure,
the failed devices will be automatically replaced using this spare space. Which
(and whether) free space may be used is still not configurable, but is a
planned feature. Since it is relatively easy to undo the action by converting
the mirror manually, I don't consider this to be a showstopper. In fact, I
think the compromise is much better than what we have now.

15 years agoFix compilation warning.
Milan Broz [Tue, 19 May 2009 10:12:41 +0000 (10:12 +0000)]
Fix compilation warning.

15 years agoIf pvmove fails activating mirror volume, try restore to previous state.
Milan Broz [Tue, 19 May 2009 09:51:02 +0000 (09:51 +0000)]
If pvmove fails activating mirror volume, try restore to previous state.

pvmove now keep suspended devices if temporary mirror creation fails.

We can try to restore previous state if it is first attempt to activate
pvmove (code basically run the same code as --abort automatically).

15 years agoUse PV UUID in hash for device name when exporting metadata.
Milan Broz [Tue, 19 May 2009 09:48:32 +0000 (09:48 +0000)]
Use PV UUID in hash for device name when exporting metadata.

Currently code uses pv_dev_name() for hash when getting internal
"pvX" name.

This produce corrupted metadata if PVs are missing, pv->dev
is NULL and all these missing devices returns one name
(using "unknown device" for all missing devices as hash key).

15 years agovgcfgrestore should not quietly fail when backup file has missing PVs.
Milan Broz [Tue, 19 May 2009 09:45:33 +0000 (09:45 +0000)]
vgcfgrestore should not quietly fail when backup file has missing PVs.

(fixes previous commit: Fix segfault for vgcfgrestore on VG with missing PVs.)

15 years agoAdd vgimportclone and install it and the man page by default.
Mike Snitzer [Thu, 14 May 2009 16:46:12 +0000 (16:46 +0000)]
Add vgimportclone and install it and the man page by default.

15 years agoCheck max_lv on only place and force the check only for new volume.
Milan Broz [Wed, 13 May 2009 21:29:10 +0000 (21:29 +0000)]
Check max_lv on only place and force the check only for new volume.

We can temporarily violate max_lv during mirror conversion etc.

(If the operation fails, orphan mirror images are visible to administrator
for manual remove for example. Not that this should ever happen:-)

Force limit only for lvcreate (and vg merge) command.

Patch also adds simple max_lv tests into testsuite

15 years agoRemove unneeded import parameter from lv_create_empty.
Milan Broz [Wed, 13 May 2009 21:28:31 +0000 (21:28 +0000)]
Remove unneeded import parameter from lv_create_empty.

15 years agoMerge lv_is_displayable and lv_is_visible.
Milan Broz [Wed, 13 May 2009 21:27:43 +0000 (21:27 +0000)]
Merge lv_is_displayable and lv_is_visible.

Displayable and visible is the same thing.

volumes_count(vg) is now vg_visible_lvs() and always
returns number of LVs from user perspective.

15 years agoIntroduce lv_set_visible & lv_set_invisible and use lv_is_visible always.
Milan Broz [Wed, 13 May 2009 21:26:45 +0000 (21:26 +0000)]
Introduce lv_set_visible & lv_set_invisible and use lv_is_visible always.

The vg->lv_count parameter now includes always number of visible
logical volumes.

Note that virtual snapshot volume (snapshotX) is never visible,
but it is stored in metadata with visible flag.

15 years agoFix lv_is_visible to handle virtual origin.
Milan Broz [Wed, 13 May 2009 21:25:45 +0000 (21:25 +0000)]
Fix lv_is_visible to handle virtual origin.

Snapshot is visible if its origin is marked visible,
or if the origin is virtual.

15 years agoIntroduce link_lv_to_vg and unlink_lv_from_vg functions.
Milan Broz [Wed, 13 May 2009 21:25:01 +0000 (21:25 +0000)]
Introduce link_lv_to_vg and unlink_lv_from_vg functions.

link_lv_to_vg and unlink_lv_from_vg are the only functions
for adding/removing logical volume from volume group.

Only these function should manipulate with vg->lvs list.

15 years agoTidy format1 import LV function.
Milan Broz [Wed, 13 May 2009 21:24:12 +0000 (21:24 +0000)]
Tidy format1 import LV function.

Later patch initializes lv->vg after the LV structure is prepared,
so pass through cmd context and do not use vg->cmd here.
Also move LV id calculation (which uses lv->vg too).

Also properly free memory pool if operation fails.

15 years agoRemove vg->lv_count and use counter function.
Milan Broz [Wed, 13 May 2009 21:22:57 +0000 (21:22 +0000)]
Remove vg->lv_count and use counter function.

This should not cause problems but simplifies code a lot.

(the volumes_count is merged and renamed with lvs_visible
function by following patch.)

15 years agoFix snapshot segment import to not use duplicate segments & replace.
Milan Broz [Wed, 13 May 2009 21:21:58 +0000 (21:21 +0000)]
Fix snapshot segment import to not use duplicate segments & replace.

The snapshot segment (snapshotX) is created twice
during the text metadata segment processing.

This can cause temporary violation of max_lv count.

Simplify the code, snapshot segment is properly initialized
in init_snapshot_seg function now and do not need to be replaced
by vg_add_snapshot call.

The vg_add_snapshot() is now usefull only for adding new
snapshot and it shares the same initialization function.

The snapshot name is always generated, name paramater can be
removed from function call.

15 years agoUpdate test-utils to cope with ":" in device names and allow configurable names.
Dave Wysochanski [Wed, 13 May 2009 19:18:47 +0000 (19:18 +0000)]
Update test-utils to cope with ":" in device names and allow configurable names.

15 years agoDo not query nonexistent devices for readahead.
Zdenek Kabelac [Wed, 13 May 2009 14:13:54 +0000 (14:13 +0000)]
Do not query nonexistent devices for readahead.

15 years agoRemove NON_BLOCKING lock flag from tools and set a policy to auto-set.
Dave Wysochanski [Wed, 13 May 2009 13:02:52 +0000 (13:02 +0000)]
Remove NON_BLOCKING lock flag from tools and set a policy to auto-set.

As a simplification to the tools and further liblvm, this patch pushes
the setting of NON_BLOCKING lock flag inside the lock_vol() call.
The policy we set is if any existing VGs are currently locked, we
set the NON_BLOCKING flag.

Should be no functional change.

15 years agobetter variable name for snapshot counting
Alasdair Kergon [Wed, 13 May 2009 01:48:18 +0000 (01:48 +0000)]
better variable name for snapshot counting

15 years agoRemove snapshot_count from VG and use function instead.
Milan Broz [Tue, 12 May 2009 19:12:09 +0000 (19:12 +0000)]
Remove snapshot_count from VG and use function instead.

15 years agoFix first_seg() call for empty segment list.
Milan Broz [Tue, 12 May 2009 19:09:21 +0000 (19:09 +0000)]
Fix first_seg() call for empty segment list.

The seg variable is temporary variable for list iterator,
code cannot expect that after iteration it remains NULL
(it contains non-NULL pointer here id list is empty).

Patch fixes first_seg function so it now correctly returns NULL
for empty segment list.

15 years agoUpdate t-read-ahead.sh to validate lv_read_ahead and lv_kernel_read_ahead.
Dave Wysochanski [Mon, 11 May 2009 16:17:12 +0000 (16:17 +0000)]
Update t-read-ahead.sh to validate lv_read_ahead and lv_kernel_read_ahead.

- check default values
- check active/inactive values

15 years agoFix previous commit (scripts/Makefile targets order)
Milan Broz [Mon, 11 May 2009 10:35:00 +0000 (10:35 +0000)]
Fix previous commit (scripts/Makefile targets order)

15 years agoIntroduce lvm2_install target.
Milan Broz [Mon, 11 May 2009 10:28:45 +0000 (10:28 +0000)]
Introduce lvm2_install target.

Buildsystem support device-mapper only install,
but generic install tagret includes both dm+lvm2.

For distribution which uses separate install_device-mapper,
there is no way how to install lvm2 only
(so after installing lvm2 for packaging purposes
built system must remove installed device-mapper files).

Fix it by allowing lvm2_install target, similarily like
install_cluster for clvmd.

(install = install_device-mapper + install_lvm2)

15 years agoFix device-mapper static build targets.
Milan Broz [Mon, 11 May 2009 10:13:28 +0000 (10:13 +0000)]
Fix device-mapper static build targets.

dmsetup.static is not built and cleaned properly
if running only device-mapper install/build.

15 years agoDo not use generic install if running install_device-mapper.
Milan Broz [Mon, 11 May 2009 10:12:35 +0000 (10:12 +0000)]
Do not use generic install if running install_device-mapper.

It propagates into subdirs which includes DSOs which requires
lvm2 build (only install_device-mapper should propagate there).

15 years agoAdd test for seg_start, seg_count, seg_start_pe
Dave Wysochanski [Mon, 11 May 2009 03:37:34 +0000 (03:37 +0000)]
Add test for seg_start, seg_count, seg_start_pe

15 years agoUpdate WHATS_NEW wrt a recent patch.
Petr Rockai [Sat, 9 May 2009 13:47:03 +0000 (13:47 +0000)]
Update WHATS_NEW wrt a recent patch.

15 years agoUpdate tests for region_size.
Dave Wysochanski [Fri, 8 May 2009 21:50:20 +0000 (21:50 +0000)]
Update tests for region_size.

15 years agoAdd tests to check pv_mda_size and vg_mda_size.
Dave Wysochanski [Fri, 8 May 2009 06:10:45 +0000 (06:10 +0000)]
Add tests to check pv_mda_size and vg_mda_size.

15 years agoAdd tests to check vgcreate --physicalextentsize and field vg_extent_size.
Dave Wysochanski [Fri, 8 May 2009 05:15:52 +0000 (05:15 +0000)]
Add tests to check vgcreate --physicalextentsize and field vg_extent_size.

15 years agoValidate chunksize and originsize for snapshots.
Dave Wysochanski [Fri, 8 May 2009 04:24:52 +0000 (04:24 +0000)]
Validate chunksize and originsize for snapshots.

15 years agoFix PV datalign when for values starting prior to MDA area.
Milan Broz [Thu, 7 May 2009 12:11:50 +0000 (12:11 +0000)]
Fix PV datalign when for values starting prior to MDA area.

The dataalign value must always be aligned according
to MDA area.
The currect code checks if calculated value collides with
MDA area but not if the value is so small that it is
located before MDA starts.

Unfortunatelly there can be also MDA in the end of the device.

The patch adds simple check to avoid this miscalculation.
Patch expects that first MDA always starts on <= pagesize boundary
(this is true for all allowed label sector parameters).

15 years agoUse zalloc in initialization of device manager (to zero pvmove mirror count).
Milan Broz [Thu, 7 May 2009 12:01:21 +0000 (12:01 +0000)]
Use zalloc in initialization of device manager (to zero pvmove mirror count).

15 years agoUpdate columns.h comment.
Dave Wysochanski [Wed, 6 May 2009 15:25:23 +0000 (15:25 +0000)]
Update columns.h comment.

15 years agoFixup whitespace.
Dave Wysochanski [Wed, 29 Apr 2009 20:14:21 +0000 (20:14 +0000)]
Fixup whitespace.

15 years agoFixup whitespace.
Dave Wysochanski [Wed, 29 Apr 2009 20:11:46 +0000 (20:11 +0000)]
Fixup whitespace.

15 years agoUse liblvm.so instead of .a
Dave Wysochanski [Tue, 28 Apr 2009 19:08:25 +0000 (19:08 +0000)]
Use liblvm.so instead of .a

15 years agoFix error path in vg_make_handle().
Dave Wysochanski [Tue, 28 Apr 2009 17:46:47 +0000 (17:46 +0000)]
Fix error path in vg_make_handle().

Enter the error condition if either of the allocations fail, and
don't use dm_pool_zalloc if dm_pool_create fails.

15 years agoFix wrong arg in lv_is_virtual_origin call while creating snapshots.
Peter Rajnoha [Sun, 26 Apr 2009 08:12:12 +0000 (08:12 +0000)]
Fix wrong arg in lv_is_virtual_origin call while creating snapshots.

15 years agoAdd sparse devices: lvcreate -s --virtualoriginsize (hidden zero origin).
Alasdair Kergon [Sat, 25 Apr 2009 01:17:59 +0000 (01:17 +0000)]
Add sparse devices: lvcreate -s --virtualoriginsize (hidden zero origin).
Add lvs origin_size field.
Fix linux configure --enable-debug to exclude -O2.

Still a few rough edges, but hopefully usable now:
  lvcreate -s vg1 -L 100M --virtualoriginsize 1T

15 years agoFix linux configure --enable-debug to exclude -O2.
Alasdair Kergon [Fri, 24 Apr 2009 21:44:15 +0000 (21:44 +0000)]
Fix linux configure --enable-debug to exclude -O2.

15 years agoFix pool leak in lvmcache_read_vg error path.
Milan Broz [Fri, 24 Apr 2009 12:03:55 +0000 (12:03 +0000)]
Fix pool leak in lvmcache_read_vg error path.
(Introduced in previous patches.)

15 years agoFix segfault when using -U, -G and -M options in dmsetup.
Peter Rajnoha [Fri, 24 Apr 2009 11:30:49 +0000 (11:30 +0000)]
Fix segfault when using -U, -G and -M options in dmsetup.

15 years agoAvoid scanning non-PV devices in functional tests, otherwise lvconvert --repair
Petr Rockai [Fri, 24 Apr 2009 08:00:48 +0000 (08:00 +0000)]
Avoid scanning non-PV devices in functional tests, otherwise lvconvert --repair
breaks for some reason -- possibly needs investagation, but this should fix it
in the meantime.

15 years agoImplement, test and document (first iteration of) lvconvert --repair.
Petr Rockai [Thu, 23 Apr 2009 16:56:21 +0000 (16:56 +0000)]
Implement, test and document (first iteration of) lvconvert --repair.

15 years agoRefuse adding missing PVs in create_pv_list in toollib when allocatable_only is
Petr Rockai [Thu, 23 Apr 2009 16:45:30 +0000 (16:45 +0000)]
Refuse adding missing PVs in create_pv_list in toollib when allocatable_only is
requested.

15 years agoA more thorough PV equality test (that also copes better with MISSING_PVs) in
Petr Rockai [Thu, 23 Apr 2009 16:43:01 +0000 (16:43 +0000)]
A more thorough PV equality test (that also copes better with MISSING_PVs) in
_is_mirror_image_removable.

15 years agoDo not include MISSING_PVs in allocation maps.
Petr Rockai [Thu, 23 Apr 2009 16:41:27 +0000 (16:41 +0000)]
Do not include MISSING_PVs in allocation maps.

15 years agoUpdate columns.h comment to describe macro args.
Dave Wysochanski [Thu, 23 Apr 2009 16:27:58 +0000 (16:27 +0000)]
Update columns.h comment to describe macro args.

15 years agofix typo reported by "A. Costa" <agcosta@gis.net>
Alasdair Kergon [Thu, 23 Apr 2009 12:20:15 +0000 (12:20 +0000)]
fix typo reported by "A. Costa" <agcosta@gis.net>

15 years agoFix vgreduce --removemissing failure exit code.
Milan Broz [Wed, 22 Apr 2009 17:00:28 +0000 (17:00 +0000)]
Fix vgreduce --removemissing failure exit code.

15 years agoRemove some trailing whitespace so git won't complain.
Dave Wysochanski [Wed, 22 Apr 2009 12:46:25 +0000 (12:46 +0000)]
Remove some trailing whitespace so git won't complain.

15 years agoClean a lot of extra extra whitespaces.
Milan Broz [Wed, 22 Apr 2009 10:38:16 +0000 (10:38 +0000)]
Clean a lot of extra extra whitespaces.

15 years agoFix remote metadata backup for clvmd
Milan Broz [Wed, 22 Apr 2009 09:39:45 +0000 (09:39 +0000)]
Fix remote metadata backup for clvmd

Run backup of metadata on remote nodes in the
same place like local node - when calling backup().

Introduce backup_locally() which calls only
local backup if needed.

Remote backup is now trigerred by LCK_VG_BACKUP flag
combination (special VG lock).

This lock type will call check_current_backup()
(including backup_locally() call) and updates
metadata on all nodes.

(Patch fixes non-functional remote backup,
current call during VG lock never triggers.)

15 years agoAlloc PV internal structure from VG mempool if possible.
Milan Broz [Wed, 22 Apr 2009 09:31:30 +0000 (09:31 +0000)]
Alloc PV internal structure from VG mempool if possible.

15 years ago- Updating cluster log with latest code changes/bug fixes before
Jonathan Earl Brassow [Tue, 21 Apr 2009 19:16:22 +0000 (19:16 +0000)]
- Updating cluster log with latest code changes/bug fixes before
  altering to new kernel structures.

15 years agoMove metadata backup call after vg_commit.
Milan Broz [Tue, 21 Apr 2009 14:31:57 +0000 (14:31 +0000)]
Move metadata backup call after vg_commit.

The backup() call store metadata from memory.

But in cluster backup() call performs
remote nodes metadata backup and it reads data from disk.

For metadata backup consistency,
patch moves all backup() calls after vg_commit.

(Moreover, some tools already do that this way.)

15 years agoTidy lv_hash[_lock] use inside clvmd.
Milan Broz [Tue, 21 Apr 2009 13:11:28 +0000 (13:11 +0000)]
Tidy lv_hash[_lock] use inside clvmd.

 - Rename unlock_all to destroy_lvhash,
this function is called in cluster shutdown
unlocks everything and clean up allocated info space.

 - Tidy lv_hash_lock use
.
Except adding free(lvi) in lv_has destructror
there is no functional change.

15 years agoFix pvseg report for orphan PVs and other devices.
Milan Broz [Tue, 21 Apr 2009 12:59:18 +0000 (12:59 +0000)]
Fix pvseg report for orphan PVs and other devices.

If user requests report attribute from PVSEG type
and PV is orphan (or all devices is set), the report
is empty.

Try for example (when only orphan PV are present)
 #pvs
 #pvs -o +devices
# pvs /dev/sdb1
  PV         VG   Fmt  Attr PSize  PFree
    /dev/sdb1       lvm2 --   46.58G 46.58G
# pvs -o +devices /dev/sdb1
(no output)

The problem is caused by empty pv->segments list.

Fix it by providing fake segment here (similar to fake structures
in _pvsegs_sub_single() calls.

15 years agoFix pvs -a for segmented output
Milan Broz [Tue, 21 Apr 2009 12:57:31 +0000 (12:57 +0000)]
Fix pvs -a for segmented output

 # pvs -a -o devices
   Volume group name (null) has invalid characters
   Skipping volume group (null)

...
_pvsegs_sub_single creates fake vg, we need to check
that pv is real here.

15 years agoAdd libdevmapper to test/api building.
Dave Wysochanski [Mon, 20 Apr 2009 20:46:06 +0000 (20:46 +0000)]
Add libdevmapper to test/api building.

15 years agoAdd MMC device type to filters.
Milan Broz [Thu, 16 Apr 2009 10:16:14 +0000 (10:16 +0000)]
Add MMC device type to filters.

15 years agoFix dmsetup.static build.
Milan Broz [Wed, 15 Apr 2009 14:42:27 +0000 (14:42 +0000)]
Fix dmsetup.static build.

15 years agoProperly release VG memory pool in all CLI tools.
Milan Broz [Fri, 10 Apr 2009 10:01:38 +0000 (10:01 +0000)]
Properly release VG memory pool in all CLI tools.

15 years agoProperly release VG memory pool in metadata manipulation code.
Milan Broz [Fri, 10 Apr 2009 10:01:08 +0000 (10:01 +0000)]
Properly release VG memory pool in metadata manipulation code.

15 years agoProperly release VG memory pool in archiver code.
Milan Broz [Fri, 10 Apr 2009 10:00:37 +0000 (10:00 +0000)]
Properly release VG memory pool in archiver code.

15 years agoProperly release VG memory pool in activation code and clvmd.
Milan Broz [Fri, 10 Apr 2009 10:00:04 +0000 (10:00 +0000)]
Properly release VG memory pool in activation code and clvmd.

15 years agoIntroduce memory pool per volume group.
Milan Broz [Fri, 10 Apr 2009 09:59:18 +0000 (09:59 +0000)]
Introduce memory pool per volume group.

Since now, all code reading volume group is responsible for releasing
the memory allocated by calling vg_release(vg).
(For simplicity of use, vg_releae can be called for vg == NULL,
the same logic like free(NULL)).

Also providing simple macro for unlocking & releasing in one step,
tools usualy uses this approach.

The global memory pool (cmd->mem) should be used only for global
physical volume operations.

This patch have to be applied with all subsequent patches to complete
memory pool per vg logic.

Using separate memory pool has quite bit memory saving impact when
using large VGs, this is mainly needed when we have to use
preallocated and locked memory (and should not overflow from that
memory space).

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