Commit Graph

736 Commits

Author SHA1 Message Date
Thomas Schoebel-Theuer
e6a39cf313 tools: add provisionary logfile import/export (HACKERS ONLY)
Use this for testing or for repair if you are extremely desperate.
This is not yet end-user friendly.
2013-07-04 09:06:36 +02:00
Thomas Schoebel-Theuer
9a104deb19 lib_log: fix length correction in the headers, cleanup 2013-07-04 08:51:36 +02:00
Thomas Schoebel-Theuer
82e7f1b823 lib_log: move log_scan() to header file 2013-07-04 08:46:14 +02:00
Thomas Schoebel-Theuer
295b0f4ada marsadm: relax precondition for create-resource 2013-07-04 07:21:01 +02:00
Thomas Schoebel-Theuer
62e2f5944b aio: finally fix race on dirty area at the end 2013-07-04 07:21:01 +02:00
Thomas Schoebel-Theuer
83b75845c3 aio: remove obsolete clever_sync 2013-07-04 07:21:01 +02:00
Thomas Schoebel-Theuer
d4338032bb logger: make writeback more resilient 2013-07-04 07:21:01 +02:00
Thomas Schoebel-Theuer
e0d980223b marsadm: wait-cluster has-device waits for actual device appearance 2013-07-04 07:21:01 +02:00
Thomas Schoebel-Theuer
0f4cc33d15 logger: make replay_timeout configurable 2013-07-04 07:21:01 +02:00
Thomas Schoebel-Theuer
45cac16cc1 infra: add grace freeing to mapfree
Avoid unnecessary LRUing of freeable buffers at the long term
(months) for better long-term performance.
2013-07-04 07:21:01 +02:00
Thomas Schoebel-Theuer
19f1a95a47 proc: allow some debugging even in production systems (default off) 2013-07-04 07:21:01 +02:00
Thomas Schoebel-Theuer
e33ddf63db light: fix wrong condition in logfile update 2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
f3613177a2 aio: prefer fdatasync() over filemap_write_and_wait_range() 2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
be20dd422d light: tolerate few incomplete log entries at the end when switching to primary 2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
bfb6070d25 logger: add replay_tolerance 2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
0ee23aa3ef light: prevent remote symlink updates when delete is in progress 2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
269c53d565 marsadm: make 'wait-connect' an alias to 'wait-resource' 2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
228a464c8a marsadm: mark "verify" as forbidden
It would be dangerous since DRBD semantics are not implemented.
2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
1d955d9bed light: fix wrong target size of sync 2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
45f462026f marsadm: fix leave-resource cleanup
Now the sequence leave-resource ; join-resource should work.

When the last member of the resource has gone and create-resource is
tried anew, there is a new saftey measure: the old resource directory
is left over deliberately, thus the new create-resource will deny creation
because some unreachable cluster node may have existed, such that we
didn't even know of its resource membership. This very special
case requires --force and some handwork cleanup.
2013-07-04 07:21:00 +02:00
Frank Liepold
62b016d4cc marsadm: set syncstatus link on primary after marsadm resize 2013-07-04 07:21:00 +02:00
Thomas Schoebel-Theuer
3346daf959 light: allow remote deletion of directories 2013-06-29 21:15:18 +02:00
Thomas Schoebel-Theuer
c917bc239b all: update pre-patches 2013-06-29 21:15:17 +02:00
Thomas Schoebel-Theuer
58e6ae23ad light: workaround nasty race on kthread_stop() 2013-06-29 21:15:17 +02:00
Daniel Hermann
e0ed98eb14 marsadm: secondary waits until device has disappeared
Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-06-29 21:15:17 +02:00
Thomas Schoebel-Theuer
eacc8361ae doc: update README 2013-06-29 21:15:17 +02:00
Daniel Hermann
83b658467b sio: fix call to vfs_fsync() for newest rhel6 kernels
the number of arguments to vfs_fsync has changed in kernel 2.6.35.
The S_BIAS macro (removed at about the same time in 2.6.35) is used to
detect whether vfs_fsync must be called with 2 or 3 args. In RHEL6
kernels 2.6.32, the removal of S_BIAS was backported, but the change
in vfs_fsync was not. So a check for RHEL_MAJOR < 7 is used in
addition to S_BIAS to find the correct number of args for vfs_fsync
call.

Signed-off-by: Thomas Schoebel-Theuer <tst@1und1.de>
2013-06-29 21:15:17 +02:00
Thomas Schoebel-Theuer
5b523f16f7 logger: avoid potential races between IO and symlink updates 2013-06-20 15:09:05 +02:00
Thomas Schoebel-Theuer
39ed143e27 logger: fix potential race on replay_end_pos
The variable should only be set from outside, e.g. mars_light.
This should also lead to more correct replay_code==2 results.
2013-06-20 15:09:05 +02:00
Thomas Schoebel-Theuer
fe54abb225 logger: update symlinks even at apply of incomplete logfiles 2013-06-20 15:08:48 +02:00
Thomas Schoebel-Theuer
fd39137cc9 marsadm: 'secondary' waits until device has disappeared 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
15c76e9ffb marsadm: check block device for exclusive access in {create,join}-resource 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
84bb63ccc8 marsadm: remove potentially dangerous internal _create_cluster() call 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
21a5d4160c logger: disallow skipping of bad data
Be as conservative as possible.

Any copputed logfiles must be corrected in userspace.
2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
eec86bf1af marsadm: create initial versionlink upon create-resource 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
2fee24fe49 light: report is_primary at the end of the round
The old code led to ain unnecessary delay of 1 round.
2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
81ca278291 aio: fix race on file size
The old code used mf->mf_max for correcting the file size, but that
was wrong for multiple writes in flight.

A really correct solution would have to remember all in-flight writes
and compute their minimum IO position. Since that would be too
costly, we just use the old size before any writes have started.

This might be too conservative for extremely high load patterns
(possible starvation problem). For now, take this and check whether
we really need higher effort.
2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
e7edf0020e marsadm: workaround race between create-resource and join-resource 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
dab34fa2f6 marsadm: new command 'set-link' 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
cacea6d673 marsadm: abort 'primary' operation upon errors 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
2ab837cf09 marsadm: augment 'wait-resource' with specific wait conditions 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
faa1c8d802 light: fix attach on locked device 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
ea286c6da1 marsadm: add new option --host= 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
dca17cb9b1 marsadm: change defaults for *{,-local,-global}
By default, {dis}connect and {pause,resume}-{replay,sync} should
only switch the _local_ buttons. Otherwise, unexpected side-effects
could result at bigger clusters (#nodes >> 2) from a human point of view.

The new behaviour is different from DRBD, but DRBD was (until recently)
only working on _pairs_, so global spreadout was impossible.

Global switching may be requested at any time by appending suffix
"-global", which is just no longer the default in MARS.

If anyone has objections, it is straightforward to change the
defaults again.
2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
fc0e6baa01 marsadm: new command delete-file 2013-06-20 15:08:28 +02:00
Thomas Schoebel-Theuer
3f6d1d8858 marsadm: report errors during wait for primary 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
6c3d225f1d marsadm: fix detection of /mars/ directory 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
60adc8a1c5 marsadm: fix versionlink creation on freshly joined resource 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
99a8800b03 marsadm: fix 'invalidate', split into phases 2013-06-20 15:08:27 +02:00
Thomas Schoebel-Theuer
fca84e9417 marsadm: optional size argument for 'create-resource' 2013-06-20 15:08:27 +02:00