summaryrefslogtreecommitdiffstats
path: root/lib/config
Commit message (Collapse)AuthorAgeFilesLines
* config: add silent modeAlasdair G Kergon2012-08-251-0/+1
| | | | | | | | | | | | | | | | Accept -q as the short form of --quiet. Suppress non-essential standard output if -q is given twice. Treat log/silent in lvm.conf as equivalent to -qq. Review all log_print messages and change some to log_print_unless_silent. When silent, the following commands still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs. [Needs checking.] Non-essential messages are shifted from log level 4 to log level 5 for syslog and lvm2_log_fn purposes.
* cleanup: drop unneeded included header filesZdenek Kabelac2012-08-231-2/+0
| | | | | This headers were not resolving anything used for compiled .c files. Remove unused util.c file.
* config: fix one-node dumpconfig, add dm_config_write_one_nodePeter Rajnoha2012-07-201-1/+1
| | | | | | | | | | | | | | | | | | A regression introduced in 2.02.89 (11e520256b3005ed813ce83f8770aaab74edef3f) caused the lvm dumpconfig <node> to print out the node as well as its subsequent siblings. The information about "only_one" mode got lost. Before this patch (just an example node): # lvm dumpconfig global/use_lvmetad use_lvmetad=1 thin_check_executable="/usr/sbin/thin_check" thin_check_options="-q" (...all nodes to the end of the section) With this patch applied: # lvm dumpconfig global/use_lvmetad use_lvmetad=1
* Improve thin_check option passingZdenek Kabelac2012-03-141-1/+1
| | | | | | | Update a way we handle option passing - so we now support path and options with space inside. Fix dm name usage for thin pools with '-' in name. Use new lvm.conf option thin_check_options to pass in options as string array.
* Fit thin pool metadata into 128MBZdenek Kabelac2012-03-051-0/+1
| | | | | | | | | If the lvcreate may decide some automagical values for a user, try to keep the pool metadata size into 128MB range for optimal perfomance (as suggested by Joe). So if the pool metadata size and chunk_size were not specified, try to select such values they would fit into 128MB size.
* Add support for thin checkZdenek Kabelac2012-03-021-0/+1
| | | | | | | | Use libdm callback to execute thin_check before activation thin pool and after deactivation as well. Supporting thin_check_executable which may pass in extra options for the tool.
* Few more close and dev_close traceZdenek Kabelac2012-03-011-2/+4
| | | | Adding (void) where we cannot really report an error.
* Drop const modifier from fbZdenek Kabelac2012-02-231-2/+2
| | | | | It's not useful here to use const - since we need non-const value for unmap. Also remove now unneeded cast.
* pre-releaseAlasdair Kergon2012-01-261-1/+1
|
* Update verbose lvs to print metadata_percent infoZdenek Kabelac2012-01-251-1/+1
| | | | Update lvs -o fields in WHATS_NEW.
* Reorder fns in libdm-deptree.Alasdair Kergon2012-01-231-3/+0
| | | | Tweak dm_config interface and remove FIXMEs.
* Update lvdisplay to show more info about thin LVsZdenek Kabelac2012-01-201-0/+1
| | | | | | | Reformat name and path how the LV is represented with lvm1 compatible option, to switch to the old way - which had number of problem - i.e. many links do not exist - since for private devices we are not creating them. Add more info about thin pools and volumes.
* Thin add new display field for lvsZdenek Kabelac2012-01-191-3/+3
| | | | | | | New field Data% is able to display info about thin_pool, thin, snapshot and has generic meaning here. Simple Time/Host field are here to display host and time creation.
* Thin automatic policy based extensionZdenek Kabelac2011-12-211-0/+2
|
* Thin add dmeventd supportZdenek Kabelac2011-12-211-0/+1
| | | | | This is basic version with still few unresolved issue mainly in case, when the pool resize is failing.
* Make a cleaner split between config tree and config file functionality. MovePetr Rockai2011-12-182-25/+150
| | | | the latter out of libdm.
* Fix a compiler warning.Petr Rockai2011-12-121-1/+0
|
* Move dm_config_write out of libdm, back to lib/config, as config_write.Petr Rockai2011-12-112-0/+51
|
* Add policy based automated repair of RAID logical volumesJonathan Earl Brassow2011-12-061-0/+1
| | | | | | | | The RAID plug-in for dmeventd now calls 'lvconvert --repair' to address failures of devices in a RAID logical volume. The action taken can be either to "warn" or "allocate" a new device from any spares that may be available in the volume group. The action is designated by setting 'raid_fault_policy' in lvm.conf - the default being "warn".
* 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.
* Do not scan device if it is part of active multipath.Milan Broz2011-11-111-0/+1
| | | | | | | | | | | | | | | | | | | Add filter which tries to check if scanned device is part of active multipath. Firstly, only SCSI major number devices are handled in filter. Then it checks if device has exactly one holder (in sysfs) and if it is device-mapper device and DM-UUID is prefixed by "MPATH-". If so, this device is filtered out. The whole filter can be switched off by setting mpath_component_detection in lvm.conf. https://bugzilla.redhat.com/show_bug.cgi?id=597010 Signed-off-by: Milan Broz <mbroz@redhat.com>
* Thin add thin_pool_metadata_require_separate_pvsZdenek Kabelac2011-11-041-0/+1
| | | | Allow to set different policy for pool from mirrors.
* Thin supports poolmetadatasize settingZdenek Kabelac2011-11-041-0/+3
| | | | | Add option to set pool metadatasize. For passing size parameter reuse region_size.
* Add find_config_tree_str_allow_emptyZdenek Kabelac2011-10-282-0/+8
| | | | | Add function to allow read of empty strings as valid arguments. Add a warning message if string argument has ignored value.
* Reduce preallocated stack sizeZdenek Kabelac2011-10-111-1/+1
| | | | | | | | | | Go with just 64KiB for stack. Closer inspection should be made, whether we actually need to play with settings at all. Since default stack size is 8MB and gets mapped via page locking thus, it seems there is no big help with preallocation of stack to some value.
* Add missing log_error for alloc failureZdenek Kabelac2011-10-111-2/+4
|
* Add activation/retry_deactivation to lvm.conf to retry deactivation of an LV.Peter Rajnoha2011-09-221-0/+1
|
* Add a new 'thin_pool' output field to 'lvs.Alasdair Kergon2011-09-091-2/+2
| | | | | | | | | A gentle reminder that anyone relying on the output of reporting commands like lvs in scripts must use -o to guarantee they get the fields they expect. The default sequence of fields can change from release to release. Equally, the 'attr' fields can have new values introduced and/or characters appended to them.
* temp notes on dealing with cascadeAlasdair Kergon2011-09-021-0/+3
|
* Move cascade inside libdm etc.Alasdair Kergon2011-09-022-21/+33
| | | | | | 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.
* Comments, FIXMEs, name changes.Alasdair Kergon2011-09-011-6/+7
|
* Replace const usage of dm_config_find_node with more appropriate value-lookupPetr Rockai2011-08-311-3/+3
| | | | | | | | | | | | | functionality. A number of bugs (copied and pasted all over the code) should disappear: - most string lookup based on dm_config_find_node would segfault when encountering a non-zero integer (the intention there was to print an error message instead) - check for required sections in metadata would have been satisfied by values as well (i.e. not sections) - encountering a section in place of expected flag value would have segfaulted (due to assumed but unchecked cn->v != NULL)
* Move the core of the lib/config/config.c functionality into libdevmapper,Petr Rockai2011-08-302-1278/+69
| | | | | | | 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.
* Add detect_internal_vg_cache_corruption to lvm.confZdenek Kabelac2011-08-111-0/+1
| | | | | | | | | | | Add config option to enable crc checking of VG structures. Currently it's disabled by default. For the internal test-suite this check it is enabled. Note: In the case the internal error is detected, debug build with compile option DEBUG_ENFORCE_POOL_LOCKING helps to catch the source of the problem.
* Add dmeventd monitoring for RAID devices.Jonathan Earl Brassow2011-08-111-1/+2
|
* Add basic RAID segment type(s) support.Jonathan Earl Brassow2011-08-021-0/+1
| | | | | | | | | | | | | Implementation described in doc/lvm2-raid.txt. Basic support includes: - ability to create RAID 1/4/5/6 arrays - ability to delete RAID arrays - ability to display RAID arrays Notable missing features (not included in this patch): - ability to clean-up/repair failures - ability to convert RAID segment types - ability to monitor RAID segment types
* Change DEFAULT_UDEV_SYNC to 1 so udev_sync is used even without any config.Peter Rajnoha2011-08-021-1/+1
| | | | | | | | | | This should be set by default! Normally we have "activation/udev_sync = 1" in lvm.conf (example.conf.in). But if we use lvm2 without any config file (or without a definition within '--config' option) the DEFAULT_UDEV_SYNC is used instead. Together with verify_udev_operations=0 (when we rely on udev fully), this can cause races as the node could be missing when needed. (See also https://bugzilla.redhat.com/show_bug.cgi?id=723144)
* Compare also file size to detect changed config fileZdenek Kabelac2011-07-211-1/+3
| | | | | | | | | | Clvmd detects modifed config file before it takes lv_lock. If the config file is changed rapidly - the change was ignored within a seocnd ranged. This patch adds also compare of file size. So change like some flag for 0 to 1 would pass unnoticed - but it's quick fix for failing test suite. FIXME: Implement inotify solution.
* Make it possible to represent type-correct single-item arrays in config trees.Petr Rockai2011-07-191-2/+2
|
* Add an API to config.h for creating values in the config_tree mempool.Petr Rockai2011-07-192-0/+7
|
* Slightly refactor the config code to allow better reuse (no functional change).Petr Rockai2011-07-182-11/+52
|
* Add framework for validation of ioctls. Doesn't do any checks yet.Alasdair Kergon2011-07-011-0/+1
| | | | | | dmsetup --checks libdevmapper: dm_task_enable_checks() lvm.conf: activation/checks=1
* Move udev_only logic inside stacked node op code.Alasdair Kergon2011-06-271-1/+1
| | | | | | (We still need to treat add+readhead+del as a no-op.) Rename udev_fallback to verify_udev_operations. Rename --udevfallback to --verifyudev
* 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)
* testAlasdair Kergon2011-05-241-0/+1
|
* testAlasdair Kergon2011-05-241-1/+0
|
* testAlasdair Kergon2011-05-241-0/+1
|
* testAlasdair Kergon2011-05-241-1/+1
|
* Add and use dev_open_readonly and variations.Alasdair Kergon2011-05-241-1/+1
|
* Set pv_min_size to 2048KB to exclude floppy drives.Alasdair Kergon2011-04-281-0/+1
| | | | Previously was 512.