summaryrefslogtreecommitdiffstats
path: root/tools/vgrename.c
Commit message (Collapse)AuthorAgeFilesLines
* Backtrace for failing drop_cached_metadataZdenek Kabelac2012-03-011-1/+2
|
* Check return values after calling new lvmetad fnsAlasdair Kergon2012-02-281-1/+3
| | | | (Haven't checked error path handling though)
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-231-0/+2
| | | | lvm.conf *and* lvmetad is running.
* Move lvmcache data structures behind an API (making the structures private toPetr Rockai2012-02-101-2/+2
| | | | lvmcache.c). No functional change.
* Replace free_vg with release_vgZdenek Kabelac2011-08-101-5/+5
| | | | | | | | Move the free_vg() to vg.c and replace free_vg with release_vg and make the _free_vg internal. Patch is needed for sharing VG in vginfo cache so the release_vg function name is a better fit here.
* Const fixingZdenek Kabelac2011-02-181-1/+1
| | | | | | | | | | | | | | | | Fixing some const warnings - with API change in: int vg_extend(struct volume_group *vg, int pv_count, const char *const *pv_names, Change is needed - as lvm2api expects const behaviour here. So vg_extend() is doing local strdup for unescaping. skip_dev_dir return const char* from const char* vg_name. Rest of the patch is cleanup of related warnings. Also using dm_report_filed_string() API change to simplify casting in _string_disp and _lvname_disp.
* Add backtraces for backup and backup_remove fail pathsZdenek Kabelac2010-12-221-2/+4
|
* Rename vg_release to free_vg.Alasdair Kergon2010-12-081-5/+5
|
* Allow VGs with active LVs to be renamed.Peter Rajnoha2010-04-141-25/+17
|
* Remove unnecessary full_scan parameter from get_vgids and get_vgnames calls.Alasdair Kergon2010-03-161-1/+1
|
* Remove lvs_in_vg_activated_by_uuid_only call.Milan Broz2010-02-241-2/+2
| | | | | There is no difference from lvs_in_vg_activated now, convert all users to this call.
* This is related to liblvm and its lvm_list_vg_names() and ↵Peter Rajnoha2010-02-031-3/+2
| | | | | | | | | | | | | | | | lvm_list_vg_uuids() functions where we should not expose internal VG names/uuids (the ones with "#" prefix )through the interface. Otherwise, we could end up with library users opening internal VGs which will initiate locking mechanism that won't be cleaned up properly. "#orphans_{lvm1, lvm2, pool}" names are treated in a special way, they are truncated first to "orphans" and this is used as a part of the lock name then (e.g. while calling lvm_vg_open()). When library user calls lvm_vg_close(), the original name "orphans_{lvm1, lvm2, pool}" is used directly and therefore no unlock occurs. We should exclude internal VG names and uuids in the lists provided by lvmcache: lvmcache_get_vgids() and lvmcache_get_vgnames().
* Add lots of missing stack debug messages to tools.Alasdair Kergon2009-09-141-1/+3
| | | | | Make readonly locking available as locking type 4. Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
* Update vgrename to take into account vgname lock ordering.Dave Wysochanski2009-09-021-9/+27
| | | | | | | Should be no functional change. Author: Dave Wysochanski <dwysocha@redhat.com>
* Refactor vgrename into vg_rename_old and vg_rename_new.Dave Wysochanski2009-09-021-29/+51
| | | | | | | | Should be no functional change. Will allow us to reorder lock obtaining if needed. Author: Dave Wysochanski <dwysocha@redhat.com>
* Fix vg_read() error paths to properly release upon vg_read_error().Dave Wysochanski2009-07-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Fix vg_read() error paths to properly release upon vg_read_error(). Note that in the iterator paths (process_each_*()), we release inside the iterator so no individual cleanup is needed. However there are a number of other places we missed the cleanup. Proper cleanup when vg_read_error() is true should be calling vg_release(vg), since there should be no locks held if we get an error (except in certain special cases, which IMO we should work to remove from the code). Unfortunately the testsuite is unable to detect these types of memory leaks. Most of them can be easily seen if you try an operation (e.g. lvcreate) with a volume group that does not exist. Error message looks like this: Volume group "vg2" not found You have a memory leak (not released memory pool): [0x1975eb8] You have a memory leak (not released memory pool): [0x1975eb8] Author: Dave Wysochanski <dwysocha@redhat.com>
* Convert vgrename to vg_read_for_update.Dave Wysochanski2009-07-011-20/+5
| | | | | | | | | | Sun May 3 12:54:28 CEST 2009 Petr Rockai <me@mornfall.net> * Convert vgrename to vg_read_for_update. Rebased 6/26/2009 - Dave W. Author: Petr Rockai <prockai@redhat.com> Committer: Dave Wysochanski <dwysocha@redhat.com>
* Update vgrename to use vg_lock_newname.Dave Wysochanski2009-06-091-7/+10
|
* Pre-release cleanups.Alasdair Kergon2009-05-211-7/+7
|
* Remove NON_BLOCKING lock flag from tools and set a policy to auto-set.Dave Wysochanski2009-05-131-1/+1
| | | | | | | | | As a simplification to the tools and further liblvm, this patch pushes the setting of NON_BLOCKING lock flag inside the lock_vol() call. The policy we set is if any existing VGs are currently locked, we set the NON_BLOCKING flag. Should be no functional change.
* Properly release VG memory pool in all CLI tools.Milan Broz2009-04-101-8/+8
|
* Remove old metadata backup file after renaming vg.Takahiro Yasui2009-03-231-0/+1
| | | | Author: Takahiro Yasui <tyasui@redhat.com>
* Rename vg_read() to vg_read_internal(). (mornfall)Alasdair Kergon2009-01-261-2/+2
|
* Add "--refresh" functionality to vgchange and vgmknodes.Peter Rajnoha2008-12-221-8/+1
|
* Fix vgrename using UUID in case there are VGs with the same name.Peter Rajnoha2008-12-191-10/+21
|
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-3/+3
|
* cache dropping needs to use old name not newAlasdair Kergon2008-06-061-11/+12
| | | | rename variable to reduce confusion
* Drop cached metadata when renaming a VG.Alasdair Kergon2008-06-061-0/+2
|
* Don't touch /dev in vgrename if activation is disabled.Alasdair Kergon2008-04-301-1/+1
|
* Fix vgreduce to use vg_split_mdas to check sufficient mdas remain.Alasdair Kergon2008-04-081-1/+1
| | | | | Add (empty) orphan VGs to lvmcache during initialisation. Fix orphan VG name used for format_pool.
* Some whitespace tidy-ups.Alasdair Kergon2008-01-301-3/+3
|
* Move more parameter validation into the library.Dave Wysochanski2008-01-151-18/+1
| | | | | | | | | | | | | | | Update vgrename to call validate_vg_rename_params(). Fix vgcreate and vgsplit default arguments by adding defaults parameter to fill_vg_create_params(). Add t-vgrename-usage.sh test. Bugzilla: bz251992 --- tools/toollib.c | 32 ++++++++------------------------ tools/toollib.h | 5 ++--- tools/vgcreate.c | 35 +++++++++++++++++++++-------------- tools/vgrename.c | 35 ++++++----------------------------- tools/vgsplit.c | 21 ++++++++++++++------- 5 files changed, 51 insertions(+), 77 deletions(-)
* Fix orphan-related locking in pvdisplay and pvs.Alasdair Kergon2007-11-021-3/+3
| | | | | | | | 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.
* Add is_orphan_vg() and change all hardcoded checks to use it.Bryn M. Reeves2007-11-021-1/+2
|
* prepare to move guts of vgrename into library functionDave Wysochanski2007-08-311-20/+29
|
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Add vg_check_status to consolidate vg status flags checks and error messages.Dave Wysochanski2007-06-061-11/+3
|
* Support the /dev/mapper prefix on most command lines.Alasdair Kergon2007-03-091-2/+2
|
* Fix vgrename active LV check to ignore differing vgids.Alasdair Kergon2007-03-081-1/+1
|
* When using local file locking, skip clustered VGs.Alasdair Kergon2006-09-021-0/+7
| | | | Add fallback_to_clustered_locking and fallback_to_local_locking parameters.
* Add skip_dev_dir() to process command line VGs.Alasdair Kergon2006-08-251-8/+2
|
* Make SIZE_SHORT the default for display_size().Alasdair Kergon2006-05-091-3/+3
| | | | | | | Fix some memory leaks in error paths found by coverity. Use C99 struct initialisers. Move DEFS into configure.h. Clean-ups to remove miscellaneous compiler warnings.
* vgrename accepts vgid and exported VG.Alasdair Kergon2006-04-131-11/+45
|
* Fix vgexport/vgimport to set/reset PV exported flag so pv_attr is correct.Alasdair Kergon2006-04-121-2/+2
| | | | Add vgid to struct physical_volume and pass with vg_name to some functions.
* Make VG name restrictions consistent.Alasdair Kergon2005-06-061-1/+1
|
* Update copyright notices.Alasdair Kergon2004-03-301-13/+8
|
* More consistent error code usage.Alasdair Kergon2003-10-211-1/+1
|
* Generalise 'invalid chars' error mesg to just say 'invalid'Alasdair Kergon2003-09-151-1/+1
|
* Another sync point - numerous fixes & clean ups.Alasdair Kergon2003-07-041-1/+2
|
* Prevent renaming active VGs for now.Alasdair Kergon2003-05-061-7/+2
|