summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* report: cachevol field for writecache LVsdev-dct-writecache-17David Teigland2018-07-246-1/+72
|
* Add dm-writecache supportDavid Teigland2018-07-2422-4/+687
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use dm-writecache to attach a cache volume (CV) to an LV. The LV type becomes "writecache" (--type writecache can be optionally specified when attaching.) lvconvert --cachevol-attach CV LV lvconvert --cachevol-detach CV LV The cachevol (CV) is a special LV that was created on cache devices, e.g. lvcreate --cachevol -L <size> -n <name> VG Cache devices are special PVs that are added to the VG to use for cachevols, e.g. vgextend --cachedev VG PV Example: Add persistent memory to a VG as a cache device: vgextend --cachedev vg /dev/pmem0 Create a cache volume from pmem0: lvcreate --cachevol -L1G -n cvol0 vg Create a second cache volume from pmem0: lvcreate --cachevol -L1G -n cvol1 vg Attach the cache volumes to LVs: lvconvert --cachevol-attach cvol0 vg/lv0 lvconvert --cachevol-attach cvol1 vg/lv1
* Add cache volumesDavid Teigland2018-07-2411-5/+218
| | | | | | | | | | | | | | | | A cache volume (CV) is a special LV that can be attached to a standard LV to do caching. A cache volume is allocated from cache devices (CDs) which are special PVs in the VG that are used for caching. To create a cache volume, add the --cachevol option to the lvcreate command. lvcreate will allocate extents for the CV from cache devs that have been added to the VG. lvcreate --cachevol -n <name> -L <size> VG [CD...]
* Add cache devicesDavid Teigland2018-07-2424-72/+545
| | | | | | | | | | | | | | | | | | | | | | | | | | A cache device is a special PV that is added to a VG to be used for caching, and not for allocating standard LVs. A cache device (CD) is used to create a cache volume. A cache volume (CV) is a special LV that can be attached to a standard LV to do caching. Terminology: PV used for caching = cache device = cachedev = CD LV used for caching = cache volume = cachevol = CV PV metadata for a cachedev includes the CACHEDEV flag. LV metadata for a cachevol includes the CACHEVOL flag. A cachedev is added to a VG with: vgextend --cachedev VG PV The --cachedev option tells lvm that the PV should be added to the VG as a cache device, not a standard PV. (cache volumes are added by the following commit)
* test: new lvcreate-raid1-error-read.shHeinz Mauelshagen2018-07-241-0/+31
| | | | | Test for MD RAID kernel bug in read_balance() preventing reads of failed sectors to get rescheduled to another leg.
* spec: Fix conditionalMarian Csontos2018-07-241-2/+2
|
* build: Update configureMarian Csontos2018-07-241-77/+3
|
* spec: Add vdo filesMarian Csontos2018-07-242-0/+9
|
* build: Remove lvmetad leftoversMarian Csontos2018-07-241-6/+2
|
* spec: Remove unsupported config optionsMarian Csontos2018-07-242-4/+0
|
* spec: Remove python bindingsMarian Csontos2018-07-242-32/+3
|
* spec: Remove lvmetadMarian Csontos2018-07-243-28/+0
|
* lvconvert: reject conversions of LVs under snapshotHeinz Mauelshagen2018-07-231-0/+6
| | | | | | | | | | | Conversions of LVs under snapshot to thinpool or cachepool correctly fail but leave them inactive and provide cryptic error messages like 'Internal error: #LVs (10) != #visible LVs (2) + #snapshots (1) + #internal LVs (5) in VG VG'. Reject and provide better error message. Resolves: rhbz1514146
* lvconvert: improve text about splitmirrorsDavid Teigland2018-07-233-8/+12
| | | | in messages and man page.
* lvconvert: restrict command matching for no option variantDavid Teigland2018-07-233-1/+16
| | | | | | | | | | | | The 'lvconvert LV' command def has caused multiple problems for command matching because it matches the required options of any lvconvert command. Any lvconvert with incorrect options ends up matching 'lvconvert LV', which then produces an error about incorrect options being used for 'lvconvert LV'. This prevents suggestions from nearest-command partial command matches. Add a special case for 'lvconvert LV' so that it won't be used as a partial match for a command that has options specified.
* tests: remove lvmetad testsDavid Teigland2018-07-1116-796/+8
|
* Remove lvmetadDavid Teigland2018-07-1155-8497/+102
| | | | | | | | | | | | | Native disk scanning is now both reduced and async/parallel, which makes it comparable in performance (and often faster) when compared to lvm using lvmetad. Autoactivation now uses local temp files to record online PVs, and no longer requires lvmetad. There should be no apparent command-level change in behavior.
* tests: fix mkdir pvs_onlineDavid Teigland2018-07-102-1/+3
|
* tests: autoactivation tests for use without lvmetadDavid Teigland2018-07-104-27/+150
| | | | | | Adjust a few lvmetad pvscan/autoactivation tests to be used without lvmetad, and add a test to cover some cases that have not been tested before.
* pvscan: autoactivate without lvmetadDavid Teigland2018-07-093-10/+659
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When lvmetad is not used, use temporary files to record which PVs have appeared. Use these temp files to determine when a VG is complete, to trigger autoactivation. This change allows us to remove lvmetad while keeping the same autoactivation behavior that lvmetad provides. The temp files are created in /run/lvm/pvs_online/ and are named for the PVID of the PV. The files contain the major:minor of the device the PV was read from. e.g. if VG foo has dev1 and dev2, then: . pvscan --cache -aay dev1 reads vg metadata from dev1 creates /run/lvm/pvs_online/<pvid-of-dev1> checks if all vg->pvs are online: no . pvscan --cache -aay dev2 reads vg metadata from dev2 creates /run/lvm/pvs_online/<pvid-of-dev2> checks if all vg->pvs are online: yes autoactivates vg A 'pvscan --cache dev' (without -aay) still records that dev is online. A 'pvscan --cache --major X --minor Y' after a device is gone will remove the temp file for it. A 'pvscan --cache [-aay]' (no devs) resets the state of temp files by removing them all, then scanning all devs and creating temp files for PVs that are found. If no online files exist, the first pvscan --cache scans all devs and creates temp files for any PVs found. The scope of the temp files is only pvscan, and they are only used for pvscan-based autoactivation. No other commands are concerned with or aware of these temp files. When lvm creates or removes PVs, no attempt is made to update the temp files.
* tests: initial vdo testsZdenek Kabelac2018-07-095-0/+355
| | | | Basic functionality of lvcreate, lvchange.
* dmeventd: lvm vdo supportZdenek Kabelac2018-07-095-0/+134
|
* vgchange: vdo supportZdenek Kabelac2018-07-092-1/+11
| | | | | | | Support vgchange usage with VDO segtype. Also changing extent size need small update for vdo virtual extent. TODO: API needs enhancements so it's not about adding ifs() everywhere.
* lvconvert: support to convert lv into vdopoolZdenek Kabelac2018-07-094-0/+137
| | | | | | | | Support: lvconvert --type vdo-pool vg/lv lvconvert --vdopool vg/lv --virtualsize 10G
* lvchange: vdo support compression deduplication changeZdenek Kabelac2018-07-092-1/+73
| | | | | | | Add basic support for changing compression and deduplication state of a VDO pool volume. Allowing to access it also via top-level VDO volume.
* lvcreate: vdo supportZdenek Kabelac2018-07-095-6/+153
| | | | | Supports basic: 'lvcreate --vdo -LXXXG -VYYYG vg/vdoname -n lvname' Allows to create basic VDO pool volume and virtual VDO volume.
* lvresize: vdo supportZdenek Kabelac2018-07-091-0/+6
| | | | | | | Unsupported ATM. Wait till VDO kernel target starts to use updated resize sequence, LOAD, SUSPEND, RESUME.
* args: new options for vdo segmentZdenek Kabelac2018-07-091-0/+17
| | | | | Introduce new options usable with commands supporting VDO: --compression, --deduplication, --vdo, --vdopool
* toollib: support new command rules queriesZdenek Kabelac2018-07-092-0/+15
| | | | Add: LV_vdo, LV_vdopool, LV_vdopooldata
* vdo: data percentageZdenek Kabelac2018-07-094-1/+24
| | | | Display percentage of used virtual size of vdo-pool volume.
* display: basic vdo segment lvdisplay and lvs supportZdenek Kabelac2018-07-093-5/+85
| | | | | | | Print some basic info about vdo segment. 'lvdisplay -m' ATM shows the most. lvs shows usage percentage.
* dev_manager: add dev_manager_vdo_pool_statusZdenek Kabelac2018-07-094-0/+106
|
* lv_manip: layout and role support for vdo segmentZdenek Kabelac2018-07-091-0/+45
|
* check_lv_segment: internal vdo segment validationZdenek Kabelac2018-07-091-0/+23
| | | | Check if settings for vdo segment are correct.
* vdo_manip: parsing status of VDO deviceZdenek Kabelac2018-07-094-0/+99
|
* vdo: support functions to map enums to string namesZdenek Kabelac2018-07-092-0/+53
| | | | Translate VDO enums to printable strings.
* vdo: component activation of VDO data LVZdenek Kabelac2018-07-092-1/+3
| | | | Allow component activation of VDO data LV.
* vdo: with created names use vpoolZdenek Kabelac2018-07-091-2/+2
| | | | | | | | When user create vdo-pool - use different automatic name. So unlike with traditional LVs using lvol0, lvol1 use vpool0, vpool1... TODO: apply similar for thin-pool & cache-pool...
* vdo: introduce segment types and manip functionsZdenek Kabelac2018-07-0912-9/+903
| | | | Core functionality introducing lvm VDO support.
* build: install VDO small allocation profileZdenek Kabelac2018-07-092-1/+27
| | | | | | Profile shows all VDO configurables. Usable with: lvcreate --metadataprofile vdo-small ...
* device_mapper: basic support for vdo dm targetZdenek Kabelac2018-07-095-1/+335
|
* lib: new vdo segment configurable optionsZdenek Kabelac2018-07-094-1/+361
| | | | | Configurable for vdo segment with their default values. Also specify their ranges with minimal and maximal values.
* build: add vdo configuration option --with-vdo=Zdenek Kabelac2018-07-095-0/+236
| | | | | | | | | | | | | Checks whether VDO support is enabled. Detects presence of 'vdoformat' tool which is required for to format VDO pool. ATM build of VDO is NOT automatically enabled (None is default). To enable build of LVM with VDO support use: configure --with-vdo=internal TODO: Maybe future version may switch to link some small VDO library for formating (would require linking and package dependency).
* activate: kvdo modprobe workaroundZdenek Kabelac2018-07-092-0/+7
| | | | | | | To support autoloading of VDO dm target driver loading of 'kvdo' kernel module is needed - ATM it's not using 'dm-vdo' name. So to support this strange name - add temporarily solution to autoload kvdo kernel module in this case.
* dmeventd: base vdo pluginZdenek Kabelac2018-07-098-7/+453
| | | | | | | | | | | Introduce VDO plugin for monitoring VDO devices. This plugin can be used also by other users, as plugin checks for UUID prefix 'LVM-' and run lvm actions only on those devices. Non LVM- device are only monitored and log warnings when usage threshold reaches 80%.
* build: not yet mergedZdenek Kabelac2018-07-091-0/+2
| | | | status.c will get linked with VDO support.
* tests: update vdo unit test to dm prefixZdenek Kabelac2018-07-091-132/+132
| | | | Update prefix and reindent.
* device_mapper: convert vdo to use dm_ prefixZdenek Kabelac2018-07-092-48/+49
| | | | Keep using DM_/dm_ prefixes for device_mapper code.
* build: unit test Makefile updateZdenek Kabelac2018-07-091-4/+2
| | | | | | | | | Update makefile to link with more libs since now whole liblvm-internal.a is linked-in and this library has futher dependencies. Avoid including deps for run-unit-test. Drop linking separate status.c as it's already linked via internal libs.
* vdo: fix parsing vdo statusZdenek Kabelac2018-07-091-2/+2
| | | | | Recent updates relay on zerod status structure memory (device ptr is NULL) and also dm_strncpy need to count with '\0'.