summaryrefslogtreecommitdiffstats
path: root/tools/tools.h
Commit message (Collapse)AuthorAgeFilesLines
* thin: use discards as plural rather than singularAlasdair G Kergon2012-08-071-1/+1
| | | | Global change from --discard to --discards, as that feels more natural.
* args: increase major:minor limit to 4095:1048575Peter Rajnoha2012-08-061-0/+2
| | | | | | | | | Remove the limit for major and minor number arguments used while specifying persistent numbers via -My --major <major> --minor <minor> option which was set to 255 before. Follow the kernel limit instead which is 12 bits for major and 20 bits for minor number (kernel >= 2.6 and LVM formats that does not have FMT_RESTRICTED_LVIDS - so still keep the old limit of 255 for lvm1 format).
* thin: add discard support for thin poolZdenek Kabelac2012-07-181-0/+1
| | | | | | | | Add arg support for discard. Add discard ignore, nopassdown, passdown (=default) support. Flags could be set per pool. lvcreate [--discard {ignore|no_passdown|passdown}] vg/thinlv
* activate: add autoactivation hooksPeter Rajnoha2012-06-281-0/+3
| | | | | | | | | | | | | | | | Define an 'activation_handler' that gets called automatically on PV appearance/disappearance while processing the lvmetad_pv_found and lvmetad_pv_gone functions that are supposed to update the lvmetad state based on PV availability state. For now, the actual support is for PV appearance only, leaving room for PV disappearance support as well (which is a more complex problem to solve as this needs to count with possible device stack). Add a new activation change mode - CHANGE_AAY exposed as '--activate ay/-aay' argument ('activate automatically'). Factor out the vgchange activation functionality for use in other tools (like pvscan...).
* args: add --activate synonym for --available argPeter Rajnoha2012-06-281-1/+1
| | | | | | | | We're refererring to 'activation' all over the code and we're talking about 'LVs being activated' all the time so let's use 'activation/activate' everywhere for clarity and consistency (still providing the old 'available' keyword as a synonym for backward compatibility with existing environments).
* Fix a regression in handling --major/--minor arguments to lvcreate & lvchange,Petr Rockai2012-03-161-0/+1
| | | | by allowing arg_int_value to be used with groupable options.
* Switch pvscan --cache major:minor to --major --minor.Alasdair Kergon2012-03-061-0/+1
|
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-231-0/+1
| | | | lvm.conf *and* lvmetad is running.
* Support rounding of percentage upwardZdenek Kabelac2012-01-051-1/+1
| | | | | | | | | | | | | | | We want to keep this logic - when LV is extend - extend the LV by at least given amount, when LV is reduced - reduce the LV by at most given amount. So for this the rounding needs to be used. Current logic which seems to satisfy give rule is to round up all extent values for LV resize upward except for values with '-' sign that are round downward. This patch also fixes the problem when lvextend --use-polices tried to extend LV the by i.e. 20% - but the resulting 20% were smaller the extent size thus before this patch no extension happened.
* Fix possible overflow of size if %FREE or %VG is used.Milan Broz2011-09-151-0/+1
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=737087
* remove unnecessary lvconvert.hAlasdair Kergon2011-07-081-0/+3
|
* Permit --available with lvcreate so non-snapshot LVs need not be activated.Alasdair Kergon2011-06-011-8/+0
|
* Refactor the percent (mirror sync, snapshot usage) handling code to usePetr Rockai2010-11-301-3/+3
| | | | fixed-point values instead of a combination of a float value and an enum.
* Support repetition of --addtag and --deltag arguments.Alasdair Kergon2010-11-111-28/+40
| | | | | Add infrastructure for specific cmdline arguments to be repeated in groups. Split the_args cmdline arguments and values into arg_props and arg_values.
* Add global/metadata_read_only to use unrepaired metadata in read-only cmds.Alasdair Kergon2010-10-251-1/+2
|
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-1/+1
|
* Fix --[vg]metadatacopies arg processingAlasdair Kergon2010-06-301-2/+1
|
* Allow 'all' and 'unmanaged' values for --vgmetadatacopies.Dave Wysochanski2010-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Allowing an 'all' and 'unmanaged' value is more intuitive, and provides a simple way for users to get back to original LVM behavior of metadata written to all PVs in the volume group. If the user requests "--vgmetadatacopies unmanaged", this instructs LVM not to manage the ignore bits to achieve a specific number of metadata copies in the volume group. The user is free to use "pvchange --metadataignore" to control the mdas on a per-PV basis. If the user requests "--vgmetadatacopies all", this instructs LVM to do 2 things: 1) clear all ignore bits, and 2) set the "unmanaged" policy going forward. Internally, we use the special MAX_UINT32 value to indicate 'all'. This 'just' works since it's the largest value possible for the field and so all 'ignore' bits on all mdas in the VG will get cleared inside _vg_metadata_balance(). However, after we've called the _vg_metadata_balance function, we check for the special 'all' value, and if set, we write the "unmanaged" value into the metadata. As such, the 'all' value is never written to disk. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Use "" instead of <> for configure.h and libdevmapper.hZdenek Kabelac2010-06-151-2/+2
| | | | Move configure.h as the first header for clvmd source files.
* Remove no-longer-used arg_ptr_value.Alasdair Kergon2010-04-291-1/+1
| | | | Fix -M and --type to use strings not pointers that change on config refresh.
* Add %ORIGIN support to lv{create,extend,reduce,resize} --extents optionMike Snitzer2010-02-031-1/+2
| | | | | | | | | | | Allow the number of logical extents to be expressed (for a snapshot) as a percentage of the total space in the Origin Logical Volume with the suffix %ORIGIN. Update the relevant man pages accordingly. Eliminate inconsistencies between the man pages and tools/commands.h Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Tidy some uses of arg_count and introduce arg_is_set.Alasdair Kergon2009-11-031-1/+2
|
* Fix convert polling to ignore LV with different UUID.Milan Broz2009-06-011-1/+1
| | | | | | | | | | | | | | | | | | | When mirror convert polling is started (mainly as backgound process, in lvchange -a y or in lvconvert itself) it tries to read VG and LV identified by its name. Unfortunatelly, the VG can have already different LV under the same name, and various more or less funny things can happen (note that _finish_lvconvert_mirror suspends the volume for example). (the typical example is our testing script which continuously recreates LVs under the same name in the same VG.) This patch adds optional uuid parameter which helps to properly select the monitoring object. For lvconvert polling it is set to LV UUID and both _get_lvconvert_vg and _get_lvconvert_lv uses it to read proper VG/LV. (In the pvmove case it is NULL, here we poll for physical volume name).
* more missing bitsAlasdair Kergon2008-11-041-1/+0
|
* Split out lvm-logging.h from log.h.Alasdair Kergon2008-10-301-1/+1
|
* Add per-command flags to control which commands use the VG metadata cache.Alasdair Kergon2008-04-021-0/+4
|
* Various lvconvert/polldaemon-related fixes from NEC. See lvm-develAlasdair Kergon2008-01-101-0/+1
| | | | for original patches & explanations.
* Enhance the management of readahead settings.Alasdair Kergon2007-11-091-1/+1
|
* Add %PVS extents option to lvresize, lvextend, and lvcreate.Dave Wysochanski2007-09-201-1/+2
|
* Clean up mirrorlog argument processing.Alasdair Kergon2007-08-211-1/+4
| | | | Only permit --force, --verbose and --debug arguments to be repeated.
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Move lv_remove_single() into library (lv_manip.c, metadata-exported.h).Dave Wysochanski2007-08-201-1/+0
| | | | | | Move yes_no_prompt() into library (display.c, display.h). Fixup includes as a result of movement of prior two functions. Fixup force_t enum to be more descriptive.
* Add "const" attributes where possible: first cut.Jim Meyering2007-08-071-1/+1
|
* Split metadata-external.h out from metadata.h for the tools to use.Alasdair Kergon2007-07-181-2/+1
|
* Add %VG, %LV and %FREE suffices to lvcreate/lvresize --extents arg.Alasdair Kergon2006-09-261-0/+10
| | | | | | e.g. lvcreate -l 100%FREE to create an LV using all available space. lvextend -l 50%LV to increase an LV by 50% of its existing size. lvcreate -l 20%VG to create an LV using 20% of the total VG size.
* Make SIZE_SHORT the default for display_size().Alasdair Kergon2006-05-091-2/+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.
* Check for libsepol.Alasdair Kergon2006-04-191-61/+12
| | | | | | Add some cflow & scope support. Separate out DEFS from CFLAGS. Remove inlines and use unique function names.
* Attempt to load missing targets using modprobe.Alasdair Kergon2005-10-171-0/+1
|
* Use hash, bitset, malloc, pool from libdevmapper.Alasdair Kergon2005-10-161-2/+2
|
* Alignment tidying.Alasdair Kergon2005-04-061-0/+2
|
* Avoid some compiler warnings.Alasdair Kergon2005-03-101-7/+7
|
* Rename old segtypes files to segtype.Alasdair Kergon2004-09-161-1/+1
|
* Add local activation support.Alasdair Kergon2004-06-161-0/+8
|
* xxchange -ae to activation exclusivelyAlasdair Kergon2004-05-241-0/+1
|
* Rename allocation policies; add --alloc to cmdline; LV inherits from VG.Alasdair Kergon2004-05-181-0/+1
|
* Add --type to lvcreate/resize.Alasdair Kergon2004-05-111-0/+1
| | | | | | | Add virtual segment types, zero and error. A large sparse device can be constructed as a writeable snapshot of a large zero device.
* Begin to separate out segment types.Alasdair Kergon2004-05-041-0/+1
|
* Use 64-bit file functions.Alasdair Kergon2004-04-161-0/+1
|
* Update copyright notices.Alasdair Kergon2004-03-301-2/+11
|
* Rename some files to avoid duplicate filenames in tree.Alasdair Kergon2004-03-261-1/+1
|