summaryrefslogtreecommitdiffstats
path: root/lib/snapshot
Commit message (Collapse)AuthorAgeFilesLines
* Differentiate between snapshot status of "Invalid" and "Merge failed".Mike Snitzer2012-01-201-2/+4
|
* Move the core of the lib/config/config.c functionality into libdevmapper,Petr Rockai2011-08-301-6/+6
| | | | | | | 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 flagZdenek Kabelac2011-06-171-1/+1
| | | | Let's hope all conditions has been properly converted.
* Add lv_activate_opts structureZdenek Kabelac2011-06-171-1/+2
| | | | | | | | | | | 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.
* 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-0/+2
| | | | Fix build when devmapper is disabled.
* 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.
* Refactor the percent (mirror sync, snapshot usage) handling code to usePetr Rockai2010-11-301-5/+5
| | | | fixed-point values instead of a combination of a float value and an enum.
* Convey need for snapshot-merge target in lvconvert error message and manMike Snitzer2010-10-131-0/+9
| | | | | | | | | | | | | | | | | | | | | page. Add ->target_name to segtype_handler to allow a more specific target name to be returned based on the state of the segment. Result of trying to merge a snapshot using a kernel that doesn't have the snapshot-merge target: Before: # lvconvert --merge vg/snap Can't expand LV lv: snapshot target support missing from kernel? Failed to suspend origin lv After: # lvconvert --merge vg/snap Can't process LV lv: snapshot-merge target support missing from kernel? Failed to suspend origin lv Unable to merge LV "snap" into it's origin.
* 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-109/+11
|
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-8/+8
|
* 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-9/+9
| | | | | | | | | 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-8/+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
|
* Detect case of both merging_store and cow_store supplied inMike Snitzer2010-01-151-2/+7
| | | | _snap_text_import().
* Improve target type compatibility checking in _percent_run().Mike Snitzer2010-01-151-0/+6
| | | | Add 'target_status_compatible' method to 'struct segtype_handler'.
* Note some problems still to be addressed.Alasdair Kergon2010-01-141-3/+3
|
* Rename segment and lv status flag from SNAPSHOT_MERGE to MERGING.Mike Snitzer2010-01-131-2/+2
| | | | | | Eliminate 'merging_snapshot' from 'struct logical_volume' and just use 'snapshot' for origin lv's reference to the merging snapshot; also set MERGING in the origin lv's status.
* Add support for "snapshot-merge" target.Mike Snitzer2010-01-131-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces new libdevmapper function dm_tree_node_add_snapshot_merge_target Verifies that the kernel (dm-snapshot) provides the 'snapshot-merge' target. Activate origin LV as snapshot-merge target. Using snapshot-origin target would be pointless because the origin contains volatile data while a merge is in progress. Because snapshot-merge target is activated in place of the snapshot-origin target it must be resumed after all other snapshots (just like snapshot-origin does) --- otherwise small window for data corruption would exist. Ideally the merging snapshot would not be activated at all but if it is to be activated (because snapshot was already active) it _must_ be done after the snapshot-merge. This insures that DM's snapshot-merge target will perform exception handover in the proper order (new->resume before old->resume). DM's snapshot-merge does support handover if the reverse sequence is used (old->resume before new->resume) but DM will fail to resume the old snapshot; leaving it suspended. To insure the proper activation sequence dm_tree_activate_children() was updated to accommodate an additional 'activation_priority' level. All regular snapshots are 0, snapshot-merge is 1, and merging snapshot is 2.
* Add 'SNAPSHOT_MERGE' lv_segment 'status' flag.Mike Snitzer2010-01-131-4/+10
| | | | | | | | | | | | | Make 'merging_snapshot' pointer that points from the origin to the segment that represents the merging snapshot. Import/export 'merging_store' metadata. Do not allow creating snapshots while another snapshot is merging. Snapshot created in this state would certainly contain invalid data. NOTE: patches at the end of this series will remove 'merging_snapshot' and will introduce helpful wrappers and cleanups.
* Use snapshot metadata usage to determine if snapshot is emptyMike Snitzer2010-01-051-8/+16
| | | | | | | | | | | | Version >= 1.8.0 of the DM snapshot target appends metadata sectors used to a snapshot's status. This patch allows LVM2 to accurately determine if the snapshot store is empty. Knowing when a snapshot store is empty is important in the context of snapshot-merge (means merge is complete). Also update LVM2 to be aware of the possibility for "Merge failed" in the snapshot-merge target's status. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* 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-6/+16
|
* Fix snapshot segment import to not use duplicate segments & replace.Milan Broz2009-05-131-5/+1
| | | | | | | | | | | | | | | | | The snapshot segment (snapshotX) is created twice during the text metadata segment processing. This can cause temporary violation of max_lv count. Simplify the code, snapshot segment is properly initialized in init_snapshot_seg function now and do not need to be replaced by vg_add_snapshot call. The vg_add_snapshot() is now usefull only for adding new snapshot and it shares the same initialization function. The snapshot name is always generated, name paramater can be removed from function call.
* Save and restore the previous logging level when log level is changed.Takahiro Yasui2009-04-021-4/+5
|
* Fix last check-ins: seg can be NULL.Alasdair Kergon2009-02-281-3/+4
|
* Attempt cleanup in child before execing new binary in exec_cmd()Alasdair Kergon2009-02-281-3/+3
|
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-032-1/+2
|
* add libdevmapper-event.hAlasdair Kergon2008-10-311-1/+1
|
* Cease recognising snapshot-in-use percentages returned by early development ↵Alasdair Kergon2008-07-151-11/+5
| | | | kernels.
* Add detection of clustered mirror log capability.Milan Broz2008-04-071-1/+2
| | | | Currently only check for kernel module presence.
* Fix mirror log name construction during lvconvert. (2.02.30)Alasdair Kergon2008-01-311-1/+2
| | | | | | Make monitor_dev_for_events recurse through the stack of LVs. Clean up some more compiler warnings. Add mirror names test script.
* Some whitespace tidy-ups.Alasdair Kergon2008-01-301-1/+1
|
* Use stack return macros throughout.Alasdair Kergon2008-01-301-8/+4
|
* Fix warning on conditional compile, unused variableDave Wysochanski2008-01-111-0/+2
|
* Add snapshot dmeventd library (enables dmeventd snapshot monitoring).Petr Rockai2008-01-091-1/+142
|
* Fix orphan-related locking in pvdisplay and pvs.Alasdair Kergon2007-11-021-1/+1
| | | | | | | | Fix missing VG unlocks in some pvchange error paths. Add some missing validation of VG names. Rename validate_vg_name() to validate_new_vg_name(). Change orphan lock to VG_ORPHANS. Change format1 to use ORPHAN as orphan VG name.
* Non-functional change - refactor vg_add_snapshot fid parameter.Dave Wysochanski2007-10-111-1/+1
|
* Correct typo in comments: s/is part of the LVM2/is part of LVM2/.Jim Meyering2007-09-211-1/+1
| | | | | | | Signed-off-by: Jim Meyering <jim@meyering.net> Author: Jim Meyering <jim@meyering.net>
* Clean up numerous compiler warnings that crept in recently.Alasdair Kergon2007-08-221-1/+1
| | | | Remove several unused parameters from _allocate().
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Don't use index and rindex functions marked by SUSv3 as legacy - Jakub ↵Dave Wysochanski2007-07-021-1/+1
| | | | Bogusz <qboosh@pld-linux.org>
* Add segment parameter to target_present functions.Alasdair Kergon2006-10-181-1/+1
|
* Add LV column to reports listing kernel modules needed for activation.Alasdair Kergon2006-10-031-0/+14
|
* Add DISTCLEAN_TARGETS to make template for configure.h.Alasdair Kergon2006-05-161-1/+1
| | | | More fixes to error paths.
* Add mirror_library description to example.conf.Alasdair Kergon2006-05-111-4/+6
| | | | More compile-time cleanup.