1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-25 01:34:38 +03:00
Commit Graph

303 Commits

Author SHA1 Message Date
Alasdair Kergon
95d43e17b3 Improve the way VGs with PVs missing are handled so manual intervention
is required in fewer circumstances.  (mornfall)
2008-09-19 06:42:00 +00:00
Petr Rockai
6c75243a06 Add #include <signal.h> to dmeventd.c, fixes compilation on NetBSD. 2008-07-09 13:26:07 +00:00
Petr Rockai
efde37880b Fix dmeventd regression where mirror and snapshot monitoring libraries
failed to link against liblvm2cmd.

Dmeventd DSOs *require* lvm2cmd to be linked in.

For the future:
1) AC_SUBST does not create Makefile variables, only @foo@-style substitutions
2) When using `test', whitespace around `=' is essential:
    test a=b is true, as is test a=a
2008-07-09 09:59:42 +00:00
Zdeněk Kabeláč
7487a7c988 Added generation of the versioned libdevmapper-event.so for LVM's test 2008-06-27 15:36:51 +00:00
Jim Meyering
062886df64 avoid link failure when configuring without --enable-cmdlib
* configure.in (LVM2CMD_LIB): Define if --enable-cmdlib.
* dmeventd/mirror/Makefile.in (CLDFLAGS): Use $(LVM2CMD_LIB) rather
than hard-coding -llvm2cmd.
* dmeventd/snapshot/Makefile.in (CLDFLAGS): Likewise.
2008-06-23 09:25:08 +00:00
Christine Caulfield
ab5f66c13a Make clvmd return immediately if other nodes are down in an openais cluster. 2008-06-20 12:46:21 +00:00
Christine Caulfield
e65ffb8e68 Make clvmd return immediately if other nodes are down in a gulm cluster.
bz#447799
2008-06-20 10:58:28 +00:00
Christine Caulfield
f5adaf813c Don't call openlog for every invocation of debuglog.
Patch from Masatake YAMATO
2008-06-13 07:44:14 +00:00
Alasdair Kergon
ef5d8ce367 cleaner LCK_LV decoding 2008-06-06 16:37:51 +00:00
Alasdair Kergon
095a861018 Decode numbers in clvmd debugging output. 2008-06-05 14:24:28 +00:00
Alasdair Kergon
0646d0dd91 revert accidental checkin 2008-05-19 20:06:34 +00:00
Alasdair Kergon
83e54b45a5 Refactor some vginfo manipulation code. 2008-05-19 19:49:56 +00:00
Alasdair Kergon
5cd87d3d27 more cleanup 2008-05-09 19:26:58 +00:00
Alasdair Kergon
689d8a80b5 More P_ and V_ lock cleanup. 2008-05-09 18:45:15 +00:00
Alasdair Kergon
b1d82a92e7 Add missing mutex around clvmd lvmcache_drop_metadata library call. 2008-05-09 15:13:20 +00:00
Christine Caulfield
4d65627a50 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
ce3a68d817 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
9154a74400 . 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
1399b84b32 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
7b8f053be2 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
867e9c51d4 Drop cached VG metadata before and after committing changes to it. 2008-04-15 14:46:19 +00:00
Alasdair Kergon
0170f7b42a rename P_global to P_#global 2008-04-15 11:36:46 +00:00
Christine Caulfield
49a552ccdc 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
e7bdd69af0 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
57d9a6c836 Fix another allocation bug with clvmd and large node IDs.` 2008-04-01 15:01:30 +00:00
Christine Caulfield
17dd81336d Fix a couple of uninitialised variables. The newfd one could cause
some obscure hangs.
2008-03-28 12:58:09 +00:00
Christine Caulfield
962b7222d0 When reallocating the node IDs array, make it bigger rather than smaller! 2008-03-25 10:41:59 +00:00
Christine Caulfield
0075364715 Fix potential thread deadlock.
Also make local sockets non-blocking.
2008-03-17 09:37:47 +00:00
Christine Caulfield
3c78f9900c Include limits.h so it compiles with newer headers. 2008-03-06 08:41:05 +00:00
Jim Meyering
8d909cbdc0 Remove redundant if-before-free tests in clvmd.c. 2008-02-15 14:12:32 +00:00
Patrick Caulfield
3bfe922381 Update usage message for clvmd.
Fix clvmd man page printing <br>, clarified debug options.
2008-02-05 09:38:04 +00:00
Alasdair Kergon
2b83c80593 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
9229630447 Remove redundant cnxman-socket.h file. 2008-01-21 14:07:46 +00:00
Petr Rockai
50a1e81ba7 Amend previous commit. * does not match .files... 2008-01-09 15:33:25 +00:00
Petr Rockai
d9885b1b64 Add snapshot dmeventd library (enables dmeventd snapshot monitoring). 2008-01-09 15:32:19 +00:00
Patrick Caulfield
8c01179075 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
8f21c9a920 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
8c6f96faab Fix a possible double-free in libdevmapper-event. 2007-11-27 12:26:06 +00:00
Patrick Caulfield
85ac11b69b 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
3499e48064 Make it compile with new lv_info_by_lvid() prototype 2007-11-14 13:37:51 +00:00
Jim Meyering
c99204d370 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
44c2b4b281 Fix clvmd logging so you can get lvm-level debugging out of it. 2007-08-24 08:29:39 +00:00
Patrick Caulfield
4cd97611e5 Locking P_global causes a cache refresh. 2007-08-23 15:43:20 +00:00
Patrick Caulfield
756e539661 Force a device scan after init_full_scan_done() per agk. 2007-08-23 12:44:09 +00:00
Patrick Caulfield
cde44e3172 Call init_full_scan_done() when refreshing the cache. This should fix clvmd -R. 2007-08-23 12:19:13 +00:00
Alasdair Kergon
1ad58e1121 Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-21 16:26:07 +00:00
Patrick Caulfield
471ab92bbb 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
7454664997 Add "const" attributes where possible: first cut. 2007-08-07 09:06:05 +00:00
Alasdair Kergon
bcb31df10d Use NULL not 0.
Remove worthless comment.
2007-08-05 00:13:02 +00:00
Petr Rockai
eec17858c4 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
756c6f8560 Fix clvmd if compiled with gulm support. (2.02.26) 2007-07-24 15:35:11 +00:00
Jim Meyering
6fa6ce35da 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
1ec0d47f10 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
49cae61254 Tidy bits of clvmd-openais and improve an error report. 2007-07-11 12:07:39 +00:00
Patrick Caulfield
fe16df2e6f Use cpg_local_get() rather then Clm to get the local nodeid. 2007-06-25 09:02:37 +00:00
Patrick Caulfield
8da9ec3599 Remove system-lv.[ch] 2007-06-14 10:17:12 +00:00
Patrick Caulfield
01fdf84d69 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
bf97034485 Add *Experimental* OpenAIS support to clvmd. 2007-05-21 10:52:01 +00:00
Patrick Caulfield
52ada4853c Misc clvmd cleanups from Jim Meyering 2007-05-02 12:22:40 +00:00
Patrick Caulfield
c2b27a8298 Add some more debuglogs to clvmd startup. 2007-05-02 08:23:36 +00:00
Alasdair Kergon
2294fdb496 Change some #include lines to search only standard system directories. 2007-04-27 17:46:16 +00:00
Patrick Caulfield
d6c8e1df61 Fix thread race in clvmd. 2007-04-24 15:13:13 +00:00
Petr Rockai
5ec7c8fece Fix the regression introduced by dmeventd leak fixes. 2007-04-24 13:29:02 +00:00
Petr Rockai
228486a971 Fix some memory leaks in dmeventd. 2007-04-23 15:06:03 +00:00
Patrick Caulfield
88c0caab26 Make clvmd cope with quorum devices in RHEL5
bz#237386
2007-04-23 14:55:28 +00:00
Milan Broz
2e21519a10 Fix libdevmapper-event memory leaks 2007-04-19 19:10:19 +00:00
Patrick Caulfield
b9f7f30158 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
bf83527b64 Remove unnecessary memset() return value checks. [Jim Meyering] 2007-03-16 14:36:14 +00:00
Alasdair Kergon
a223c3fea3 Improve dmeventd messaging protocol: drain pipe and tag messages. 2007-02-02 17:08:51 +00:00
Alasdair Kergon
cb120ddb15 dmeventd mirror sets ignore_suspended_devices and avoids scanning mirrors. 2007-01-25 23:32:29 +00:00
Alasdair Kergon
f813d41a76 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
d851289d8a Add some missing close() and fclose() return value checks. 2007-01-25 14:16:20 +00:00
Alasdair Kergon
317e588efd Add private variable to dmeventd shared library interface. 2007-01-23 17:40:40 +00:00
Alasdair Kergon
b1d32a03c7 add a dso-private variable to dmeventd interface
more inline docn
2007-01-23 17:38:39 +00:00
Alasdair Kergon
9d944d6cf9 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
63e4217271 Add dm_event_handler_[gs]et_timeout functions.
Streamline dm_report_field_* interface.
2007-01-22 15:03:57 +00:00
Alasdair Kergon
f4bd12e8e9 register->monitor etc. 2007-01-19 22:21:45 +00:00
Alasdair Kergon
df15f46900 var dev_name->device_name (lvm2 has dev_name()) 2007-01-19 20:42:09 +00:00
Alasdair Kergon
fb3a732361 fix exit status; always print message on child failure 2007-01-19 18:08:36 +00:00
Alasdair Kergon
2d74110feb Add cmdline debug & version options to dmeventd.
Fix oom_adj handling.
2007-01-19 17:22:17 +00:00
Alasdair Kergon
44c6c36c43 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
af13ccddda more fixes 2007-01-16 23:03:13 +00:00
Alasdair Kergon
392e1bc2e8 more little fixes 2007-01-16 21:13:07 +00:00
Alasdair Kergon
9268d92c70 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
bb3366c07d dmeventd oom_adj + reduce thread stack size 2007-01-16 20:13:04 +00:00
Alasdair Kergon
954bd9257b Add basic reporting functions to libdevmapper. 2007-01-16 18:04:15 +00:00
Alasdair Kergon
5d51a56c02 reduce some if/else complexity 2007-01-15 22:37:40 +00:00
Alasdair Kergon
f48648552e Fix a malloc error path in dmsetup message. 2007-01-15 22:05:50 +00:00
Alasdair Kergon
01dc83b936 fix recent checkins 2007-01-15 19:47:49 +00:00
Alasdair Kergon
3a8dff3a62 fail registration if timeout thread cannot be started 2007-01-15 19:19:31 +00:00
Alasdair Kergon
13b234ccba use DMEVENTD_PATH 2007-01-15 19:11:58 +00:00
Alasdair Kergon
e451e93664 static naming 2007-01-15 18:58:40 +00:00
Alasdair Kergon
b4f9531475 Some libdevmapper-event interface changes. 2007-01-15 18:22:02 +00:00
Alasdair Kergon
3184ff75c4 More libdevmapper-event interface changes and fixes.
Rename dm_saprintf() to dm_asprintf().
2007-01-15 18:21:01 +00:00
Alasdair Kergon
c975a100b1 Report dmeventd mirror monitoring status. 2007-01-12 20:38:30 +00:00
Alasdair Kergon
02bf389425 Reinstate dm_event_get_registered_device 2007-01-12 20:22:11 +00:00
Alasdair Kergon
2b48fad426 updated dmeventd interface 2007-01-11 22:24:32 +00:00
Alasdair Kergon
d554b2bc94 Lots of dmeventd-related changes. 2007-01-11 21:54:53 +00:00
Alasdair Kergon
f66943de43 fail if status args are missing 2007-01-11 20:11:19 +00:00
Alasdair Kergon
9d1e9bc2fb Remove dmeventd mirror status line word limit 2007-01-11 19:52:06 +00:00