summaryrefslogtreecommitdiffstats
path: root/lib/mirror
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: drop unneeded included header filesZdenek Kabelac2012-08-231-1/+0
| | | | | This headers were not resolving anything used for compiled .c files. Remove unused util.c file.
* Use same signed numbersZdenek Kabelac2012-02-231-9/+10
| | | | | | | Keep unsigned aritmetic. TODO: we should probably switch dm_split_words() to return unsigned numbers. (minor API libdm change mostly compatible)
* Drop backtrace after log_errorZdenek Kabelac2012-02-231-5/+5
| | | | | Just a minor change to not give backtrace when log_error has been just reported.
* Add check for failureZdenek Kabelac2012-02-131-2/+3
|
* Add boundary test for number of mirror devs and logsZdenek Kabelac2012-02-081-3/+3
| | | | | | | As atoi may return negative value - test for both limits. Test log_args for limits before calling alloca(). Code from dmeventd mirror plugin should probably share same code as we have in mirrored.c.
* Add activation/use_linear_target enabled by default. (prajnoha)Alasdair Kergon2011-11-281-1/+3
| | | | | | | | | LVM metadata knows only of striped segments - not linear ones. The activation code detects segments with a single stripe and switches them to use the linear target. If the new lvm.conf setting is set to 0 (e.g. in a test script), this 'optimisation' is turned off.
* Replace const usage of dm_config_find_node with more appropriate value-lookupPetr Rockai2011-08-311-11/+6
| | | | | | | | | | | | | functionality. A number of bugs (copied and pasted all over the code) should disappear: - most string lookup based on dm_config_find_node would segfault when encountering a non-zero integer (the intention there was to print an error message instead) - check for required sections in metadata would have been satisfied by values as well (i.e. not sections) - encountering a section in place of expected flag value would have segfaulted (due to assumed but unchecked cn->v != NULL)
* Move the core of the lib/config/config.c functionality into libdevmapper,Petr Rockai2011-08-301-16/+16
| | | | | | | leaving behind the LVM-specific parts of the code (convenience wrappers that handle `struct device` and `struct cmd_context`, basically). A number of functions have been renamed (in addition to getting a dm_ prefix) -- namely, all of the config interface now has a dm_config_ prefix.
* Use lv_activate_opts struct instead of ACTIVATE_EXCL status flag.Zdenek Kabelac2011-06-171-2/+1
|
* Add lv_activate_opts structureZdenek Kabelac2011-06-171-5/+7
| | | | | | | | | | | To avoid modification of 'read-only' volume group structure add a new structure to pass local data around the code for LV activation. As origin_only is one such flag - replace this parameter with new struct lv_activate_opts. More parameters might eventually become part of lv_activate_opts.
* Make vg_mark_partial_lvs also clear existing PARTIAL_LV flags, so it can bePetr Rockai2011-05-071-1/+1
| | | | issued repeatedly on the same VG, keeping the PARTIAL_LV flags up to date.
* pre-release clean-upsAlasdair Kergon2011-04-291-4/+4
|
* Replace malloc with zalloc when creating segment_type'sJonathan Earl Brassow2011-03-251-1/+1
|
* Fix !DEVMAPPER_SUPPORT buildZdenek Kabelac2011-02-181-3/+5
| | | | Fix build when devmapper is disabled.
* Remove unused variable mirr_state and its assignmentZdenek Kabelac2011-01-051-3/+0
|
* Remove const usage from destroy callbacksZdenek Kabelac2010-12-201-2/+2
| | | | | | As const segment_type or const format_type are never released use their non-const version and remove const downcast from dm_free calls. This change fixes many gcc warnings we were getting from them.
* Add more strict const pointers around config treeZdenek Kabelac2010-12-201-2/+2
| | | | | | To have better control were the config tree could be modified use more const pointers and very carefully downcast them back to non-const (for config tree merge).
* Check lv_info() successZdenek Kabelac2010-12-011-3/+11
| | | | | | | | Add log_error message for lv_info failure and exit from futher processing. Replace 'leg' occurence in debug message with 'image' which is used in other messages.
* Refactor the percent (mirror sync, snapshot usage) handling code to usePetr Rockai2010-11-301-7/+2
| | | | fixed-point values instead of a combination of a float value and an enum.
* Allow internal suspend and resume of origin without its snapshots.Alasdair Kergon2010-08-171-2/+2
|
* Monitor origin -real device below snapshot instead of overlay device. (brassow)Alasdair Kergon2010-08-171-2/+3
|
* Various small cleanups and fixes related to monitoring.Alasdair Kergon2010-08-161-119/+27
|
* Reduce severity of the "mirror transient status" log message (this was neverPetr Rockai2010-08-041-1/+1
| | | | intended to be a log_error).
* Building without the '--enable-cmirrord' option means thatJonathan Earl Brassow2010-07-211-0/+5
| | | | | | CMIRRORD_PIDFILE is not defined. This makes the build fail. Therefore, we need to conditionalize the check for cmirrord based on if CMIRRORD_PIDFILE is defined.
* It's not enough to check for the kernel module in the case of clusterJonathan Earl Brassow2010-07-211-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | mirrors, we must also check that the log daemon (cmirrord) is running. The log module can be auto-loaded, but the daemon cannot be "auto-started". Failing to check for the daemon produces cryptic messages that customers have a hard time deciphering. (The system messages do report that the log daemon is not running, but people don't seem to find this message easily.) Here are examples of what is printed when the module is available, but the log daemon has not been started. [root@bp-01 LVM2]# lvcreate -m1 -l1 -n lv vg Shared cluster mirrors are not available. [root@bp-01 LVM2]# lvcreate -m1 -l1 -n lv vg -v Setting logging type to disk Finding volume group "vg" Archiving volume group "vg" metadata (seqno 3). Creating logical volume lv Executing: /sbin/modprobe dm-log-userspace Cluster mirror log daemon is not running Shared cluster mirrors are not available. Creating volume group backup "/etc/lvm/backup/vg" (seqno 4).
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-1/+1
|
* Replace strncmp kernel version number checks with proper onesAlasdair Kergon2010-05-241-2/+4
|
* Choose between clustered log versions based on kernel version.Alasdair Kergon2010-05-241-2/+15
| | | | Add fixmes for broken strcmp.
* Update clustered log kernel module name to log-userspace.Alasdair Kergon2010-05-241-1/+1
|
* Account for mirror transient status when doing lvconvert --repair.Petr Rockai2010-05-241-0/+112
|
* Install plugins to subdirsZdenek Kabelac2010-05-061-1/+1
| | | | | | | | | | | Target install_dm_plugin installs files to libdir/device-mapper. Target install_lvm2_plugin installs files to libdir/lvm2. Both targets creates relative links to libdir to keep the code compatible with current dlopen handling. Once we will be able to read plugins from subdir, links could be removed.
* Use UUIDs instead of names while processing event handlers.Peter Rajnoha2010-04-141-13/+13
| | | | | | | | | Internally, we used DM names instead of UUIDs while processing event handlers. This caused problems while trying to vgrename a VG with active LVs where the names are being changed and so the devices were not found then. The patch also contains a little bit of refactoring, moving "build_dlid" code found in dev_manager.c to "build_dm_uuid", now in lvm-string.c (so we have build_dm_uuid and build_dm_name at one place).
* INSTALL rules updatesZdenek Kabelac2010-04-091-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Patch is inspired by Debian's extra patch. - removes OWNER & GROUP make vars they are parts of INSTALL command. - adds INSTALL_PROGRAM for executable, uses $(INSTALL) - adds INSTALL_DATA for non-executable data, uses ($INSTALL) - adds INSTALL_WDATA for writable non-executable data, uses ($INSTALL) - adds configure option --enable-write_install - to support installatin of writable files used by distribution - replaces usage of ifeq @LIB_SUFFIX@ with $(LIB_SUFFIX) - installs .a files from static builds without executable flag - installs .a files to $(usrlibdir) instead of $(libdir) - installs all static binaries to $(staticdir) - create .so links for devel package in $(usrlibdir) instead of $(libdir) - makes .so and .so.LIB_VERSION files within builddir - removes VERSIONED_SHLIB and created versioned LIB_SHARED automagicaly - install LIB_SHARED via install_lib_shared target - install plugins via install_lib_shared_plugin target - prints whole 'install' command during installation instead of less informative "Installing $(something) $(somewhere)" - install multiple man pages with one INSTALL command - use DISTCLEAN_TARGETS instead of creating multiple distclean targets
* Use vpath instead of VPATH.Zdenek Kabelac2010-04-091-1/+0
| | | | | | | | | | | | | | | Usage of VPATH makes troubles when used within $(builddir). Not only source files are being found through VPATH, but targets as well. (make --debug=v) Thus if user builds the code in $(srcdir) and also in some $(builddir) he gets mangled results as some generated files (i.e. .export.sym) are 'reused' from $(srcdir) instead of $(builddir). This patch switches to use vpath were we could explicitly name suffixes that should be looked via vpath - we must take care, we do not generate files with these suffixes: .c, .in, .po, .exported_symbols
* Use $(top_builddir) for inclusion of make.tmpl in Makefiles.Zdenek Kabelac2010-03-041-1/+1
|
* Use macro outsize() with check for error return value.Zdenek Kabelac2010-01-071-2/+2
|
* Fix pvmove region_size overflow for very large PVs.Milan Broz2009-11-181-13/+6
| | | | | | | Fixes problem reported in https://www.redhat.com/archives/dm-devel/2009-November/msg00104.html The region size multiplication can overflow when using 32bit integer.
* Allow for a build directory separate from the source.Alasdair Kergon2009-10-021-1/+2
|
* Introduce percent_range_t and centralise snapshot full/mirror in-sync checks.Alasdair Kergon2009-10-011-4/+14
|
* mirror table generating code: Properly handle 'block_on_errors' and ↵Jonathan Earl Brassow2009-08-131-2/+10
| | | | | | | | | | 'cluster' features The device-mapper mirror CTR table has been changing over time. This has now been corrected to handle the old and new methods for invoking the 'block_on_errors' and 'cluster' features. (The code that does this was accidentally committed in the previous check-in. This check-in finishes the job.)
* Fix confusing metadata syntax error messages.Milan Broz2009-07-091-9/+14
| | | | | | | | | | | | | | | If there is syntax error in metadata, it now prints messages like: Couldn't read 'start_extent' for segment 'extent_count'. Couldn't read all logical volumes for volume group vg_test. The segment specification is wrong and confusing. Patch fixes it by introducing "parent" member in config_node which points to parent section and config_parent_name function, which provides pointer to node section name. Also it adds several LV references where possible.
* Fix last check-ins: seg can be NULL.Alasdair Kergon2009-02-281-4/+4
|
* Attempt cleanup in child before execing new binary in exec_cmd()Alasdair Kergon2009-02-281-3/+4
|
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-032-1/+2
|
* add libdevmapper-event.hAlasdair Kergon2008-10-311-1/+1
|
* Change clustered mirror kernel module name from cmirror to dm-log-clustered.Alasdair Kergon2008-07-311-1/+1
|
* Cease recognising snapshot-in-use percentages returned by early development ↵Alasdair Kergon2008-07-151-2/+1
| | | | kernels.
* .Alasdair Kergon2008-04-101-1/+1
|
* Add vg_is_clustered() helper function.Dave Wysochanski2008-04-101-2/+2
| | | | Should be no functional change.
* Add detection of clustered mirror log capability.Milan Broz2008-04-071-1/+12
| | | | Currently only check for kernel module presence.