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
Patrick Caulfield
0b65565e6b
Make clvmd cope with quorum devices in RHEL5
...
bz#237386
2007-04-23 14:55:28 +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
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
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
8a37910d51
register->monitor etc.
2007-01-19 22:21:45 +00:00
Alasdair Kergon
3b007b270d
Use CFLAGS when linking so mixed sparc builds can supply -m64
2007-01-11 17:12:27 +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
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
526a3c2186
Propagate nosync flag around cluster.
2006-05-11 19:05:21 +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
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
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
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
Patrick Caulfield
47b59176e0
Make it compile with debug enabled.
2005-11-10 08:49:29 +00:00
Patrick Caulfield
c650c19805
Use hash functions in libdevmapper.
2005-11-09 09:24:10 +00:00
Alasdair Kergon
2262b32057
Use hash, bitset, malloc, pool from libdevmapper.
2005-10-16 23:03:59 +00:00
Patrick Caulfield
fe6c78629d
clvmd no longer takes out locks for non-clusteed LVs,
...
and non-clustered LVs are only activated on the local node.
2005-08-16 08:25:09 +00:00
Alasdair Kergon
07d318310b
Prepare tools to support clustered mirrors.
2005-08-14 23:18:28 +00:00
Patrick Caulfield
4bb7474e8a
Don't send a signal to kill threads that are idling nicely as it upsets them.
...
This seems to cure bz#159727 on SMP systems.
Alasdair, can you include this patch in the lvm2-cluster package please ?
2005-08-09 10:39:57 +00:00
Patrick Caulfield
470b46cee1
Log an error if clvmd can't resolve a host name got from CCS
...
Fix potential spin loop in clvmd
2005-06-14 10:35:02 +00:00
Patrick Caulfield
5a3f4a794d
Don't defer closing of FDs in clvmd as it can cause trouble.
2005-06-13 10:16:21 +00:00
Patrick Caulfield
eeee8cfd31
Be a bit smarter about reading stuff from the sockets
2005-06-10 09:11:01 +00:00
Patrick Caulfield
30bda7761e
Tidy clvmd's SIGHUP handler so it doesn't do all that work.
2005-04-19 10:36:42 +00:00
Patrick Caulfield
2b7e4013cd
Make clvmd work around some "limitations" in gulm's node state notifications.
...
Also make clvmd debuglog timestamps a little more helpful.
2005-04-13 13:50:07 +00:00
Patrick Caulfield
a478de3db6
set SO_KEEPALIVE on sockets
2005-04-01 16:03:00 +00:00
Patrick Caulfield
11270d07bf
Don't allow user operations to start until the lvm thread is fully up.
...
Hopefully finally nails bz#146056
2005-04-01 13:01:01 +00:00
Alasdair Kergon
779b7713cf
Tighten signal handlers.
2005-03-21 14:16:16 +00:00
Patrick Caulfield
a6c23d8b8b
Don't take out the lvm_thread_lock at startup - it only protects the jobs list.
...
DEBUGLOG() message now print threadid rather than PID which is more useful.
2005-03-09 14:08:11 +00:00
Patrick Caulfield
3329bbfdf3
make clvmd FDs close-on-exec, to avoid warnings when running lvm via popen.
...
clvmd-gulm unlocks VG & orphan locks at startup in case they are stale.
clvmd-gulm now unlocks VG & orphan locks if client dies.
2005-03-07 17:03:44 +00:00
Patrick Caulfield
eb3037ddbd
Fix clvmd-gulm node up/down code so it actually works.
...
clvmd-gulm now releases locks when shut down.
2005-02-22 16:26:21 +00:00
Patrick Caulfield
a00bfcc8b2
./configure --enable-debug now enables debugging code in clvmd
2005-02-21 15:58:06 +00:00
Patrick Caulfield
ce1aa2c3ff
Always manipulate both locks in sync_lock() otherwise they get left
...
hanging around and cause trouble.
2005-02-21 14:36:09 +00:00
Patrick Caulfield
c9808c329d
Cope with more than one message arriving at the TCP socket, also
...
fix some instances where the length in the message was wrong (cman
code didn't notice this because it is packet-based comms anyway)
2005-02-18 15:31:32 +00:00
Patrick Caulfield
65c591696a
Fix gulm->errno error number conversion.
2005-02-17 12:56:19 +00:00
Patrick Caulfield
a3dfa1c7d5
Make config check a little more tolerant of library names.
2005-02-14 09:07:14 +00:00
Patrick Caulfield
ceda2b1426
Fix thread shutdown race which could cause clvmd to hang in pthread_join.
2005-02-08 09:05:58 +00:00
Patrick Caulfield
5937664052
Revert last clvmd patch. More testing reveals that this just doesn't
...
work yet.
2005-02-07 14:45:38 +00:00
Patrick Caulfield
2cf7b80d8f
Make clvmd use the command library rather than popen() to
...
preload the lock state.
2005-02-07 10:04:27 +00:00
Patrick Caulfield
d9656543ee
Make clvmd do a quick sanity check on the clustering bits of lvm.conf
2005-02-02 11:42:29 +00:00
Patrick Caulfield
28b4320c7f
Get rid of "connection refused" message because Corey doesn't like it.
2005-02-02 09:17:56 +00:00
Patrick Caulfield
9549da2743
Don't print CMAN error if initial probe fails - we could be running with GULM.
2005-01-26 09:30:52 +00:00
Patrick Caulfield
4e224cf079
Remove superflous &
...
Gulm clvmd no longer hangs trying to talk to a rebooted node.
2005-01-25 16:46:29 +00:00
Patrick Caulfield
c9f9a8b2b3
Make clvmd announce it's startup and cluster connection in syslog.
2005-01-24 15:31:13 +00:00
Patrick Caulfield
dbe0c8075e
Get rid of libclvm as it's out-of-date and not used at all.
2005-01-21 11:56:30 +00:00
Patrick Caulfield
6f4d25ec7f
Fix clvmd startup bug introduced in cman/gulm amalgamation. bz#145729
...
Improve reporting of node-specific locking errors so you'll get
somthing a little more helpfiul than "host is down" - it will now tell
you /which/ host it thinks is down.
2005-01-21 11:35:24 +00:00
Alasdair Kergon
5d0b9f475a
fix clvmd lv_info_by_lvid open_count
2005-01-19 18:10:09 +00:00
Patrick Caulfield
5c7fc7c4f7
You can now build clvmd with cman & gulm support in the same binary.
...
./configure --with-clvmd
wil do this by default. Or you can choose which you want with
./configure --with-clvmd=gulm or
./configure --with-clvmd=cman
When clvmd with both included is run, it will automatically detect the cluster
manager in use.
2005-01-13 13:24:02 +00:00
Patrick Caulfield
b9fb9b206e
Fix off-by-one error in cluster_locking that could case read hangs.
2005-01-07 14:22:49 +00:00
Patrick Caulfield
235592e9e8
Some more gulm fixes from "Mr gulm" himself.
2005-01-06 11:48:25 +00:00
Patrick Caulfield
0d19475588
Improve clvmd failure message if it's already running.
...
Allow user to kill clvmd during initialisation.
2005-01-05 14:41:54 +00:00
Patrick Caulfield
67443faddb
Typo in "for" caused first node in ccs to be ignored.
2005-01-04 15:11:34 +00:00
Patrick Caulfield
a057a834b7
Use new CCS key names for nodes in the GULM version of clvmd.
...
based on a patch from Mike Tilstra
2005-01-04 11:48:10 +00:00
Alasdair Kergon
a266258f4c
Configure/makefile tidy.
2004-11-26 18:07:17 +00:00
Patrick Caulfield
bb7b7c6d5f
Tidy the socket callbacks so that all the work is done outside the
...
main loop.
2004-11-16 10:55:01 +00:00
Patrick Caulfield
badd6fb7ba
Report detailed errors in cluster initialisation to syslog, and point the user
...
at syslog if clvmd fails to intialise.
2004-11-11 14:51:23 +00:00
Patrick Caulfield
b1098701ec
Can now build a gulm version of clvmd instead of a cman one. use
...
./configure --with-clvmd=gulm
The default is still cman, and you can't have both - sorry.
2004-11-03 10:45:07 +00:00
Patrick Caulfield
3d4159b6bf
Make clvmd -V display the lvm version number too rather than just
...
the protocol version (which is not that useful and doesn't change very often).
2004-10-06 12:36:47 +00:00
Patrick Caulfield
bfd4b01407
Revert the fork back to where it was as it seems to confuse pthreads.
...
Instead, the parent now waits for the daemon to signal that it has
completed successfully (or not) so it can return status to the user.
2004-10-06 10:12:34 +00:00
Patrick Caulfield
8d81a737a4
Change some perror() calls to log_error() so they'll appear in
...
syslog when we're a daemon.
2004-10-06 10:02:25 +00:00
Patrick Caulfield
e5011ba8bf
Check the UUID length when readingthe output of the "lvs" command at startup.
...
This way we should not get quite so confused by any debugging output
that may come our way.
2004-10-04 09:23:52 +00:00
Patrick Caulfield
cf54177475
Make clvmd cope with large gaps in nodeIDs
2004-09-30 14:18:29 +00:00
Patrick Caulfield
896318f475
Fork a little later in the startup sequence so that we can return
...
an error code if the cluster infrastructure isn't there.
2004-09-30 14:16:28 +00:00
Patrick Caulfield
8ef0b7b9ef
Keep client locks (VG locks usually) in their own hash table so
...
we can actually have more then one of them per client.
2004-09-24 09:39:57 +00:00
Patrick Caulfield
985f52fe34
Make the thread handling a little less cavalier. In particular, calling
...
pthread_exit in a signal handler was a /really/ bad idea.
2004-09-23 12:51:56 +00:00
Patrick Caulfield
421bb2e9bf
Don't use hold_lock for VG locks as that doesn't stop processes contending
...
on the same node, only across the cluster.
2004-09-23 12:29:35 +00:00
Patrick Caulfield
56942c3f2a
Put some locking round the LV hash table as it could be accessed by
...
different threads concurrently.
2004-09-22 12:10:34 +00:00
Alasdair Kergon
cab8ea7c62
Cluster-extension-only installation.
2004-08-18 18:57:40 +00:00
Patrick Caulfield
ceec24d27f
Updated file from cman.
2004-08-18 16:04:35 +00:00
Alasdair Kergon
80992638e1
Fix LD_FLAGS->LDFLAGS. LD_DEPS->LDDEPS.
...
Update configure script: add --disable-selinux & some missing messages.
2004-06-28 14:01:24 +00:00
Patrick Caulfield
3e5cc2beb9
Make sure errors reach syslog().
2004-06-28 10:26:42 +00:00
Alasdair Kergon
d3c8211fef
Add cluster support.
2004-06-24 08:02:38 +00:00