summaryrefslogtreecommitdiffstats
path: root/lib/commands/toolcontext.h
Commit message (Collapse)AuthorAgeFilesLines
* Only use built-in stack size in clvmd - ignore lvm.conf.Alasdair Kergon2011-12-081-1/+3
|
* Add activation/use_linear_target enabled by default. (prajnoha)Alasdair Kergon2011-11-281-0/+1
| | | | | | | | | LVM metadata knows only of striped segments - not linear ones. The activation code detects segments with a single stripe and switches them to use the linear target. If the new lvm.conf setting is set to 0 (e.g. in a test script), this 'optimisation' is turned off.
* Move cascade inside libdm etc.Alasdair Kergon2011-09-021-1/+0
| | | | | | Makes dumpconfig whole-section output wrong in a different way from before, but we should be able to merge cft_cmdline properly into cmd->cft now and remove cascade.
* Move the core of the lib/config/config.c functionality into libdevmapper,Petr Rockai2011-08-301-3/+8
| | | | | | | leaving behind the LVM-specific parts of the code (convenience wrappers that handle `struct device` and `struct cmd_context`, basically). A number of functions have been renamed (in addition to getting a dm_ prefix) -- namely, all of the config interface now has a dm_config_ prefix.
* Disable udev fallback by default and add activation/udev_fallback to lvm.conf.Peter Rajnoha2011-06-171-0/+1
| | | | | | | | | | | | | | | | | | | We've used udev fallback code till now to check whether udev created/removed the entries in /dev correctly and if not, a repair was done (giving a warning messagea about that). This patch adds a possibility to enable this additional check and subsequent fallback only when required (debugging purposes mostly) and trust udev completely. So let's disable the fallback code by default and add a new configuration option "activation/udev_fallback". (The original code for creating the nodes will still be used in case the device directory that is set in lvm.conf differs from the one that udev uses and also when activation/udev_rules is set to 0 - otherwise we would end up with no nodes/symlinks at all)
* When glibc needs buffers for line buffering of input and output buffers, itPetr Rockai2011-05-071-1/+3
| | | | | | | | | | | | allocates these buffers in such way it adds memory page for each such buffer and size of unlock memory check will mismatch by 1 or 2 pages. This happens when we print or read lines without '\n' so these buffers are used. To avoid this extra allocation, use setvbuf to set these bufffers ahead. Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com> Reviewed-by: Milan Broz <mbroz@redhat.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Fix scanning of VGs without in-PV mdas.Alasdair Kergon2010-12-101-0/+2
| | | | | | | | | | | | | | Set cmd->independent_metadata_areas if metadata/dirs or disk_areas in use. - Identify and record this state. Don't skip full scan when independent mdas are present even if memlock is set. - Clusters and OOM aren't supported, so no problem doing the proper scans. Avoid revalidating the label cache immediately after scanning. - A simple optimisation. Support scanning for a single VG in independent mdas. - Not used by the fix but I left it in anyway as later patches might use it.
* Support repetition of --addtag and --deltag arguments.Alasdair Kergon2010-11-111-0/+3
| | | | | 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-0/+1
|
* Recognise and give preference to md device partitions (blkext major).Peter Rajnoha2010-08-111-1/+1
| | | | | | | We can already detect MD devices internally. But when using MD partitions, these have "block extended major" (blkext) assigned (259). Blkext major is also used in general, so we need to check whether the original device is an MD device actually.
* Remove no-longer-used arg_ptr_value.Alasdair Kergon2010-04-291-1/+3
| | | | Fix -M and --type to use strings not pointers that change on config refresh.
* Add activation/udev_rules config option in lvm.conf.Peter Rajnoha2010-01-071-0/+1
| | | | Add dm_tree_add_dev_with_udev_flags to provide wider support for udev flags.
* Refresh device filters before full device rescan in lvmcache.Milan Broz2009-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | The sysfs filter initialise hash of available devices using scan of /sys/block. We need to refresh even this hash when performing full scan otherwise the newly appeared device could be rejected, because there is no entry in sysfs filter. This easily could happen when attaching new device to cluster node. (Only force refresh of context in clvmd -R works here now). Unfortunately consequences of this are much worse, missing device part on that node is replaced with missing segment (even when no partial arg is selected) and this directly lead to data corruption. See https://bugzilla.redhat.com/show_bug.cgi?id=538515 Simply fix it by refreshing device filters in lvmcache before performing the full device scan.
* Handle metadata with unknown segment types more gracefully.Petr Rockai2009-10-161-0/+1
|
* Add global/si_unit_consistency to enable cleaned-up use of units in output.Alasdair Kergon2009-09-281-0/+1
| | | | | | Add configure --enable-units-compat to set si_unit_consistency off by default. Use standard output units for 'PE Size' and 'Stripe size' in pv/lvdisplay.
* Add activation/udev_sync to lvm.conf.Alasdair Kergon2009-08-041-0/+1
|
* Make cmd->cmd_line const.Alasdair Kergon2009-07-131-1/+1
|
* Add system_dir parameter to create_toolcontext() and call it system_dirAlasdair Kergon2009-02-221-3/+8
| | | | everywhere for consistency.
* Create global is_static() to eliminate from the library init function.Dave Wysochanski2008-12-181-2/+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?
* Remove struct arg * from struct cmd_context and create_toolcontext().Dave Wysochanski2008-12-171-2/+1
| | | | | | | | | | | This allows us to remove one argument from create_toolcontext() and moves it closer to a generic library init function. In the arg_*() functions, we just use _the_args() directly. For now we leave the first parameter to these arg_*() functions (struct cmd_context *) because of the number of files involved in removing the parameter.
* Make _init_rand() thread safe - use rand_r() instead of rand().Dave Wysochanski2008-12-071-0/+1
| | | | Use good entropy for seed value if possible.
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-4/+4
|
* rename varAlasdair Kergon2008-09-191-1/+1
|
* Improve the way VGs with PVs missing are handled so manual interventionAlasdair Kergon2008-09-191-2/+5
| | | | is required in fewer circumstances. (mornfall)
* Store sysfs location in struct cmd_context.Alasdair Kergon2008-09-191-0/+1
|
* Fix vgreduce to use vg_split_mdas to check sufficient mdas remain.Alasdair Kergon2008-04-081-0/+1
| | | | | Add (empty) orphan VGs to lvmcache during initialisation. Fix orphan VG name used for format_pool.
* Add per-command flags to control which commands use the VG metadata cache.Alasdair Kergon2008-04-021-0/+1
|
* Enhance the management of readahead settings.Alasdair Kergon2007-11-091-0/+1
|
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Fix refresh_toolcontext() always to wipe persistent device filter cache.Alasdair Kergon2007-01-231-1/+2
| | | | Add is_long_lived to toolcontext.
* Move CMDLIB code into separate file and record whether static build.Alasdair Kergon2006-08-181-1/+2
|
* Fix lvcreate corelog validation.Alasdair Kergon2006-05-161-0/+1
| | | | | | | | | Add --config for overriding most config file settings from cmdline. Quote arguments when printing command line. Remove linefeed from 'initialising logging' message. Add 'Completed' debug message. Don't attempt library exit after reloading config files. Always compile with libdevmapper, even if device-mapper is disabled.
* Use hash, bitset, malloc, pool from libdevmapper.Alasdair Kergon2005-10-161-3/+2
|
* Move archiver code from tools into library.Alasdair Kergon2005-05-171-0/+5
|
* Alignment tidying.Alasdair Kergon2005-04-061-7/+5
|
* Begin to separate out segment types.Alasdair Kergon2004-05-041-0/+1
|
* Support tagged config files.Alasdair Kergon2004-05-041-2/+6
|
* Option for auto-fallback to LVM1 tools if running 2.4 without device-mapper.Alasdair Kergon2004-04-081-0/+1
|
* Update copyright notices.Alasdair Kergon2004-03-301-2/+10
|
* rename config file vars & always use / as separatorAlasdair Kergon2004-03-081-1/+1
|
* host tagsAlasdair Kergon2004-03-081-0/+4
|
* move hostname into globalAlasdair Kergon2004-03-081-2/+3
|
* Add argvAlasdair Kergon2003-05-061-0/+1
|
* Default stripesize 64k & config file setting for it;Alasdair Kergon2002-12-191-1/+1
| | | | | | Clear many compiler warnings (i386) & associated bugs - hopefully without introducing too many new bugs:-) (Same exercise required for other archs.) Default compilation has optimisation - or else use ./configure --enable-debug
* New column-based reporting tools: lvs, pvs & vgs.Alasdair Kergon2002-12-121-0/+3
|
* Refactoring.Alasdair Kergon2002-11-181-8/+40
|
* Merge with text format branch.Alasdair Kergon2002-04-241-1/+5
| | | | | | | | | | | | | | | | | | | Lots of changes/very little testing so far => there'll be bugs! Use 'vgcreate -M text' to create a volume group with its metadata stored in text files. Text format metadata changes should be reasonably atomic, with a (basic) automatic recovery mechanism if the system crashes while a change is in progress. Add a metadata section to lvm.conf to specify multiple directories if you want (recommended) to keep multiple copies of the metadata (eg on different filesystems). e.g. metadata { dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"] } Plenty of refinements still in the pipeline.
* Preparation for an LVM2 liblvm - pass cmd_context into each tool andAlasdair Kergon2002-02-111-0/+33
link some globals that the tools need into that structure.