summaryrefslogtreecommitdiffstats
path: root/tools/vgcfgbackup.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace snprintf with dm_snprintfZdenek Kabelac2012-02-081-1/+1
| | | | | | snprintf testing for negative is replaced with dm_snprintf where this test really works. Add missing test for result of dm_snprintf().
* Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING.Dave Wysochanski2009-09-151-1/+1
| | | | | | | | | | | | | | Remove the checks for vg_read_error() in most of the tools callback functions and instead make the check in _process_one_vg() more general. In all but vgcfgbackup, we do not want to proceed if we get any error from vg_read(). In vgcfgbackup's case, we may proceed if the backup is to proceed with inconsistent VGs. This is a special case though, and we mark it with the READ_ALLOW_INCONSISTENT flag passed to process_each_vg (and subsequently to _process_one_vg). NOTE: More cleanup is needed in the vg_read_error() path cases. This patch is a start.
* Add lots of missing stack debug messages to tools.Alasdair Kergon2009-09-141-4/+3
| | | | | Make readonly locking available as locking type 4. Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
* Fix FAILED_INCONSISTENT case in vg_backup_single - typeo on 'if' condition.Dave Wysochanski2009-07-151-1/+1
| | | | | | | | | | In vg_backup_single, we should error out if we vg_read_error(vg) and the error code we received was anything other than FAILED_INCONSISTENT. Original code contained an error because C operator precedence. Note - this was part of the vg_read() so no WHATS_NEW entry neceesary. Author: Dave Wysochanski <dwysocha@redhat.com>
* Rework the toollib interface (process_each_*) on top of new vg_read.Dave Wysochanski2009-07-011-4/+6
| | | | | | | | | Sun May 3 12:32:30 CEST 2009 Petr Rockai <me@mornfall.net> * Rework the toollib interface (process_each_*) on top of new vg_read. Rebased 6/26/09 by Dave W. - Add skipping message to process_each_lv - Remove inconsistent_t.
* Fix double releasing of vg when repairing of vg is requested.Milan Broz2009-06-051-10/+3
| | | | | | | | | | | | | | | | | | | | Several commands calls process_each_vg() and in provided callback it explicitly recovers VG if inconsistent. (vgchange, vgconvert, vgscan) It means that old VG is released and reread but the function above (process_one_vg) tries to unlock and release old VG. Patch moves the repair logic into _process_one_vg() function. It always tries to read vg (even inconsistent) and then decides what to do according new defined parameter. Also patch unifies inconsistent error messages. The only slight change if for vgremove command, where it now tries to repair VG before it removes if force arg is given. (It works similar way before, just the order of operation changed).
* Improve the way VGs with PVs missing are handled so manual interventionAlasdair Kergon2008-09-191-2/+1
| | | | is required in fewer circumstances. (mornfall)
* Fix vgcfgbackup to properly check filename if template is used.Milan Broz2008-08-131-3/+3
|
* Some whitespace tidy-ups.Alasdair Kergon2008-01-301-1/+1
|
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Make warnings go to stderr. Change log_warn to that effect, log_printPetr Rockai2007-06-281-1/+1
| | | | continues to send messages to stdout.
* more coverity fixesAlasdair Kergon2006-05-101-1/+5
|
* Use hash, bitset, malloc, pool from libdevmapper.Alasdair Kergon2005-10-161-6/+6
|
* Move archiver code from tools into library.Alasdair Kergon2005-05-171-1/+1
|
* vgcfgbackup -f accepts template with %s for VG name.Alasdair Kergon2004-06-191-2/+42
|
* Update copyright notices.Alasdair Kergon2004-03-301-2/+11
|
* More consistent error code usage.Alasdair Kergon2003-10-211-1/+1
|
* use pvmove flagAlasdair Kergon2003-04-301-2/+11
|
* Some new features.Alasdair Kergon2002-11-181-34/+17
|
* agk, I recall you saying you had a massive commit pending; if you need meAndres Salomon2002-10-271-0/+3
| | | | | | | | | | | to back this out so you can do that commit, let me know. Also, if there's an issue with the error message that's displayed, just change it in tools.h. This causes a "device-mapper driver/module not loaded?" error message to be displayed for the commands that require dm-mod, if the tools can't get the driver version. It's not done for commands that don't require dm-mod. This should clear up some problems people have had attempting to use lvm2 without rtfm'ing.
* Merge with text format branch.Alasdair Kergon2002-04-241-5/+9
| | | | | | | | | | | | | | | | | | | Lots of changes/very little testing so far => there'll be bugs! Use 'vgcreate -M text' to create a volume group with its metadata stored in text files. Text format metadata changes should be reasonably atomic, with a (basic) automatic recovery mechanism if the system crashes while a change is in progress. Add a metadata section to lvm.conf to specify multiple directories if you want (recommended) to keep multiple copies of the metadata (eg on different filesystems). e.g. metadata { dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"] } Plenty of refinements still in the pipeline.
* Review locking: block signals instead of ignoring them and restore stateAlasdair Kergon2002-03-151-1/+1
| | | | afterwards; avoid race condition with unlink; add LCK_HOLD to process_each_vg.
* Run through indent - no (intentional) changes to any code.Alasdair Kergon2002-02-111-3/+2
|
* Preparation for an LVM2 liblvm - pass cmd_context into each tool andAlasdair Kergon2002-02-111-7/+7
| | | | link some globals that the tools need into that structure.
* o Support locking with local lock filesAlasdair Kergon2002-02-111-1/+1
| | | | o Disable control-c during updates (except if blocked waiting for a lock)
* o Add cmd_line field to struct cmd_contextJoe Thornber2002-02-081-1/+2
| | | | | | | | | | | | | | | | | | o Text format now has a description and time field at the top level. o archiving and backup set the description appropriately. eg, for an archive: description = "Created *before* executing 'lvextend test_vg/lvol0 -l +1'." creation_time = 1013166332 for a backup: description = "Created *after* executing 'lvextend test_vg/lvol0 -l +1'." creation_time = 1013166332 This is preparing the way for a simple vgcfgundo command.
* quotes around names in outputHeinz Mauelshagen2002-01-301-3/+3
|
* o vgcfgrestore works ! (with the couple of examples I tried).Joe Thornber2002-01-151-1/+1
|
* o ACTIVE is no longer a status flag - lv_active() used to check if an LVAlasdair Kergon2002-01-101-3/+0
| | | | | | | | | | is active in the device-mapper. o Many operations can be carried out regardless of whether the VG is active or not. o vgscan does not activate anything - use vgchange. o Change lvrename to support renaming of active LVs. o Remove '//' appearing in some pathnames. o Dummy lv_check_segments() for compilation.
* o sync tool changes for backup stuff.Joe Thornber2002-01-071-1/+1
|
* o sync laptop to test machine.Joe Thornber2002-01-071-3/+29
|
* o Added a quick vgcfgbackup, needs parameters as yet.Joe Thornber2001-12-201-0/+35