1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

15746 Commits

Author SHA1 Message Date
Marian Csontos
aa464aa2f6 Add BSD 2-Clause License
This is required by C++ test harness.
2018-07-27 17:09:46 +02:00
Marian Csontos
9cd05d1f1e test: Check flavour is used and exists 2018-07-26 15:01:50 +02:00
Marian Csontos
7f49d463d6 test: Remove excessive comma resulting in empty flavour 2018-07-26 14:56:08 +02:00
Heinz Mauelshagen
a004bb07f1 lvconvert: reject conversions on raid1 split trackchanges LVs
Prohibit, because the tracking can't continue and
further conversions may fail with bogus error messages.

Resolves: rhbz1579072
2018-07-26 02:05:54 +02:00
Heinz Mauelshagen
8b0729af0f lvconvert: reject conversions on raid1 split trackchanges SubLVs
Prohibit conversions of raid1 split trackchanges SubLVs
because they will fail to get merged back into the RaidLV.

Resolves: rhbz1579438
2018-07-26 02:05:49 +02:00
Heinz Mauelshagen
2f43f0393e test: new lvcreate-raid1-error-read.sh
Test for MD RAID kernel bug in read_balance() preventing
reads of failed sectors to get rescheduled to another leg.
2018-07-24 20:41:26 +02:00
Marian Csontos
706606627f spec: Fix conditional 2018-07-24 16:22:23 +02:00
Marian Csontos
5ff18f51b9 build: Update configure 2018-07-24 16:17:42 +02:00
Marian Csontos
279f3bfdc0 spec: Add vdo files 2018-07-24 15:41:30 +02:00
Marian Csontos
97506a7e2a build: Remove lvmetad leftovers 2018-07-24 15:02:32 +02:00
Marian Csontos
7709b70f97 spec: Remove unsupported config options 2018-07-24 15:00:12 +02:00
Marian Csontos
86c3940537 spec: Remove python bindings 2018-07-24 14:55:32 +02:00
Marian Csontos
bf4be80669 spec: Remove lvmetad 2018-07-24 14:50:52 +02:00
Heinz Mauelshagen
2214dc12c3 lvconvert: reject conversions of LVs under snapshot
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
2018-07-23 19:35:34 +02:00
David Teigland
778ce8d808 lvconvert: improve text about splitmirrors
in messages and man page.
2018-07-23 12:28:48 -05:00
David Teigland
8a66c81b9b lvconvert: restrict command matching for no option variant
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.
2018-07-23 11:12:38 -05:00
David Teigland
63ec42f428 tests: remove lvmetad tests 2018-07-11 11:27:54 -05:00
David Teigland
117160b27e Remove lvmetad
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.
2018-07-11 11:26:42 -05:00
David Teigland
edf3f86184 tests: fix mkdir pvs_online 2018-07-10 14:19:46 -05:00
David Teigland
06439a2562 tests: autoactivation tests for use without lvmetad
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.
2018-07-10 10:49:34 -05:00
David Teigland
db741e75a2 pvscan: autoactivate without lvmetad
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.
2018-07-09 16:11:24 -05:00
Zdenek Kabelac
c47655f231 tests: initial vdo tests
Basic functionality of lvcreate, lvchange.
2018-07-09 15:29:16 +02:00
Zdenek Kabelac
faa126882a dmeventd: lvm vdo support 2018-07-09 15:29:16 +02:00
Zdenek Kabelac
12213445b5 vgchange: vdo support
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.
2018-07-09 15:29:16 +02:00
Zdenek Kabelac
7b8aa4af57 lvconvert: support to convert lv into vdopool
Support:

lvconvert --type vdo-pool  vg/lv

lvconvert --vdopool  vg/lv   --virtualsize 10G
2018-07-09 15:29:16 +02:00
Zdenek Kabelac
6206bd0e79 lvchange: vdo support compression deduplication change
Add basic support for changing compression and deduplication state
of a VDO pool volume.

Allowing to access it also via top-level VDO volume.
2018-07-09 15:29:15 +02:00
Zdenek Kabelac
c58733ca15 lvcreate: vdo support
Supports basic:  'lvcreate --vdo -LXXXG -VYYYG vg/vdoname -n lvname'
Allows to create basic VDO pool volume and virtual VDO volume.
2018-07-09 15:29:12 +02:00
Zdenek Kabelac
6945bbdbc6 lvresize: vdo support
Unsupported ATM.

Wait till VDO kernel target starts to use updated resize sequence,
LOAD, SUSPEND, RESUME.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
96e9929f2f args: new options for vdo segment
Introduce new options usable with commands supporting VDO:
 --compression, --deduplication, --vdo, --vdopool
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
a821b88a43 toollib: support new command rules queries
Add: LV_vdo, LV_vdopool, LV_vdopooldata
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
44c99a8822 vdo: data percentage
Display percentage of used virtual size of vdo-pool volume.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
5807993bbf display: basic vdo segment lvdisplay and lvs support
Print some basic info about vdo segment.

'lvdisplay -m' ATM shows the most.
lvs  shows usage percentage.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
4f708e8709 dev_manager: add dev_manager_vdo_pool_status 2018-07-09 15:28:35 +02:00
Zdenek Kabelac
493ffe7a0f lv_manip: layout and role support for vdo segment 2018-07-09 15:28:35 +02:00
Zdenek Kabelac
00990ed53e check_lv_segment: internal vdo segment validation
Check if settings for vdo segment are correct.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
0dafd159a8 vdo_manip: parsing status of VDO device 2018-07-09 15:28:35 +02:00
Zdenek Kabelac
aa63dfbe39 vdo: support functions to map enums to string names
Translate VDO enums to printable strings.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
aff69ecf39 vdo: component activation of VDO data LV
Allow component activation of VDO data LV.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
4b7a57c9ed vdo: with created names use vpool
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...
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
a8f84f7801 vdo: introduce segment types and manip functions
Core functionality introducing lvm VDO support.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
c66a960149 build: install VDO small allocation profile
Profile shows all VDO configurables.

Usable with: lvcreate --metadataprofile vdo-small ...
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
d8a41f22e9 device_mapper: basic support for vdo dm target 2018-07-09 15:28:35 +02:00
Zdenek Kabelac
0d9a4c6989 lib: new vdo segment configurable options
Configurable for vdo segment with their default values.
Also specify their ranges with minimal and maximal values.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
4a90b0c4c9 build: add vdo configuration option --with-vdo=
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).
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
2e05f6018b activate: kvdo modprobe workaround
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.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
80e6097ea6 dmeventd: base vdo plugin
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%.
2018-07-09 15:28:32 +02:00
Zdenek Kabelac
b98846998b build: not yet merged
status.c will get linked with VDO support.
2018-07-09 10:37:39 +02:00
Zdenek Kabelac
5f3eff8eae tests: update vdo unit test to dm prefix
Update prefix and reindent.
2018-07-09 10:30:34 +02:00
Zdenek Kabelac
9b6b4f14d8 device_mapper: convert vdo to use dm_ prefix
Keep using DM_/dm_ prefixes for device_mapper code.
2018-07-09 10:30:34 +02:00
Zdenek Kabelac
4a64bb9573 build: unit test Makefile update
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.
2018-07-09 10:30:34 +02:00