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

1901 Commits

Author SHA1 Message Date
Zdenek Kabelac
3a00204a23 Remove fs_unlock from lv_resume path
Keep it within clvmd until message for SYNC starts to work.
2011-02-03 01:58:20 +00:00
Zdenek Kabelac
16f000bcb4 Fix wipe size when seting up mda. 2011-02-03 01:41:03 +00:00
Zdenek Kabelac
401a40d941 Do not check for open_count when not needed.
Disable open_count checking in lv_info it it's not used.

Fix previous commit (comment out unsable code for now).
2011-02-03 01:24:46 +00:00
Alasdair Kergon
12e36e7ea7 Allow CLVMD_CMD_SYNC_NAMES to be propagated around the cluster if requested. 2011-02-02 23:39:39 +00:00
Dave Wysochanski
42715fa173 Update WHATS_NEW for lvmdump change. 2011-02-01 21:41:31 +00:00
Zdenek Kabelac
116cbc267c Fix udev synchronization for no-locking mode
Instead of implicitly syncing udev operation in clustered and
file locking code -  call synchronization directly in lock_vol() when
the operation unlocks VG

The problem is missing implicit fs_unlock() in the no_locking code.
This is used with --sysinit on read-only filesystem locking dir.
In this case vgchange -ay could exit before all udev nodes are properly
synchronised and may cause problems with accessing such node right after
vgchange --sysinint command is finished.

Add test case for vgchange --sysinit.
2011-01-31 19:52:40 +00:00
Zdenek Kabelac
667d14e377 Updating man pages 2011-01-28 16:03:38 +00:00
Zdenek Kabelac
65fc4dae3a Avoid rebuilding of uuid validation table
Small CPU relax...
2011-01-28 10:14:08 +00:00
Mike Snitzer
3e3591904b Improve lvcreate "insufficient extents" errors to "insufficient free space". 2011-01-28 02:58:00 +00:00
Alasdair Kergon
a1d4ec1d6e Use O_DIRECT when reading block devices. 2011-01-27 00:21:37 +00:00
Alasdair Kergon
67199cac4f post-release 2011-01-24 23:34:46 +00:00
Alasdair Kergon
c446a0fffd pre-release 2011-01-24 23:24:06 +00:00
Alasdair Kergon
16b1fe4a08 Bring lvscan man page up-to-date. 2011-01-24 20:02:07 +00:00
Alasdair Kergon
cef065f63f Fix lvchange --test to exit cleanly. 2011-01-24 14:19:05 +00:00
Alasdair Kergon
b51cd542be Add change_tag to toollib.
Allow multiple pvchange command line options to be specified together.
2011-01-24 13:38:31 +00:00
Milan Broz
74863007ee If other process finishes (or aborts) pvmove operation and
polling function cannot find any lv with PVMOVE flag, return
success and do not print  "aborting" message.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=602389
2011-01-19 23:11:39 +00:00
Milan Broz
679830cf58 In some versions (RHEL6) dlm_create_lockspace() always
return lockspace reference (even if lockspace already exists)
and thus increases DLM lockspace count. It means that after
clvmd restart the lockspace is still in use.

(The only way to clean environment to enable clean cluster
shutdown is call "dlm_tool leave clvmd" several times.)

Because only one clvmd can run in time, we can use simpler logic,
try to open lockspace with dlm_open_lockspace() and only if it fails
try to create new one. This way the lockspace reference doesn not
increase.

Very easily reproducible with  "clvmd -S" command.

Patch also fixes return code when clvmd_restart fails and fixes
double free if debug option was specified during restart.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=612862
2011-01-19 23:09:31 +00:00
Milan Broz
92e6277c28 Add -f (don't fork) option to clvmd and fix clvmd -d<num> description. 2011-01-17 23:13:14 +00:00
Alasdair Kergon
59762452a0 post-release 2011-01-17 18:16:18 +00:00
Alasdair Kergon
01794a7891 pre-release 2011-01-17 16:46:50 +00:00
Zdenek Kabelac
6184b70cf7 Do not scan devices unnecessarily for reseting error counter
For reseting error counter use directly btree cached elements and do not
create whole dev_iterator.
2011-01-17 15:16:55 +00:00
Zdenek Kabelac
96eda8b9b3 Skip unnecessary lock_vol() call after volume deactivation
Improve condition within lock_vol so we are not calling extra unlock
if the volume just has been deactivated.

Patch uses lck_type and replaces negative 'and' condition to more
readable 'or' condition.
Few missing strace traces added.
2011-01-13 14:56:17 +00:00
Zdenek Kabelac
b1b38215ba Add exec_cmd paramater sync_needed
As sync_local_dev_names() cannot be called within activation context,
add new parametr which allows to select if the sync call is needed
before executing new command.
2011-01-13 14:51:32 +00:00
Alasdair Kergon
a8de276520 Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80)
Introduce sync_local_dev_names and CLVMD_CMD_SYNC_NAMES to issue fs_unlock.
2011-01-12 20:42:50 +00:00
Alasdair Kergon
b84bb4d9c2 add fio 2011-01-12 15:28:33 +00:00
Jonathan Earl Brassow
025e69a15a Add disk to mirrored log type conversion. 2011-01-11 17:05:08 +00:00
Alasdair Kergon
2a66b79d55 post-release 2011-01-10 21:12:54 +00:00
Alasdair Kergon
22ba1e8ee6 reissue 2.02.80 2011-01-10 21:12:18 +00:00
Zdenek Kabelac
ad50450a22 Avoid cookie sharing between forked processes
Before fork, ensure cookie is reset so it's not shared between processes.
2011-01-10 19:31:02 +00:00
Alasdair Kergon
0825c244dd post-release 2011-01-10 14:51:33 +00:00
Alasdair Kergon
606d085835 pre-release 2011-01-10 14:28:17 +00:00
Zdenek Kabelac
937a21f0d2 Speedup consequent activation calls
Stop calling fs_unlock() from lv_de/activate().
Start using internal lvm fs cookie for dm_tree.
Stop directly calling dm_udev_wait() and
dm_tree_set/get_cookie() from activate code -
it's now called through fs_unlock() function.

