Alasdair Kergon
98fd1ce332
More P_ and V_ lock cleanup.
2008-05-09 18:45:15 +00:00
Alasdair Kergon
3d6af3e35e
Add missing mutex around clvmd lvmcache_drop_metadata library call.
2008-05-09 15:13:20 +00:00
Christine Caulfield
5e91e174d3
Fix uninitialised mutex in clvmd if all daemons are not running at startup.
...
Thanks to Mark Hlawatschek for pointing this out.
2008-05-09 09:59:39 +00:00
Christine Caulfield
b1bf5f1738
Make clvmd-cman use a hash rather than an array for node updown info.
...
This will allow it to cope with very large nodeids such as those
generated by clusters using cman_tool join -X
2008-05-09 07:20:04 +00:00
Christine Caulfield
d474909a58
. remove_lock_wait.diff remove the definition of "struct lock_wait",
...
which is not used since the switch away from async version saLck
. num_nodes should equal to member_list_entries, i.e.
joined_list_entires is 0 when a node leaves the group.
Thanks to Xinwei Hu for the patch.
2008-04-29 08:55:20 +00:00
Christine Caulfield
746e7dc42e
The attached patch is a try to make clvmd work correctly on openais stack.
...
It does 2 things.
1. The cpg_deliver_callback make a compare between target_nodeid and our_nodeid.
It turns out openais set target_nodeid to 0 sometimes. for broadcasting ? I change the behavior so that lvm will process_remote also on target_nodeid == 0
2. The joined_list passed to cpg_confchg_callback doesn't include the already exist nodes in the group, which leads to an incomplete node_hash. I simply add all other nodes in member_list to node_hash also.
Thanks to Xinwei Hu for this patch.
2008-04-28 08:57:11 +00:00
Christine Caulfield
9ba7d6d08b
Simplify locking code by using saLckResourceLock rather than
...
saLckResourceLockAsync.
Thanks to Xinwei Hu for the patch.
2008-04-23 09:53:49 +00:00
Milan Broz
581b17def2
Drop cached VG metadata before and after committing changes to it.
2008-04-15 14:46:19 +00:00
Alasdair Kergon
adb578238d
rename P_global to P_#global
2008-04-15 11:36:46 +00:00
Christine Caulfield
e8d3d71e23
Add config file overrides to clvmd when it reads the LVs list so that
...
config items 'command_names' and 'prefix' don't prevent it working.
2008-04-08 13:03:13 +00:00
Christine Caulfield
ec074fcf64
If lvm.conf was touched, clvmd attempted to update the toolcontext
...
but only did half of the job. It now shares the do_refresh_cache()
function that vgscan invokes.
2008-04-04 08:53:47 +00:00
Christine Caulfield
611c0689fc
Fix another allocation bug with clvmd and large node IDs.`
2008-04-01 15:01:30 +00:00
Christine Caulfield
2aa5120e82
Fix a couple of uninitialised variables. The newfd one could cause
...
some obscure hangs.
2008-03-28 12:58:09 +00:00
Christine Caulfield
7750a1ade6
When reallocating the node IDs array, make it bigger rather than smaller!
2008-03-25 10:41:59 +00:00
Christine Caulfield
ed070f4105
Fix potential thread deadlock.
...
Also make local sockets non-blocking.
2008-03-17 09:37:47 +00:00
Christine Caulfield
66db5dd894
Include limits.h so it compiles with newer headers.
2008-03-06 08:41:05 +00:00
Jim Meyering
4349becadc
Remove redundant if-before-free tests in clvmd.c.
2008-02-15 14:12:32 +00:00
Patrick Caulfield
08152c90f2
Update usage message for clvmd.
...
Fix clvmd man page printing <br>, clarified debug options.
2008-02-05 09:38:04 +00:00
Alasdair Kergon
4e9083db10
Fix mirror log name construction during lvconvert. (2.02.30)
...
Make monitor_dev_for_events recurse through the stack of LVs.
Clean up some more compiler warnings.
Add mirror names test script.
2008-01-31 12:19:36 +00:00
Patrick Caulfield
5a3f869f7e
Remove redundant cnxman-socket.h file.
2008-01-21 14:07:46 +00:00
Petr Rockai
a98a2d4a4e
Amend previous commit. * does not match .files...
2008-01-09 15:33:25 +00:00
Petr Rockai
67961c7c10
Add snapshot dmeventd library (enables dmeventd snapshot monitoring).
2008-01-09 15:32:19 +00:00
Patrick Caulfield
8a0a9a93d9
Tidy the clvmd backup code.
...
Move the backups inside the protection of the VG lock,
Don't backup if we have a suspended LV
Correct the vg_read() call
2007-12-05 13:17:18 +00:00
Patrick Caulfield
3303289137
When we unlock a VG tell the clvmds to see if a backup of the metadata needs
...
to be done.
2007-12-04 15:39:26 +00:00
Petr Rockai
cd1a7e80c0
Fix a possible double-free in libdevmapper-event.
2007-11-27 12:26:06 +00:00
Patrick Caulfield
37034fb826
If the pre_command fails then go back and wait patiently for the next
...
pre function rather than retrying it until we get stuck!
2007-11-15 10:16:14 +00:00
Patrick Caulfield
96b250d625
Make it compile with new lv_info_by_lvid() prototype
2007-11-14 13:37:51 +00:00
Jim Meyering
7f8f8bfa09
Correct typo in comments: s/is part of the LVM2/is part of LVM2/.
...
Signed-off-by: Jim Meyering <jim@meyering.net>
Author: Jim Meyering <jim@meyering.net>
2007-09-21 10:16:45 +00:00
Patrick Caulfield
d2fb8b66d7
Fix clvmd logging so you can get lvm-level debugging out of it.
2007-08-24 08:29:39 +00:00
Patrick Caulfield
5982271096
Locking P_global causes a cache refresh.
2007-08-23 15:43:20 +00:00
Patrick Caulfield
f608f30407
Force a device scan after init_full_scan_done() per agk.
2007-08-23 12:44:09 +00:00
Patrick Caulfield
88fc506bf0
Call init_full_scan_done() when refreshing the cache. This should fix clvmd -R.
2007-08-23 12:19:13 +00:00
Alasdair Kergon
147d5faccf
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-21 16:26:07 +00:00
Patrick Caulfield
be313b1300
Allow clvmd debug to be turned on in a running daemon using clvmd -d
...
You can do with cluster-wide too, by adding -C
2007-08-17 11:51:23 +00:00
Jim Meyering
08c9ff434b
Add "const" attributes where possible: first cut.
2007-08-07 09:06:05 +00:00
Alasdair Kergon
27c7135097
Use NULL not 0.
...
Remove worthless comment.
2007-08-05 00:13:02 +00:00
Petr Rockai
674cfe8071
Fix a possible segfault in libdevmapper-event. Thanks to Brian J. Wood
...
for noticing this.
2007-08-02 22:31:59 +00:00
Milan Broz
3c11686036
Fix clvmd if compiled with gulm support. (2.02.26)
2007-07-24 15:35:11 +00:00
Jim Meyering
f28fd56f76
libdevmapper, dmeventd: be paranoid about detecting write failure
...
* dmeventd/dmeventd.c (_set_oom_adj): When writing to /proc/self/oom_adj,
detect failure even if it's hidden behind ferror. [Using dm_fclose's
extra ferror test here is probably not needed, since the amount written
is nowhere near BUFSIZ, but use it regardless, for consistency. ]
* lib/fs/libdevmapper.c (do_suspend): Detect fclose failure when
writing to suspend.
2007-07-24 14:16:48 +00:00
Jim Meyering
bbcd24607c
Use gcc's printf attribute wherever possible.
...
* daemons/clvmd/clvmd.h (debuglog): Add __attribute__((printf)).
* lib/config/config.c (_line_append): Likewise.
* lib/misc/lvm-string.h (emit_to_buffer): Likewise.
2007-07-20 15:38:19 +00:00
Patrick Caulfield
b3ae66ae58
Tidy bits of clvmd-openais and improve an error report.
2007-07-11 12:07:39 +00:00
Patrick Caulfield
8e2f036193
Use cpg_local_get() rather then Clm to get the local nodeid.
2007-06-25 09:02:37 +00:00
Patrick Caulfield
f3864a94d2
Remove system-lv.[ch]
2007-06-14 10:17:12 +00:00
Patrick Caulfield
8ef3cec1f8
Remove system LV code from clvmd. It's never been used and never should be
...
used! It's removal tidies a number of code paths inside clvmd.
2007-06-14 10:16:35 +00:00
Patrick Caulfield
59231b568a
Add *Experimental* OpenAIS support to clvmd.
2007-05-21 10:52:01 +00:00
Patrick Caulfield
e1cd6dbc07
Misc clvmd cleanups from Jim Meyering
2007-05-02 12:22:40 +00:00
Patrick Caulfield
f46af53ea3
Add some more debuglogs to clvmd startup.
2007-05-02 08:23:36 +00:00
Alasdair Kergon
1bf5aae913
Change some #include lines to search only standard system directories.
2007-04-27 17:46:16 +00:00
Patrick Caulfield
05aa860fd7
Fix thread race in clvmd.
2007-04-24 15:13:13 +00:00
Petr Rockai
6e23a8aa20
Fix the regression introduced by dmeventd leak fixes.
2007-04-24 13:29:02 +00:00
Petr Rockai
727f266227
Fix some memory leaks in dmeventd.
2007-04-23 15:06:03 +00:00
Patrick Caulfield
0b65565e6b
Make clvmd cope with quorum devices in RHEL5
...
bz#237386
2007-04-23 14:55:28 +00:00
Milan Broz
0329281b49
Fix libdevmapper-event memory leaks
2007-04-19 19:10:19 +00:00
Patrick Caulfield
02c83d6edf
Add some extra error checking & robustness.
...
Thanks to the Crosswalk engineering team:
Leonard Maiorani
Henry Harris
Scott Cannata
2007-03-29 13:59:33 +00:00
Alasdair Kergon
c2784df48f
Remove unnecessary memset() return value checks. [Jim Meyering]
2007-03-16 14:36:14 +00:00
Alasdair Kergon
112d09deb1
Improve dmeventd messaging protocol: drain pipe and tag messages.
2007-02-02 17:08:51 +00:00
Alasdair Kergon
aca043364e
dmeventd mirror sets ignore_suspended_devices and avoids scanning mirrors.
2007-01-25 23:32:29 +00:00
Alasdair Kergon
2e1b92e3ea
Add some missing close() and fclose() return code checks.
...
Fix exit statuses of reporting tools (2.02.19).
2007-01-25 14:37:48 +00:00
Alasdair Kergon
232da7ecc7
Add some missing close() and fclose() return value checks.
2007-01-25 14:16:20 +00:00
Alasdair Kergon
3329c69865
Add private variable to dmeventd shared library interface.
2007-01-23 17:40:40 +00:00
Alasdair Kergon
d28dfb5720
add a dso-private variable to dmeventd interface
...
more inline docn
2007-01-23 17:38:39 +00:00
Alasdair Kergon
f72de1dc1c
Fix refresh_toolcontext() always to wipe persistent device filter cache.
...
Add is_long_lived to toolcontext.
2007-01-23 15:58:06 +00:00
Alasdair Kergon
4dcaa2300c
Add dm_event_handler_[gs]et_timeout functions.
...
Streamline dm_report_field_* interface.
2007-01-22 15:03:57 +00:00
Alasdair Kergon
8a37910d51
register->monitor etc.
2007-01-19 22:21:45 +00:00
Alasdair Kergon
8bbec04d5b
var dev_name->device_name (lvm2 has dev_name())
2007-01-19 20:42:09 +00:00
Alasdair Kergon
919ab64fdb
fix exit status; always print message on child failure
2007-01-19 18:08:36 +00:00
Alasdair Kergon
fcdf2e09a2
Add cmdline debug & version options to dmeventd.
...
Fix oom_adj handling.
2007-01-19 17:22:17 +00:00
Alasdair Kergon
c63c19a73e
stat oom_adj and stay silent if it doesn't exist
...
dm_event_handler now keeps private copies of strings
2007-01-17 14:45:10 +00:00
Alasdair Kergon
5611829c89
more fixes
2007-01-16 23:03:13 +00:00
Alasdair Kergon
f6af1a67b5
more little fixes
2007-01-16 21:13:07 +00:00
Alasdair Kergon
74885e2203
clean up global mutex usage and fix a race in thread finalisation code
...
properly clean up thread status when thread terminates from within
2007-01-16 20:27:07 +00:00
Alasdair Kergon
e125e1547f
dmeventd oom_adj + reduce thread stack size
2007-01-16 20:13:04 +00:00
Alasdair Kergon
61997bb9bb
Add basic reporting functions to libdevmapper.
2007-01-16 18:04:15 +00:00
Alasdair Kergon
d5ec3c8889
reduce some if/else complexity
2007-01-15 22:37:40 +00:00
Alasdair Kergon
528329f199
Fix a malloc error path in dmsetup message.
2007-01-15 22:05:50 +00:00
Alasdair Kergon
6ae178f91c
fix recent checkins
2007-01-15 19:47:49 +00:00
Alasdair Kergon
25f063d8b7
fail registration if timeout thread cannot be started
2007-01-15 19:19:31 +00:00
Alasdair Kergon
b2486b3d7d
use DMEVENTD_PATH
2007-01-15 19:11:58 +00:00
Alasdair Kergon
c7a5306039
static naming
2007-01-15 18:58:40 +00:00
Alasdair Kergon
02059c81e7
Some libdevmapper-event interface changes.
2007-01-15 18:22:02 +00:00
Alasdair Kergon
931d24a4b1
More libdevmapper-event interface changes and fixes.
...
Rename dm_saprintf() to dm_asprintf().
2007-01-15 18:21:01 +00:00
Alasdair Kergon
8ef6eb30d9
Report dmeventd mirror monitoring status.
2007-01-12 20:38:30 +00:00
Alasdair Kergon
c8ee38201d
Reinstate dm_event_get_registered_device
2007-01-12 20:22:11 +00:00
Alasdair Kergon
6b36e863cb
updated dmeventd interface
2007-01-11 22:24:32 +00:00
Alasdair Kergon
3165248642
Lots of dmeventd-related changes.
2007-01-11 21:54:53 +00:00
Alasdair Kergon
7cc6c5d79a
fail if status args are missing
2007-01-11 20:11:19 +00:00
Alasdair Kergon
65e635b685
Remove dmeventd mirror status line word limit
2007-01-11 19:52:06 +00:00
Alasdair Kergon
3b007b270d
Use CFLAGS when linking so mixed sparc builds can supply -m64
2007-01-11 17:12:27 +00:00
Alasdair Kergon
4594807a24
Use CFLAGS when linking so mixed sparc builds can supply -m64.
2007-01-11 16:23:22 +00:00
Alasdair Kergon
616c3eccfd
fix last checkin
2007-01-08 15:35:08 +00:00
Alasdair Kergon
5b95f17814
Lots of dmevent changes.
...
Export dm_basename().
Cope with a trailing space when comparing tables prior to possible reload.
2007-01-08 15:18:52 +00:00
Alasdair Kergon
6032a223f4
Add dmeventd_mirror register_mutex, tidy initialisation & add memlock.
2007-01-08 14:24:20 +00:00
Alasdair Kergon
0c8569edea
Fix dmeventd mirror to cope if monitored device disappears.
2006-12-20 14:35:02 +00:00
Patrick Caulfield
e3e6eba1aa
Fix gulm operation of clvmd. including a hang when attempting to
...
exclusively lock an LV that is already locked no another node.
2006-12-11 14:00:26 +00:00
Patrick Caulfield
47436a42df
Fix hang in clvmd if a pre-command failed. The pre/post thread was getting
...
out of sync in this instance and would not quit.
2006-12-11 13:48:41 +00:00
Alasdair Kergon
a951e97ae9
clvmd ia64 alignment fixes etc. (pjc)
2006-12-01 23:10:26 +00:00
Alasdair Kergon
0357f18ef0
Fix VG clustered read locks to use PR not CR.
...
VG metadata reads were not being locked out during metadata updates.
2006-12-01 22:48:47 +00:00
Patrick Caulfield
a16f48e31a
Always compile debug logging into clvmd as it's too useful to
...
restrict to just developers.
-d will switch it on and run the daemon in the foreground
2006-11-30 13:19:42 +00:00
Patrick Caulfield
bd8be78c09
Add -T (startup timeout) switch to clvmd
2006-11-30 09:44:07 +00:00
Jonathan Earl Brassow
56b7f2686e
- likely cut and paste error. Fix wrong function name in debug
...
output.
2006-10-24 18:49:31 +00:00
Patrick Caulfield
efa483c599
Add clvmd call to return the cluster name.
2006-10-09 14:11:57 +00:00
Patrick Caulfield
44e0456766
Use strncpy rather than strcpy
2006-10-06 10:06:37 +00:00
Patrick Caulfield
e37a241536
Fix clvmd bug that could cause it to die when a node with a long name crashed.
2006-10-06 10:06:10 +00:00
Patrick Caulfield
2a7f7fc1c9
Vastly improve the errors returned to the user from clvmd.
...
It now captures the error messages that are generated and returns them
in the reply packet rather than just telling the user to check syslog.
2006-10-05 13:55:50 +00:00
Patrick Caulfield
13583874fc
Add -R switch to clvmd.
...
This option will instruct all the clvmd daemons in the cluster to reload their device cache
2006-10-04 08:22:16 +00:00
Patrick Caulfield
b499b916ca
Stop clvmd complaining about nodes that have left the cluster
2006-08-24 12:45:05 +00:00
Patrick Caulfield
8810d0811a
Add needed new parameter to create_toolcontext().
2006-08-22 09:49:20 +00:00
Alasdair Kergon
7d7736b7b4
Add dm_split_words() and dm_split_lvm_name() to libdevmapper.
2006-08-21 12:07:03 +00:00
Alasdair Kergon
f1dc5cc99b
Add mutex to dmeventd_mirror to avoid concurrent execution.
2006-07-04 18:57:27 +00:00
Alasdair Kergon
2293567c8c
Fix lvcreate corelog validation.
...
Add --config for overriding most config file settings from cmdline.
Quote arguments when printing command line.
Remove linefeed from 'initialising logging' message.
Add 'Completed' debug message.
Don't attempt library exit after reloading config files.
Always compile with libdevmapper, even if device-mapper is disabled.
2006-05-16 16:48:31 +00:00
Patrick Caulfield
20b4c02b89
Add needed include.
2006-05-15 12:32:08 +00:00
Alasdair Kergon
366a68282f
fix compile
2006-05-15 11:56:15 +00:00
Alasdair Kergon
3e3d5d8593
Add --monitor to vgcreate and lvcreate to control dmeventd registration.
...
Propagate --monitor around cluster.
Filter LCK_NONBLOCK in clvmd lock_vg.
2006-05-12 19:16:48 +00:00
Alasdair Kergon
aeb2c277a8
Add mirror log fault-handling policy.
2006-05-11 19:45:53 +00:00
Alasdair Kergon
2a99b5b816
Avoid a dmeventd compiler warning.
2006-05-11 19:08:02 +00:00
Alasdair Kergon
526a3c2186
Propagate nosync flag around cluster.
2006-05-11 19:05:21 +00:00
Alasdair Kergon
6657d5b66b
Move DEFS into configure.h.
...
Remove dmsetup line buffer limitation.
2006-05-10 19:38:25 +00:00
Alasdair Kergon
72b2cb613a
Make SIZE_SHORT the default for display_size().
...
Fix some memory leaks in error paths found by coverity.
Use C99 struct initialisers.
Move DEFS into configure.h.
Clean-ups to remove miscellaneous compiler warnings.
2006-05-09 21:23:51 +00:00
Alasdair Kergon
dfb5da937e
tweak .so loading messages; extra device_exists() sanity check
2006-04-28 14:08:04 +00:00
Alasdair Kergon
b4cbeca164
fix makefile
2006-04-19 17:32:05 +00:00
Alasdair Kergon
126a5696f2
fix makefile
2006-04-19 17:24:00 +00:00
Alasdair Kergon
06541daa12
fix makefile
2006-04-19 17:15:08 +00:00
Alasdair Kergon
0c8ff3ad63
make pkgconfig installation step optional, and clean up generated files
2006-04-19 16:38:56 +00:00
Alasdair Kergon
8a2fc58645
Check for libsepol.
...
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
Alasdair Kergon
d81e3d0bad
configure/makefile tidying + pkg-config support.
2006-04-19 15:23:10 +00:00
Patrick Caulfield
a31676722b
allow new cman to shutdown on request.
2006-03-21 10:31:08 +00:00
Patrick Caulfield
70ca1c94f1
Make sure it compiles if gulm is NOT selected AND using an old libcman.h
2006-03-15 08:36:11 +00:00
Patrick Caulfield
e7f55bb4c0
Get clvmd to use libcman rather than cman ioctl calls. This makes
...
it forward-compatible with the new userland CMAN in cluster head.
To build it you will need the libcman header & library installed.
2006-03-14 14:18:34 +00:00
Alasdair Kergon
9f5d8283a9
Propagate partial mode around cluster.
2006-03-09 22:34:13 +00:00
Alasdair Kergon
9ab7701215
dmeventd thread/fifo fixes.
2006-03-09 21:33:59 +00:00
Alasdair Kergon
ed2b1bc5eb
post-release
...
fix dmeventd build
2006-02-08 23:23:19 +00:00
Alasdair Kergon
7ffe8aab61
remove a dmeventd_mirror syslog message
2006-02-06 19:34:45 +00:00
Alasdair Kergon
768255c061
fix tabs
2006-02-03 21:34:11 +00:00
Alasdair Kergon
a0d0eda9b3
tweak clvmd makefile
2006-02-03 21:31:00 +00:00
Alasdair Kergon
d8f0eeb039
Temporary device_exists() fixes.
2006-02-03 19:44:59 +00:00
Alasdair Kergon
4206c3db2e
Use supplied full dso name.
2006-02-03 19:41:34 +00:00
Alasdair Kergon
93dc5190bc
fix libdevmapper-event-mirror liblvm2cmd link search path
2006-02-03 14:48:38 +00:00
Alasdair Kergon
e4c11ad108
Only do lockfs filesystem sync when suspending snapshots.
...
Switchover library building to use LIB_SUFFIX.
2006-01-31 14:52:30 +00:00
Alasdair Kergon
5e3bd86778
Rename _log to dm_log and export.
...
Fix misc compile-time warnings.
2006-01-31 14:50:38 +00:00
Alasdair Kergon
db204c51a6
Tidy some comments/messages.
2006-01-27 20:52:21 +00:00
Alasdair Kergon
1ff0ef6945
Fix renamed dso.
2006-01-27 20:51:36 +00:00
Alasdair Kergon
6463fa2993
dmeventd thread termination fix
2006-01-27 20:50:01 +00:00
Alasdair Kergon
fc2b1f2ce9
some init_client cleanup
2006-01-27 20:49:13 +00:00
Alasdair Kergon
f0b4c52d4a
More dmeventd mirror cleanups.
2006-01-27 20:48:19 +00:00
Alasdair Kergon
17840c21c3
Remove avoidable dmeventd mirror forking.
2006-01-27 20:47:20 +00:00
Alasdair Kergon
7000cdb5ea
Fix libdevmapper event daemon_running status.
2006-01-27 20:46:06 +00:00
Alasdair Kergon
3bee15b0fb
Replace deprecated signal functions.
2006-01-27 20:45:17 +00:00
Alasdair Kergon
cb49c5a03f
Use split_dm_name in dmeventd mirror code.
2006-01-27 20:43:52 +00:00
Alasdair Kergon
132a76156e
fix dmevent registration return codes
2006-01-27 20:01:45 +00:00
Alasdair Kergon
74892f5c3d
read/write loop fixes
2005-12-19 22:56:47 +00:00