summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* lvconvert: use process_each_lvdev-dct-lvconvert-process-each-3David Teigland2016-05-259-78/+76
| | | | | | In the same way that process_each_vg() can be passed a single VG name to process, also allow process_each_lv() to be passed a single VG name and LV name to process.
* raid: Revert _lv_extend_layered_lv non-raid0 area_multiple.Alasdair G Kergon2016-05-241-1/+2
|
* refactor: split _report fn further into init and config partPeter Rajnoha2016-05-241-56/+67
|
* metadata: Tidy merge.cAlasdair G Kergon2016-05-241-3/+5
|
* raid10: Fix new use of area multiple calc.Alasdair G Kergon2016-05-241-1/+1
|
* raid0: Standardise meta_areas checks before access.Alasdair G Kergon2016-05-239-19/+21
|
* test: lvmetad-disabledDavid Teigland2016-05-231-1/+1
|
* test: lvmetad-pvscan-filterDavid Teigland2016-05-231-6/+24
| | | | update for pvscan changes
* pvscan: use process_each_vg for autoactivateDavid Teigland2016-05-2311-284/+334
| | | | | | | | | | | | | | | | | | | | | | | This refactors the code for autoactivation. Previously, as each PV was found, it would be sent to lvmetad, and the VG would be autoactivated using a non-standard VG processing function (the "activation_handler") called via a function pointer from within the lvmetad notification path. Now, any scanning that the command needs to do (scanning only the named device args, or scanning all devices when there are no args), is done first, before any activation is attempted. During the scans, the VG names are saved. After scanning is complete, process_each_vg is used to do autoactivation of the saved VG names. This makes pvscan activation much more similar to activation done with vgchange or lvchange. The separate autoactivate phase also means that if lvmetad is disabled (either before or during the scan), the command can continue with the activation step by simply not using lvmetad and reverting to disk scanning to do the activation.
* toollib: add vg name list arg to process_each_vgDavid Teigland2016-05-2318-25/+37
|
* raid0: Add raid0 segment type.Alasdair G Kergon2016-05-2310-70/+168
| | | | | This remains experimental and quite restrictive so should only be used for testing at this stage. (E.g. lvreduce is not supported.)
* tools: improve error message about VG name and selectDavid Teigland2016-05-191-1/+1
|
* tests: test change of cache modeZdenek Kabelac2016-05-191-0/+71
|
* debug: use display_lvnameZdenek Kabelac2016-05-192-1/+6
| | | | Add some tracing message
* lvchange: allow change of cache modeZdenek Kabelac2016-05-1916-127/+227
| | | | | | | | Add support for active cache LV. Handle --cachemode args validation during command line processing. Rework some lvm2 internal to use lvm2 defined CACHE_MODE enums indepently on libdm defines and use enum around the code instead of passing and comparing strings.
* libdm: trace missing settingsZdenek Kabelac2016-05-192-3/+13
| | | | These settings have been missed in very verbose log.
* libdm: cache status reports passthrough cache modeZdenek Kabelac2016-05-192-0/+3
| | | | Report passthrough mode instead of 'Unknown feature'.
* WHATS_NEW: include recent changesDavid Teigland2016-05-181-0/+6
|
* lvm2_activation_generator: don't create full context for liblvm2appDavid Teigland2016-05-181-9/+3
| | | | | | | | | | Don't use lvm_init() to create a full command context, which does a lot of command setup (like connecting to daemons), which is unnecessary for simply reading a value from lvm.conf. Passing a NULL context arg to the lvm_config_ function is now allowed, in which case lvm.conf is read without doing lvm command setup.
* liblvm: allow config settings to be read without full lvm cmdDavid Teigland2016-05-183-3/+71
| | | | | | | | | | | A program may be using liblvm2app for simply checking a config setting in lvm.conf. In this case, a full lvm context is not needed, only cmd->cft (which are the config settings read from lvm.conf). lvm_config_find_bool() can now be passed a NULL lvm context in which case it will only create cmd->cft, check the config setting asked for, and destroy the cmd.
* pvremove: allow clearing a duplicate PVDavid Teigland2016-05-163-2/+58
| | | | | Add a special case to allow modifying a duplicate PV to erase it with pvremove -ff.
* lvmetad: remove old thread lockingDavid Teigland2016-05-161-211/+3
| | | | | The old thread locking is very fine grained and complex, and appears to have no concurrency advantage.
* lvmetad: add request level thread lockingDavid Teigland2016-05-161-28/+75
| | | | | Use an rwlock for requests that read/write cache state. Use a mutex for requests that read/write global info.
* python: move lvm_initDavid Teigland2016-05-161-11/+6
| | | | | | | | | | | | Only call lvm_init() when it's needed so that simply loading the lvm python code in another program doesn't make that program do lvm initialization. The version call doesn't need a handle. The garbage collection can just do lvm_quit to destroy the command. The next call that needs lvm_init will do it first.
* post-releaseAlasdair G Kergon2016-05-144-2/+8
|
* pre-releasev2_02_154Alasdair G Kergon2016-05-144-6/+8
|
* lib: fix init error handlingDavid Teigland2016-05-122-4/+1
| | | | | | | | | | | | | | When setting up a toolcontext, the lib init function was detecting an error when there was none, and then it was returning an incompletely initialized cmd struct instead of NULL. The effect was that the lib would try to use the uninitialized cmd struct and segfault. This would happen if a non-fatal error occurred during cmd setup, e.g. user permission failed on lvmetad socket, causing cmd to fall back to scanning and not use lvmetad. The only real error condition is when create_toolcontext returns NULL. If cmd is returned, the lib can use it.
* lvmetad: Fix client error when socket access fails.Alasdair G Kergon2016-05-121-1/+1
|
* libdm: Show lib vsn even if driver vsn unavailable.Alasdair G Kergon2016-05-122-1/+2
|
* device: Retry open without O_NOATIME if it fails.Alasdair G Kergon2016-05-123-1/+14
|
* test: process-each-duplicate-pvsDavid Teigland2016-05-111-0/+5
| | | | | skip on RHEL5 where DEV_USED_FOR_LV doesn't work because it depends on a newer bit of sysfs.
* refactor: separate original _report fn into _report and _do_report fnPeter Rajnoha2016-05-101-188/+215
| | | | | | | | | | The _report fn is getting big - separate it in two: - _report fn to get all the options and arguments - _do_report fn for reporting itself Also, place all the variables/arguments in one structure for easier handling of the variables around.
* post-releaseAlasdair G Kergon2016-05-074-2/+8
|
* pre-releasev2_02_153Alasdair G Kergon2016-05-075-7/+17
|
* activation: activation check is mandatoryZdenek Kabelac2016-05-061-3/+4
| | | | | Make missing activation() check before calling target_persent an INTERNAL_ERROR.
* cleanup: drop tracingZdenek Kabelac2016-05-061-1/+1
| | | | When activation is disabled, avoid tracing it in cache target.
* segtype: check for activation2Zdenek Kabelac2016-05-061-0/+3
| | | | | Previous patch 8857b227645e97b7cb52ae8d007e87e07db58b4e missed to check for activation for raid target.
* WHATS_NEW: duplicate PVsDavid Teigland2016-05-061-0/+6
|
* metadata: move warning message about repairing VGDavid Teigland2016-05-061-3/+2
| | | | | | Move the message to just before the repair is going to happen to avoid printing the message in cases where repair is skipped.
* test: vgcfgbackup-lvm1David Teigland2016-05-061-0/+36
| | | | The lvm1 part of vgcfgbackup-usage.
* test: vgcfgbackup-usageDavid Teigland2016-05-061-14/+0
| | | | Split the lvm1 part into a separate test.
* test: vgsplit-usageDavid Teigland2016-05-061-1/+14
| | | | | | Restart clvmd between testing each mdatype to avoid a problem with dev state being kept from one test to the next.
* test: lvmetad-ambiguousDavid Teigland2016-05-061-5/+5
| | | | update for duplicate changes
* test: pv-duplicate-uuidDavid Teigland2016-05-061-6/+28
| | | | update for duplicate changes
* test: process-each-duplicate-pvsDavid Teigland2016-05-061-114/+476
| | | | Update for new duplicate processing.
* lvmetad: add duplicate resolution adviceDavid Teigland2016-05-061-0/+7
|
* lvmetad: disable if device scan failsDavid Teigland2016-05-063-15/+23
| | | | | | | | If a command begins repopulating the lvmetad cache, and fails part way through, it should set the disabled state in lvmetad so other commands don't use bad data. If a subsequent scan succeeds, the disabled state is cleared.
* lvmcache: use active LVs and device sizes to choose between duplicatesDavid Teigland2016-05-061-14/+76
| | | | | | | | If duplicate devices exist for a PV, and one device's size matches the PV size, but the other doesn't, then prefer the matching device. If one device is used by an active LV, prefer that device.
* pvs: new attr and field for unchosen duplicate deviceDavid Teigland2016-05-068-3/+39
| | | | | | | | | | | | When there are duplicate devices for a PV, one device is preferred and chosen to exist in the VG. The other devices are not used by lvm, but are displayed by pvs with a new PV attr "d", indicating that they are unchosen duplicate PVs. The "duplicate" reporting field is set to "duplicate" when the PV is an unchosen duplicate, and that field is blank for the chosen PV.
* lvmcache: process duplicate PVs directlyDavid Teigland2016-05-066-124/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, duplicate PVs were processed as a side effect of processing the "chosen" PV in lvmcache. The duplicate PV would be hacked into lvmcache temporarily in place of the chosen PV. In the old way, we had to always process the "chosen" PV device, even if a duplicate of it was named on the command line. This meant we were processing a different device than was asked for. This could be worked around by naming multiple duplicate devs on the command line in which case they were swapped in and out of lvmcache for processing. Now, the duplicate devs are processed directly in their own processing loop. This means we can remove the old hacks related to processing dups as a side effect of processing the chosen device. We can now simply process the device that was named on the command line. When the same PVID exists on two or more devices, one device is preferred and used in the VG, and the others are duplicates and are not used in the VG. The preferred device exists in lvmcache as usual. The duplicates exist in a specical list of unused duplicate devices. The duplicate devs have the "d" attribute and the "duplicate" reporting field displays "duplicate" for them. 'pvs' warns about duplicates, but the formal output only includes the single preferred PV. 'pvs -a' has the same warnings, and the duplicate devs are included in the output. 'pvs <path>' has the same warnings, and displays the named device, whether it is preferred or a duplicate.