IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Use lvconvert --repair in dmeventd mirror DSO.
for now.
It replaces bad behaviour in one set of circumstances with bad behaviour
in a different set. We think the behaviour needs to be more configurable.
This means two things:
1) Non-mirrored LVs will be no longer affected by mirror monitoring. (Before,
if you had a LV that went partially missing on a VG where a mirror leg failed,
this LV would be removed automatically by dmeventd... Probably not an
unrecoverable dataloss bug, but still quite unpleasant.)
2) If enough parallel PV space is available at the time of the mirror failure,
the failed devices will be automatically replaced using this spare space. Which
(and whether) free space may be used is still not configurable, but is a
planned feature. Since it is relatively easy to undo the action by converting
the mirror manually, I don't consider this to be a showstopper. In fact, I
think the compromise is much better than what we have now.
Buildsystem support device-mapper only install,
but generic install tagret includes both dm+lvm2.
For distribution which uses separate install_device-mapper,
there is no way how to install lvm2 only
(so after installing lvm2 for packaging purposes
built system must remove installed device-mapper files).
Fix it by allowing lvm2_install target, similarily like
install_cluster for clvmd.
(install = install_device-mapper + install_lvm2)
snapshot DSO unregistered itself when snapshot changed state to invalid.
This can cause a race (and several timeouts), when for example another snapshot
is added and in the middle of operation (suspend/resume) the monitoring thread
unregister itself.
Fix it by keeping the snapshot monitored after invalidation - just reset
threshold to not really print any messages to syslog.
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
* 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.
* 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.
The daemon side of this is mostly the same as the patch I sent out. To select
a timeout period different than the default and to get the timeout period,
I added two library calls, dm_set_event_timeout() and dm_get_event_timeout().
If people are against them, the other option is to tack extra arguments onto
dm_regiser_for_event() and dm_get_registered_device(). I also added a
-t option to dmevent, so people can try out timeouts.
log types. This means the threaded_syslog type is no longer valid. A new
fxn multilog_async is available to toggle between the two modes. If an
app is compiled without pthreads and tries to use async logging, no logging
will occur while async is enabled.
dmeventd has been modified to use the new code
I'm not positive I like the way the async_logger code calls the log fxn,
but it works for now. Suggestions for other ways to do it would be helpful
- multilog_add_type, multilog_del_type, multilog_custom, and
multilog_init_verbose all have different arguments.
- Primary change is that caller only passes in config info, and the
lib keeps track of state internally. No more exporting of
'struct log_data'.
- Custom callers now only get the custom data pointer passed into their
log fxn (that is set with multilog_custom)
- Added basic README that describes libmultilog
# dmevent -l
Also, changed the behaviour of dm_get_registered_device(), so that it doesn't
change the pointer you passed in without freeing the memory on a non-next call,
and doesn't free your pointer without setting it to NULL on a failed next call.
multilog_add_type()/multilog_del_type cycles correctly.
o fixed segfault in multilog_add_type()
o fixed test-multilog.c
o cleaned up libmultilog (list macros, indentation, braces, comments)
- add event_nr to thread_status struct and set appropriately so that the
thread actually waits for an event
- essentially make error_detected return true. Let the DSOs determine
how to interpret the status info
o more tweaks to libmultilog calls - the api isn't set in stone yet, so
don't get too comfortable.
o not sure the dmeventd in device-mapper/dmeventd works - i've been using
the one in lib/event/
o currently both daemons are set to log only to syslog
o changed
int dm_get_next_registered_device(char **dso_name, char **device,
enum event_type *events);
to
int dm_get_registered_device(char **dso_name, char **device,
enum event_type *events, int next)
so that the daemon is able to retrive the next one of the list without
running into locking issues.
o changed dmevent.c to use dm_get_registered_device()
o couldn't test this yet because of the comms issues
(daemon exits in do_process_request())