summaryrefslogtreecommitdiffstats
path: root/tools/pvresize.c
Commit message (Collapse)AuthorAgeFilesLines
* Using enum types for enumsZdenek Kabelac2012-02-281-1/+1
| | | | alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
* Replace free_vg with release_vgZdenek Kabelac2011-08-101-2/+2
| | | | | | | | 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.
* Defer writing PV labels to vg_write.Alasdair Kergon2011-06-011-1/+1
| | | | Store label_sector only in struct physical_volume.
* Add new free_pv_fid fn and use it throughout to free all attached fids.Peter Rajnoha2011-03-111-0/+2
| | | | | | | | Since format instances will use own memory pool, it's necessary to properly deallocate it. For now, only fid is deallocated. The PV structure itself still uses cmd mempool mostly, but anytime we'd like to add a mempool in the struct physical_volume, we can just rename this fn to free_pv and add the code (like we have free_vg fn for VGs).
* Add a hint for manual revert if there's an error in pv_write, vg_write, ↵Peter Rajnoha2011-02-281-1/+6
| | | | vg_commit for pvresize.
* Allow non-orphan PVs with two metadata areas to be resized.Peter Rajnoha2011-02-281-4/+11
| | | | | | | | | We allow writing non-orphan PVs only for resize now. The "orphan PV" assert in pv_write fn uses the "allow_non_orphan" parameter to control this assert. However, we should find a more elaborate solution so we can remove this restriction altogether (pv_write together with vg_write is not atomic, we need to find a safe mechanism so there's an easy revert possible in case of an error).
* Change pvresize code to work with new metadata handling interface and allowPeter Rajnoha2011-02-211-50/+3
| | | | resizing a PV with two metadata areas.
* Change pv_write code to work with the changes in metadata handling interfacePeter Rajnoha2011-02-211-1/+1
| | | | and changes in format_instance.
* Remove useless mdas parameter for pv_read (from now on, we store mdas in aPeter Rajnoha2011-02-211-5/+3
| | | | format instance)
* Replace PV_MIN_SIZE with function pv_min_size()Zdenek Kabelac2011-02-181-3/+3
| | | | | | | | | | | | | | | | | Add configurable option to define minimal size of of block device usable as a PV. pv_min_size() is added to lvm-globals and it's being initialized through _process_config. Macro PV_MIN_SIZE is unused and removed. New define DEFAULT_PV_MIN_SIZE_KB is added to lvm-global and unlike PV_MIN_SIZE it uses KB units. Should help users with various slow devices attached to the system, which cannot be easily filtered out (like FDD on /dev/sdX): https://bugzilla.redhat.com/show_bug.cgi?id=644578
* Rename vg_release to free_vg.Alasdair Kergon2010-12-081-2/+2
|
* Print vg_name and do not to access vg->nameZdenek Kabelac2010-10-251-1/+1
| | | | | Reported by clang as: Logic error Dereference of null pointer Replace pointer dereference with vg_name.
* Accept orphan VG names as parameters to lock_vol() and related functions.Alasdair Kergon2010-05-191-19/+16
|
* Fix unlocking vg in some pvresize and toollib error paths.Zdenek Kabelac2009-12-111-2/+6
|
* 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)
* Port process_each_pv to new vg_read.Petr Rockai2009-07-151-1/+1
|
* Fix vg_read() error paths to properly release upon vg_read_error().Dave Wysochanski2009-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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 the straight instances of vg_lock_and_read to new vg_read(_for_update).Dave Wysochanski2009-07-011-13/+2
| | | | | | | Sun May 3 11:40:51 CEST 2009 Petr Rockai <me@mornfall.net> * Convert the straight instances of vg_lock_and_read to new vg_read(_for_update). Rebased 6/26/09 by Dave W.
* revert last patch - let's do a release firstAlasdair Kergon2009-06-261-2/+13
|
* Convert the straight instances of vg_lock_and_read to new vg_read(_for_update).Dave Wysochanski2009-06-261-13/+2
| | | | | | | | | Sun May 3 11:40:51 CEST 2009 Petr Rockai <me@mornfall.net> * Convert the straight instances of vg_lock_and_read to new vg_read(_for_update). Author: Petr Rockai <prockai@redhat.com> Committer: Dave Wysochanski <dwysocha@redhat.com>
* Properly release VG memory pool in all CLI tools.Milan Broz2009-04-101-37/+27
|
* Try to avoid full rescan if label scan is enough.Milan Broz2009-02-251-1/+1
|
* Separate PV label attributes which do not need parse metadata when reporting.Milan Broz2009-02-091-1/+1
| | | | | | | | | | When reporting explicitly label attributes (pv_uuid for example), we do not need to read metadata. This patch separate the label fileds and removes scan_vgs_for_pvs in process_each_pv() if not needed. (There should be no user visible change in output.)
* Rename vg_read() to vg_read_internal(). (mornfall)Alasdair Kergon2009-01-261-1/+1
|
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-4/+4
|
* Fix pvresize to not allow resize if PV has two metadata areas.Milan Broz2008-09-121-7/+19
| | | | | | | If the PV has two metadata areas, second one is located at the end of the device. Do not allow resize of PV or second metadata area can be overwritten. (The check was active only for orphan PVs.)
* Some whitespace tidy-ups.Alasdair Kergon2008-01-301-1/+1
|
* Use stack return macros throughout.Alasdair Kergon2008-01-301-2/+1
|
* Decode cluster locking state in log message. (untested)Alasdair Kergon2007-11-161-5/+5
| | | | Change file locking state messages from debug to very verbose.
* move pvresize_single back under toolsAlasdair Kergon2007-11-151-0/+154
|
* Avoid nested vg_reads when processing PVs in VGs and fix associated locking.Alasdair Kergon2007-11-141-1/+2
|
* Accept sizes with --readahead argument.Alasdair Kergon2007-11-141-1/+1
| | | | Store size arguments as sectors internally.
* move guts of pvresize into libraryDave Wysochanski2007-08-301-156/+0
|
* prepare to move guts of pvresize into libraryDave Wysochanski2007-08-301-26/+38
|
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-2/+2
|
* Make warnings go to stderr. Change log_warn to that effect, log_printPetr Rockai2007-06-281-1/+1
| | | | continues to send messages to stdout.
* Remove get_ prefix from get_pv_* functionsDave Wysochanski2007-06-151-14/+14
|
* Convert pv->vg_name to get_pv_vg_nameDave Wysochanski2007-06-141-1/+1
|
* Convert pv->vg_name to get_pv_vg_nameDave Wysochanski2007-06-131-4/+4
|
* Convert pv->dev to get_pv_devDave Wysochanski2007-06-131-2/+2
|
* Convert pv->size to get_pv_sizeDave Wysochanski2007-06-131-3/+3
|
* Convert pv->pe_size to get_pv_pe_sizeDave Wysochanski2007-06-131-1/+1
|
* Convert pv->pe_start to get_pv_pe_startDave Wysochanski2007-06-131-3/+3
|
* Add vg_check_status to consolidate vg status flags checks and error messages.Dave Wysochanski2007-06-061-15/+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.
* Fix vgexport/vgimport to set/reset PV exported flag so pv_attr is correct.Alasdair Kergon2006-04-121-1/+1
| | | | Add vgid to struct physical_volume and pass with vg_name to some functions.
* A pvresize implementation (Zak Kipling).Alasdair Kergon2005-10-311-0/+221