Add lvm_do_fs_unlock()

Call fs_unlock() when unlocking vg where implicit unlock solves the
problem also for cluster - thus no extra command for clustering
environment is required - only lvm_do_fs_unlock() function is added
to call lvm's fs_unlock() while holding lvm_lock mutex in clvmd.

Add fs_unlock() also to set_lv() so the command waits until devices
are ready for regular open (i.e. wiping its begining).

Move fs_unlock() prototype to activation.h to keep fs.h private
in lib/activate dir and not expose other functions from this header.
2011-01-10 14:02:30 +00:00
Zdenek Kabelac
f6fdfd56e4 Add internal fs cookie
Add functions for handling internal lvm cookie used for
all dm_tree operations until fs_unlock is called.
2011-01-10 13:44:39 +00:00
Zdenek Kabelac
2dd15068fb Cache config_tree
Start to use config_tree for cache just like vgmetadata.
When vgmetadata are erased destroy its cached config tree.
2011-01-10 13:15:57 +00:00
Zdenek Kabelac
6feecf76d4 Change import_vg_from_buffer to use config_tree
Change function import_vg_from_buffer() to import_vg_from_config_tree().
Instead of creating config tree inside the function allow config tree to
be passed as parameter - usable later for caching.
2011-01-10 13:13:42 +00:00
Zdenek Kabelac
12fbaae042 Add default error path for get_property
Set invalid property value for error path when NULL handler is passed.
Fixes use of uninitialized prop structure as we return 'v' by value.
---
2011-01-10 13:07:58 +00:00
Zdenek Kabelac
349da06cfa Improve OCF dir support
Add --with-ocfdir configurable option.
Fix superfluous /usr in ocf_scriptdir instalation path.
2011-01-10 13:00:53 +00:00
Alasdair Kergon
a592016297 Add aclocal.m4 (for pkgconfig). 2011-01-07 16:27:05 +00:00
Zdenek Kabelac
b2c682e462 Fix memory leak in filter creation error path
If some allocation for peristent filter fails its memory reference
was lost, fix it by calling filter's destructor.

Fix log_error messages for failing allocation.
2011-01-06 15:29:24 +00:00
Jonathan Earl Brassow
7871d2c8e7 Reverting recent commit to disallow adding/removing mirror log while
removing/adding mirror images... There was already code in there to
do the job - I just didn't find it in WHATS_NEW (or in the code right
away).
2011-01-05 23:18:46 +00:00
Jonathan Earl Brassow
327dbf1078 Prevent the user from simultaneously adding a mirror log while removing
a mirror image (or removing a log while adding a mirror).  Advise the
user to use two separate commands instead.

This issue become especially problematic when PVs are specified, as they
tend to mean different things when adding vs removing.  In a command that
mixes adding and removing, it is impossible to decern exactly what the
user wants.

This change prevents bug 603912.
2011-01-05 20:02:45 +00:00
Zdenek Kabelac
006e5fa0ea Add missing error path tests 2011-01-05 14:03:36 +00:00
Zdenek Kabelac
de0ae6a18f Fail deamonization if lvmcache_init fail
FIXME Add proper cleanup
2011-01-05 12:59:46 +00:00
Zdenek Kabelac
1936d75b3c Return PERCENT_INVALID for error case
If the percent value could not be determined return PERCENT_INVALID.
Indent function with tabs.
2011-01-05 12:33:51 +00:00
Jonathan Earl Brassow
76e0e1d0eb Change to correct cmirrord return code is user visible - update WHATS_NEW
file.
2011-01-04 21:33:06 +00:00
Milan Broz
fadd934150 Fix wrongly paired unlocking of global lock in pvchange. (2.02.66) 2010-12-23 14:23:30 +00:00
Zdenek Kabelac
2ae2ca89bf Add backtraces for backup and backup_remove fail paths 2010-12-22 15:36:41 +00:00
Zdenek Kabelac
4388a09b0f Detect errors from dm_task_set calls
Check for errors in dm_task_set calls.
Use  goto_bad macro with stack trace.
Replace  label  failed: with bad:.
2010-12-22 15:28:44 +00:00
Zdenek Kabelac
1102378e1c Add backtraces for archive and backup_locally
If archive or back_locally fails - add stack trace.
2010-12-22 13:45:33 +00:00
Zdenek Kabelac
8382fc3e85 Fix memory leak in debug mode of restart_clvmd() error path 2010-12-22 12:14:11 +00:00