summaryrefslogtreecommitdiffstats
path: root/tools/vgchange.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't attempt to restart pvmoves when deactivating LVs in vgchange.Alasdair Kergon2009-09-291-7/+3
| | | | Restart lvconverts in vgchange by sharing lv_spawn_background_polling.
* Add vg_is_resizeable() and cleanup references.Dave Wysochanski2009-09-151-2/+2
| | | | | | | Clean up VG_RESIZEABLE flag by creating vg_is_resizeable(). Update comment - we no longer have ALLOW_RESIZEABLE. Also use vg_is_exported() in one place missed by earlier patch. Should be no functional change.
* Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING.Dave Wysochanski2009-09-151-5/+0
| | | | | | | | | | | | | | 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-21/+63
| | | | | Make readonly locking available as locking type 4. Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
* Use vg_is_exported(vg) macro everywhere.Dave Wysochanski2009-09-141-2/+2
| | | | | | | This patch is all just cleanup and no other patch depends on it. Replace explicit dereference and check with vg_is_exported(). Update a few copyrights and remove unnecessary whitespace. Should be no functional change.
* Remove lockingfailed().Petr Rockai2009-07-151-7/+1
| | | | | | | | | We provide a lock type that behaves like no_locking, but is not clustered. Moreover, it also forbids any write locks. This magically (and consistently) prevents use of clustered VGs, or changing local VGs with --ignorelockingfailure. As a bonus, we can remove the special hacks in a few places. Of course, people looking for trouble can always set their locking_type to 0 to override.
* Refuse to open VG with MISSING_PVs for update unless handles_missing_pvs is set.Petr Rockai2009-07-151-0/+6
|
* Add vg_set_alloc_policy() liblvm function and move vgchange logic inside.Dave Wysochanski2009-07-091-9/+4
| | | | | | | | | NOTE: vg_set_alloc_policy() returns success if you try to set a value that is already stored. The behavior of vgchange is the same though - it fails. There is a fixme noted in the code about this inconsistency, which should be resolved if possible. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Add vg_set_max_pv() liblvm function and move vgchange logic inside.Dave Wysochanski2009-07-091-23/+2
| | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Add vg_set_max_lv() liblvm function and move vgchange logic inside.Dave Wysochanski2009-07-091-23/+2
| | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Rename vg_change_pesize to vg_set_extent_size and use vg_t.Dave Wysochanski2009-07-091-1/+1
| | | | | | | | | | | In liblvm, we will reserve the word 'change' to mean an API that both sets one or more values, and commits to disk. This will be consistent with the LVM commandline. The existing vg_change_pesize() function does not commit to disk, but just changes the extent_size and ensures all internal structures are updated. This logic should be contained in a function that sets the value. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Remove unused 'cmd' from vg_change_pesize().Dave Wysochanski2009-07-091-1/+1
| | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Update vg_change_pesize() to contain all validity checks.Dave Wysochanski2009-07-091-25/+2
| | | | | | | | | | | | It would be nice to have one function that does all the validation and setting of the VG's pesize. However, currently some checks are in the higher-level function _vgchange_pesize(), and some checks are in the lower function vg_change_pesize(). This patch moves most of the higher-level checks inside vg_change_pesize. In one case a failure return code is changed from ECMD_FAILED to EINVALID_CMD_LINE. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Rework the toollib interface (process_each_*) on top of new vg_read.Dave Wysochanski2009-07-011-6/+4
| | | | | | | | | 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-14/+2
| | | | | | | | | | | | | | | | | | | | 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).
* Pre-release cleanups.Alasdair Kergon2009-05-211-1/+1
|
* Merge lv_is_displayable and lv_is_visible.Milan Broz2009-05-131-2/+2
| | | | | | | Displayable and visible is the same thing. volumes_count(vg) is now vg_visible_lvs() and always returns number of LVs from user perspective.
* Remove vg->lv_count and use counter function.Milan Broz2009-05-131-2/+2
| | | | | | | This should not cause problems but simplifies code a lot. (the volumes_count is merged and renamed with lvs_visible function by following patch.)
* Properly release VG memory pool in all CLI tools.Milan Broz2009-04-101-1/+1
|
* Add "--refresh" functionality to vgchange and vgmknodes.Peter Rajnoha2008-12-221-3/+16
|
* Create global is_static() to eliminate from the library init function.Dave Wysochanski2008-12-181-1/+1
| | | | | | | | Very simple / crude method of removing 'is_static' from initialization. Why should we require an application tell us whether it is linked statically or dynamically to libLVM? If the application is linked statically, but libraries exist and dlopen() calls succeed, why do we care if it's statically linked?
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-4/+4
|
* Fix vgchange to not activate mirror leg and log volumes directly.Milan Broz2008-06-121-2/+6
|
* Add vg_is_clustered() helper function.Dave Wysochanski2008-04-101-3/+3
| | | | Should be no functional change.
* Some whitespace tidy-ups.Alasdair Kergon2008-01-301-3/+3
|
* Accept sizes with --readahead argument.Alasdair Kergon2007-11-141-1/+1
| | | | Store size arguments as sectors internally.
* readahead activation code (but no dm support yet)Alasdair Kergon2007-11-121-1/+1
|
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Add vg_status function and clean up vg->status in tools directoryDave Wysochanski2007-06-191-10/+10
|
* Add --ignoremonitoring to disable all dmeventd interaction.Alasdair Kergon2007-06-181-1/+1
|
* lvm.static no longer interacts with dmeventd unless explicitly asked to.Alasdair Kergon2007-01-241-7/+12
|
* register->monitor etc.Alasdair Kergon2007-01-191-16/+8
|
* Report dmeventd mirror monitoring status.Alasdair Kergon2007-01-121-4/+3
|
* Add --maxphysicalvolumes to vgchange.Alasdair Kergon2006-08-161-5/+57
|
* Add --monitor to vgcreate and lvcreate to control dmeventd registration.Alasdair Kergon2006-05-121-3/+74
| | | | | Propagate --monitor around cluster. Filter LCK_NONBLOCK in clvmd lock_vg.
* Make SIZE_SHORT the default for display_size().Alasdair Kergon2006-05-091-4/+5
| | | | | | | 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.
* Introduce origin_from_cow()Alasdair Kergon2006-04-061-1/+1
|
* Change LV locking macros to take lv instead of lvid.Alasdair Kergon2005-08-151-5/+5
|
* Prepare tools to support clustered mirrors.Alasdair Kergon2005-08-141-0/+12
|
* Basic support for mirrors.Alasdair Kergon2005-06-011-2/+2
|
* vgscan/change/display/vgs automatically create metadata backup if ↵Alasdair Kergon2005-05-171-0/+4
| | | | out-of-date or missing.
* vgchange --physicalextentsize (but only if it's an exact fit - may need toAlasdair Kergon2005-04-181-4/+67
| | | | use pvmove first)
* Internal snapshot code restructuring.Alasdair Kergon2005-04-071-1/+1
|
* Add clustered attribute so vgchange can identify clustered VGs w/o locking.Alasdair Kergon2005-03-211-5/+49
|
* Always fail if random id generation fails.Alasdair Kergon2005-01-201-1/+5
|
* Fix vgchange (de)activation of (open) LVs.Alasdair Kergon2004-06-241-4/+8
|
* Add local activation support.Alasdair Kergon2004-06-161-5/+12
|
* xxchange -ae to activation exclusivelyAlasdair Kergon2004-05-241-3/+5
|
* Rename allocation policies; add --alloc to cmdline; LV inherits from VG.Alasdair Kergon2004-05-181-6/+46
|
* Separate out polldaemon.Alasdair Kergon2004-05-051-4/+4
|