summaryrefslogtreecommitdiffstats
path: root/tools/toollib.h
Commit message (Collapse)AuthorAgeFilesLines
* Initialize dmeventd monitoring for every commandZdenek Kabelac2012-02-151-1/+0
| | | | | | | | | | Read lvm.conf setting for monitoring for each command. So we should not activate monitoring if the default compilation is set to monitor during lvconvert commnads. Patch also removes check for clustered VG and allows to disable monitoring for clustered VG with the assumption, the problem with monitoring and dmeventd flag passing for INGNORE is already fixed.
* Const fixingZdenek Kabelac2011-02-181-2/+2
| | | | | | | | | | | | | | | | 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 change_tag to toollib.Alasdair Kergon2011-01-241-0/+3
| | | | Allow multiple pvchange command line options to be specified together.
* Remove superfluous fn prototypes.Alasdair Kergon2010-07-091-3/+0
|
* API change for args of process_each_lv_in_vg()Zdenek Kabelac2010-05-211-0/+1
| | | | | | | | Patch adds failed_lvnames to the list of parameters for process_each_lv_in_vg(). If the list is not NULL it will be filled with LV names of failing LVs during function execution. Application could later reiterate only on failed LVs.
* Use typedefs for toollib process_each functions.Alasdair Kergon2010-04-131-29/+27
|
* Add --stripes to lvconvert too.Alasdair Kergon2010-04-131-0/+3
|
* Do not allow {vg|lv}change --ignoremonitoring if on clustered VG.Mike Snitzer2010-03-291-0/+1
| | | | | | | | | | | | clvmd does not propagate DMEVENTD_MONITOR_IGNORE. Update get_activation_monitoring_mode() to check if the VG that the LV is being activated in is clustered. If so, skip it. Any get_activation_monitoring_mode() error will cause the associated LV (or VG) to be skipped during activation. Both vgchange_single() and lvchange_single(), which call get_activation_monitoring_mode(), are called by their respective process_each_..() method.
* Improve activation monitoring option processingMike Snitzer2010-03-231-0/+3
| | | | | | | | | | | | | . Add "monitoring" option to "activation" section of lvm.conf . Have clvmd consult the lvm.conf "activation/monitoring" too. . Introduce toollib.c:get_activation_monitoring_mode(). . Error out when both --monitor and --ignoremonitoring are provided. . Add --monitor and --ignoremonitoring support to lvcreate. Update lvcreate man page accordingly. . Clarify that '--monitor' controls the start and stop of monitoring in the {vg,lv}change man pages. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Remove const modifier for struct volume_group* from process_each_lv_in_vg().Zdenek Kabelac2010-03-231-1/+1
| | | | Content of this pointer is not const during this function.
* Rename fill_vg_create_params to vgcreate_params_set_from_args.Dave Wysochanski2009-11-011-4/+3
| | | | | Rename fill_vg_create_params to vgcreate_params_set_from_args and remove vg_name parameter from function (caller must set before calling function).
* Add vgcreate_params_set_defaults().Dave Wysochanski2009-11-011-0/+2
| | | | | Add function to set default vgcreate parameters based on existing VG or internal defaults. Should be no functional change.
* Rename pvcreate_params processing functions to better match <object><action>.Dave Wysochanski2009-11-011-1/+1
| | | | | | Rename fill_default_pvcreate_params to pvcreate_params_set_defaults. Rename pvcreate_validate_restore_params to pvcreate_restore_params_validate. Rename pvcreate_validate_params to pvcreate_params_validate.
* Move pvcreate_validate_params into toollib to allow calling from mutiple tools.Dave Wysochanski2009-10-051-0/+3
| | | | | For implicit pvcreate support, we need to call this from vgcreate and vgextend, so move it into toollib.
* Don't attempt to restart pvmoves when deactivating LVs in vgchange.Alasdair Kergon2009-09-291-0/+3
| | | | Restart lvconverts in vgchange by sharing lv_spawn_background_polling.
* Rework the toollib interface (process_each_*) on top of new vg_read.Dave Wysochanski2009-07-011-3/+3
| | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | 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).
* Separate PV label attributes which do not need parse metadata when reporting.Milan Broz2009-02-091-2/+4
| | | | | | | | | | 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.)
* Add "--refresh" functionality to vgchange and vgmknodes.Peter Rajnoha2008-12-221-0/+1
|
* Fix vgrename using UUID in case there are VGs with the same name.Peter Rajnoha2008-12-191-0/+2
|
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-5/+5
|
* Add 'is_reserved_lvname()' helper function.Dave Wysochanski2008-03-251-0/+1
| | | | Very similar to apply_lvname_restrictions but without the error messages.
* Move more parameter validation into the library.Dave Wysochanski2008-01-151-3/+2
| | | | | | | | | | | | | | | 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(-)
* Allow vgcreate options as input to vgsplit when new vg is split destination.Dave Wysochanski2008-01-141-0/+2
|
* various cleanups in recent patchesAlasdair Kergon2007-12-201-3/+0
|
* Major restructuring of pvmove and lvconvert layer manipulation codeAlasdair Kergon2007-12-201-11/+0
|
* Avoid nested vg_reads when processing PVs in VGs and fix associated locking.Alasdair Kergon2007-11-141-1/+1
|
* 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.
* Clean up numerous compiler warnings that crept in recently.Alasdair Kergon2007-08-221-3/+3
| | | | Remove several unused parameters from _allocate().
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Add "const" attributes where possible: first cut.Jim Meyering2007-08-071-11/+17
|
* Split metadata-external.h out from metadata.h for the tools to use.Alasdair Kergon2007-07-181-1/+1
|
* Fix creation and conversion of mirrors with tags.Milan Broz2007-03-261-1/+2
|
* Support the /dev/mapper prefix on most command lines.Alasdair Kergon2007-03-091-1/+2
|
* fix last check-in: lv->size is in sectorsAlasdair Kergon2006-11-031-2/+2
|
* Fix mirror log LV writing to set all bits in whole LV.Alasdair Kergon2006-11-021-1/+2
|
* Add skip_dev_dir() to process command line VGs.Alasdair Kergon2006-08-251-0/+1
|
* Create a log header for replacement in-sync mirror log.Alasdair Kergon2006-05-111-2/+3
| | | | | Use set_lv() and dev_set() to wipe sections of devices. Add mirror_in_sync() flag to avoid unnecessary resync on activation.
* Allow signed mirrors arguments.Alasdair Kergon2005-11-281-0/+6
| | | | Move create_mirror_log() into toollib.
* Attempt to load missing targets using modprobe.Alasdair Kergon2005-10-171-3/+0
|
* Use hash, bitset, malloc, pool from libdevmapper.Alasdair Kergon2005-10-161-3/+2
|
* Factor out generate_log_name_format().Alasdair Kergon2005-08-121-0/+3
|
* Move zero_lv to toollib.Alasdair Kergon2005-08-041-0/+2
|
* Make VG name restrictions consistent.Alasdair Kergon2005-06-061-0/+2
|
* Always insert an intermediate layer for mirrors.Alasdair Kergon2005-06-031-0/+2
| | | | | | Suppress hidden LVs from reports unless --all is given. Use square brackets for hidden LVs in reports. Centralise restrictions on LV names.
* Initial pv_segment code.Alasdair Kergon2005-04-191-0/+8
|
* Change alloc_areas to pe_ranges and allow suppression of availability checks.Alasdair Kergon2004-08-171-2/+2
|
* lvresize + fsadm support - needs testingAlasdair Kergon2004-06-151-0/+3
|
* Update copyright notices.Alasdair Kergon2004-03-301-14/+9
|
* taggingAlasdair Kergon2004-03-081-1/+2
|