]> sourceware.org Git - lvm2.git/log
lvm2.git
5 years agoconfigure: check for pselect
Zdenek Kabelac [Wed, 10 Apr 2019 11:22:43 +0000 (13:22 +0200)]
configure: check for pselect

5 years agopvscan: handle case of scanning PV without metadata last
David Teigland [Mon, 15 Apr 2019 16:27:49 +0000 (11:27 -0500)]
pvscan: handle case of scanning PV without metadata last

Handle the case where pvscan --cache -aay (with no dev args)
gets to the final PV, completing the VG, but that final PV does not
have VG metadata.  In this case, we need to use VG metadata from a
previously scanned PV in the same VG, which we saved for this
possibility.  Using this saved metadata, we can find which VG
this PVID belongs to, and then check if that VG is now complete,
and if so add the VG name to the list of complete VGs to be
autoactivated.

5 years agotests: disable unworking pvscan case
David Teigland [Fri, 12 Apr 2019 20:40:38 +0000 (15:40 -0500)]
tests: disable unworking pvscan case

and add corresponding fixme in the code

5 years agohints: fix non-empty hints list when not using hints
David Teigland [Thu, 11 Apr 2019 16:49:18 +0000 (11:49 -0500)]
hints: fix non-empty hints list when not using hints

When hints are invalid and ignored, the list of hints
could be non-empty (from additions before an invalid
hint was found).  This confused the calling code which
was checking for an empty list to see if hints were used.
Ensure the list is empty when hints are not used.

5 years agohints: fix case of error getting device size
David Teigland [Thu, 11 Apr 2019 15:32:28 +0000 (10:32 -0500)]
hints: fix case of error getting device size

When checking hints, if there's an error getting
the device size, that should be equivalent to
seeing zero size.

5 years agosystemd: put back DefaultDependencies=no for lvmpolld socket unit
Peter Rajnoha [Thu, 11 Apr 2019 10:18:02 +0000 (12:18 +0200)]
systemd: put back DefaultDependencies=no for lvmpolld socket unit

Previous commit 0cab341e1d0e8f9089d3c62d3adbec24dfd5e124 removed this
by mistake - we have to keep the DefaultDependencies=no - the
sockets.target is after sysinit.target.

5 years agosystemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering
Peter Rajnoha [Tue, 9 Apr 2019 10:10:17 +0000 (12:10 +0200)]
systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering

We already used Conflicts=shutdown target to stop LVM2 services on shutdown.
But we still missed the ordering - the shutdown.target should be reached
only after all the services are really stopped.

Reported here: https://github.com/lvmteam/lvm2/issues/17

5 years agoWHATS_NEW: add several recent changes
David Teigland [Mon, 8 Apr 2019 15:56:43 +0000 (10:56 -0500)]
WHATS_NEW: add several recent changes

5 years agopvscan: ignore device with incorrect size
David Teigland [Fri, 5 Apr 2019 21:44:00 +0000 (16:44 -0500)]
pvscan: ignore device with incorrect size

If a device looks like a PV, but its size does not
match the PV size in the metadata, then skip it for
purposes of autoactivation.  It's probably not wrong
device for the PV.

5 years agopvscan: print more reasons for ignoring devices
David Teigland [Fri, 5 Apr 2019 19:03:38 +0000 (14:03 -0500)]
pvscan: print more reasons for ignoring devices

5 years agotests: update pvscan-autoactivate for init change
David Teigland [Fri, 5 Apr 2019 18:20:09 +0000 (13:20 -0500)]
tests: update pvscan-autoactivate for init change

5 years agopvscan: don't print warning about lvmlockd not running
David Teigland [Thu, 14 Mar 2019 21:25:55 +0000 (16:25 -0500)]
pvscan: don't print warning about lvmlockd not running

pvscan --cache ignores shared VGs, so it doesn't need to
consider lvmlockd, and shouldn't include a warning about it.

5 years agopvscan: remove initialization case
David Teigland [Tue, 26 Feb 2019 22:48:29 +0000 (16:48 -0600)]
pvscan: remove initialization case

In the past, the first 'pvscan --cache -aay dev' command
to run on the system would initialize the pvs_online dir
by scanning all devs and creating online files for all pvs
it found, and then autoactivating the VG (if complete) for
the named dev.  The idea was that the system may not have
been able to run pvscan commands for early devices, so the
first pvscan to run would need to "make up" for any devices
that had appeared previously, which the system was unable to
scan.  The problem or idea of making up for missed scans is
historical and should no longer be needed, so remove this
special init case.

5 years agopvscan: for init only autoactivate vg for named dev
David Teigland [Tue, 26 Feb 2019 22:39:43 +0000 (16:39 -0600)]
pvscan: for init only autoactivate vg for named dev

When pvscan is run for the initialization case (the first
pvscan run on the system), it scans all devs and creates
online files for all PVs it finds.  Previously it would
then autoactivate every complete VG, but change this to
only autoactive the (complete) VG corresponding to the
named device arg(s).

5 years agopvscan: reorganize code
David Teigland [Tue, 26 Feb 2019 22:35:16 +0000 (16:35 -0600)]
pvscan: reorganize code

to simplify and prepare for subsequent change.
Should be no change in behavior.

5 years agoman: updates to lvmlockd
David Teigland [Thu, 4 Apr 2019 19:36:28 +0000 (14:36 -0500)]
man: updates to lvmlockd

- remove reference to locking_type which is no longer used
- remove references to adopting locks which has been disabled
- move some sanlock-specific info out of a general section
- remove info about doing automatic lockstart by the system
  since this was never used (the resource agent does it)
- replace info about lvextend and manual refresh under gfs2
  with a description about the automatic remote refresh

5 years agolvmlockd: do not allow mirror LV to be activated shared
David Teigland [Fri, 22 Mar 2019 17:07:31 +0000 (12:07 -0500)]
lvmlockd: do not allow mirror LV to be activated shared

This reverts 518a8e8cfbb672c2bf5e3455f1fe7cd8d94eb5b0
  "lvmlockd: activate mirror LVs in shared mode with cmirrord"

because while activating a mirror LV with cmirrord worked,
changes to the active cmirror did not work.

5 years agolvextend: refresh shared LV without using select
David Teigland [Thu, 4 Apr 2019 18:19:08 +0000 (13:19 -0500)]
lvextend: refresh shared LV without using select

Using select instead of normal args did not end
up being a help, so remove it.

5 years agotests: check auto-growth of thin-pool meta
Zdenek Kabelac [Wed, 3 Apr 2019 11:25:54 +0000 (13:25 +0200)]
tests: check auto-growth of thin-pool meta

5 years agothin: fix maintenance of _pmspare
Zdenek Kabelac [Wed, 3 Apr 2019 11:02:50 +0000 (13:02 +0200)]
thin: fix maintenance of _pmspare

When metadata grows lvm2 may need to extend also _pmspare volume.

5 years agothin: resize metadata with data
Zdenek Kabelac [Wed, 3 Apr 2019 11:01:06 +0000 (13:01 +0200)]
thin: resize metadata with data

When data are growing, adapt also size of metadata.
As we get way too many reports from users doing huge growths of
data portion while keep metadata small and avoiding using monitoring.

So to enhance the user-experience in case user requests grown of
thin-pool (without passing PV list for growth) - lvm2 will automaticaly
grown also the metadata part of thin-pool (if possible).

5 years agothin: introduce estimate_thin_pool_metadata_size
Zdenek Kabelac [Wed, 3 Apr 2019 10:56:48 +0000 (12:56 +0200)]
thin: introduce estimate_thin_pool_metadata_size

Add function for estimation of thin-pool metadata size for given size of
data. Function is using already existing internal API so it can
be reused for resize of thin-pool data.

5 years agofilter: fix mpath test
Zdenek Kabelac [Wed, 3 Apr 2019 11:06:00 +0000 (13:06 +0200)]
filter: fix mpath test

Fix bug which leaked into commit
dc6dea40331687b8740cc48833f4c7c42a2db1a1,
where the testing code got mistakenly commited.

5 years agolvresize: fix when compiled without lvmlockd
David Teigland [Tue, 2 Apr 2019 15:50:12 +0000 (10:50 -0500)]
lvresize: fix when compiled without lvmlockd

The no-op result of lockd_lv_resize should be success.

5 years agolvextend: refresh shared LV with vgname as arg
David Teigland [Fri, 22 Mar 2019 20:01:29 +0000 (15:01 -0500)]
lvextend: refresh shared LV with vgname as arg

Update the previous commit to leave the vgname as
an arg instead of moving it into the select option,
(the compound select option rule is confusing the
dlm arg processing.)

5 years agolvextend: refresh shared LV using select option
David Teigland [Fri, 22 Mar 2019 19:28:02 +0000 (14:28 -0500)]
lvextend: refresh shared LV using select option

Using --select 'lvname=LV && vgname=VG' avoids the problem
of the lvchange exit code not distinguishing an actual error
result vs the VG or LV not existing.  (This is in case there
is an odd dlm/gfs2 setup where some nodes are running the dlm
but do not have access to the VG.)

5 years agolvextend: refresh shared LV remotely using dlm/corosync
David Teigland [Wed, 20 Mar 2019 18:20:26 +0000 (13:20 -0500)]
lvextend: refresh shared LV remotely using dlm/corosync

When lvextend extends an LV that is active with a shared
lock, use this as a signal that other hosts may also have
the LV active, with gfs2 mounted, and should have the LV
refreshed to reflect the new size.  Use the libdlmcontrol
run api, which uses dlm_controld/corosync to run an
lvchange --refresh command on other cluster nodes.

5 years agolvextend: allow on LV active with a shared lock
David Teigland [Tue, 19 Mar 2019 19:38:38 +0000 (14:38 -0500)]
lvextend: allow on LV active with a shared lock

Detect when a shared lock exists, don't require the
normal exclusive lock, and allow the lvextend.

5 years agowarn about changes to an active lv with shared lock
David Teigland [Thu, 7 Mar 2019 17:20:41 +0000 (11:20 -0600)]
warn about changes to an active lv with shared lock

When an LV is active with a shared lock, a command can be
run to change the LV with --lockopt skiplv (to override the
exclusive lock the command ordinarily requires which is not
compatible with the outstanding shared lock.)

In this case, other commands may have the LV active and may
need to refresh the LV, so print warning stating this.

5 years agotests: vdo caching tests
Zdenek Kabelac [Sat, 26 Jan 2019 00:36:07 +0000 (01:36 +0100)]
tests: vdo caching tests

5 years agotests: vdo dmevent autoresize
Zdenek Kabelac [Thu, 24 Jan 2019 13:16:18 +0000 (14:16 +0100)]
tests: vdo dmevent autoresize

5 years agoman: dmeventd vdo plugin
Zdenek Kabelac [Wed, 23 Jan 2019 21:51:00 +0000 (22:51 +0100)]
man: dmeventd vdo plugin

5 years agoman: basic vdo stacking support
Zdenek Kabelac [Thu, 24 Jan 2019 13:57:36 +0000 (14:57 +0100)]
man: basic vdo stacking support

Document some basic lvconvert stacking posibilities.

5 years agoactivation: synchronize before removing devices
Zdenek Kabelac [Wed, 6 Feb 2019 11:37:47 +0000 (12:37 +0100)]
activation: synchronize before removing devices

Udev is running udev-rule action upon 'resume'.

However lvm2 in special case is doing replacement of
'soon-to-be-removed' device with 'error' target for resuming
and then follows actual removal - the sequence is usually quick,
so when udev start action - it can result in 'strange' error
message in kernel log like:

Process '/usr/sbin/dmsetup info -j 253 -m 17 -c --nameprefixes --noheadings --rows -o name,uuid,suspended' failed with exit code 1.

To avoid this - we need to ensure there is synchronization wait for udev
between 'resume'  and 'remove' part of this process.

However existing code put strict requirement to avoid synchronizing with
udev inside critical section - but this originally came from requirement
to not do anything special while there could be devices in
suspend-state. Now we are able to see differnce between critical section
with or without suspended devices.  For udev synchronization only
suspended devices are prohibited to be there - so slightly relax
condition and allow calling and using 'fs_sync()' even inside critical
section - but there must not be any suspended device.

5 years agovdo: enable caching for vdopool LV and vdo LV
Zdenek Kabelac [Thu, 24 Jan 2019 13:12:26 +0000 (14:12 +0100)]
vdo: enable caching for vdopool LV and vdo LV

Allow using caching with VDO.
User can either cache a single vdopool or
a vdo LV - difference when the caching is put-in depends on a use-case
and it's upto user to decide which kind of speed is expected.

5 years agolv_manip: insert remove layer skips pools
Zdenek Kabelac [Thu, 24 Jan 2019 13:14:31 +0000 (14:14 +0100)]
lv_manip: insert remove layer skips pools

Fixing renaming of subLVs when removing and inserting layers - this
got visible when using stacked VDO pools.

5 years agotests: check vgsplit works with cache
Zdenek Kabelac [Fri, 1 Feb 2019 22:45:12 +0000 (23:45 +0100)]
tests: check vgsplit works with cache

5 years agocache: support vgsplit
Zdenek Kabelac [Fri, 1 Feb 2019 20:29:22 +0000 (21:29 +0100)]
cache: support vgsplit

Enable vgsplit to work with VG containing cached LVs.

5 years agothin: max thin
Zdenek Kabelac [Tue, 29 Jan 2019 17:45:52 +0000 (18:45 +0100)]
thin: max thin

5 years agodebug: use log_warn
Zdenek Kabelac [Wed, 13 Mar 2019 11:58:13 +0000 (12:58 +0100)]
debug: use log_warn

This reports are not causing command failure, so report them as
warning.

5 years agofilter: enhance mpath detection
Zdenek Kabelac [Wed, 13 Mar 2019 12:02:09 +0000 (13:02 +0100)]
filter: enhance mpath detection

Internal detection of SCSI device being in-use by DM mpath has been
performed several times for each component device - this could be
eventually racy - so instead when we do remember  1st. checked result
for device being mpath and use it consistenly over the filter runtime.

5 years agodev_manager: add dev_manager_remove_dm_major_minor
Zdenek Kabelac [Wed, 13 Mar 2019 11:59:59 +0000 (12:59 +0100)]
dev_manager: add dev_manager_remove_dm_major_minor

Move DM usage into dev_manager.c source file.
Also convert STATUS to INFO ioctl - as that's enough
to obtain UUID - this also avoid issuing unwanted flush on checked DM
device for being mpath.

5 years agogitignore: update
Zdenek Kabelac [Wed, 6 Mar 2019 13:39:17 +0000 (14:39 +0100)]
gitignore: update

5 years agopvscan: fix ignoring foreign PVs
David Teigland [Wed, 13 Mar 2019 21:03:02 +0000 (16:03 -0500)]
pvscan: fix ignoring foreign PVs

Fix to previous commit
  "pvscan: ignore online for shared and foreign PVs"

which was incorrectly considering a PV foreign if its
VG had no system ID when the host did have a system ID.

5 years agoconfig: improve scan_lvs description
David Teigland [Wed, 6 Mar 2019 19:33:07 +0000 (13:33 -0600)]
config: improve scan_lvs description

5 years agotests: check that pvscan --cache ignores certain PVs
David Teigland [Wed, 6 Mar 2019 18:17:47 +0000 (12:17 -0600)]
tests: check that pvscan --cache ignores certain PVs

5 years agopvscan: ignore online for shared and foreign PVs
David Teigland [Tue, 5 Mar 2019 21:19:05 +0000 (15:19 -0600)]
pvscan: ignore online for shared and foreign PVs

Activation would not be allowed anyway, but we can
check for these cases early and avoid wasted time in
pvscan managing online files an attempting activation.

5 years agopvscan: ignore online for unused PV
David Teigland [Mon, 4 Mar 2019 20:25:53 +0000 (14:25 -0600)]
pvscan: ignore online for unused PV

If an unused PV comes online, ignore it from
pvscan --cache.

5 years agoWHATS_NEW: io_memory_size
David Teigland [Mon, 4 Mar 2019 18:22:49 +0000 (12:22 -0600)]
WHATS_NEW: io_memory_size

5 years agoio: increase the default io memory from 4 to 8 MiB
David Teigland [Mon, 4 Mar 2019 17:18:34 +0000 (11:18 -0600)]
io: increase the default io memory from 4 to 8 MiB

This is the default bcache size that is created at the
start of the command.  It needs to be large enough to
hold a single copy of metadata for a given VG, or the
VG cannot be read or written (since the entire VG would
not fit into available memory.)

Increasing the default reduces the chances of anyone
needing to increase the default to use their VG.

The size can be set in lvm.conf global/io_memory_size;
the lower limit is 4 MiB and the upper limit is 128 MiB.

5 years agoio: warn when metadata size approaches io memory size
David Teigland [Mon, 4 Mar 2019 18:13:09 +0000 (12:13 -0600)]
io: warn when metadata size approaches io memory size

When a single copy of metadata gets within 1MB of the
current io_memory_size value, begin printing a warning
that the io_memory_size should be increased.

5 years agoconfig: add new setting io_memory_size
David Teigland [Fri, 1 Mar 2019 19:55:59 +0000 (13:55 -0600)]
config: add new setting io_memory_size

which defines the amount of memory that lvm will allocate
for bcache.  Increasing this setting is required if it is
smaller than a single copy of VG metadata.

5 years agoremove unused io functions
David Teigland [Thu, 28 Feb 2019 16:48:30 +0000 (10:48 -0600)]
remove unused io functions

5 years agologging: remove unused code
David Teigland [Thu, 28 Feb 2019 16:30:54 +0000 (10:30 -0600)]
logging: remove unused code

Incomplete bits of original code that's unused.

5 years agopvscan service: use StartLimitIntervalSec
David Teigland [Thu, 28 Feb 2019 14:50:37 +0000 (08:50 -0600)]
pvscan service: use StartLimitIntervalSec

systemd changed the name

5 years agoUse "cachevol" to refer to cache on a single LV
David Teigland [Wed, 30 Jan 2019 15:55:34 +0000 (09:55 -0600)]
Use "cachevol" to refer to cache on a single LV

and "cachepool" to refer to a cache on a cache pool object.

The problem was that the --cachepool option was being used
to refer to both a cache pool object, and to a standard LV
used for caching.  This could be somewhat confusing, and it
made it less clear when each kind would be used.  By
separating them, it's clear when a cachepool or a cachevol
should be used.

Previously:

- lvm would use the cache pool approach when the user passed
  a cache-pool LV to the --cachepool option.

- lvm would use the cache vol approach when the user passed
  a standard LV in the --cachepool option.

Now:

- lvm will always use the cache pool approach when the user
  uses the --cachepool option.

- lvm will always use the cache vol approach when the user
  uses the --cachevol option.

5 years agoconfig: make hints setting commented
David Teigland [Tue, 26 Feb 2019 21:54:30 +0000 (15:54 -0600)]
config: make hints setting commented

5 years agologging: new config settings to specify debug fields
David Teigland [Tue, 26 Feb 2019 20:31:44 +0000 (14:31 -0600)]
logging: new config settings to specify debug fields

For users who do not want all of the fields included
in debug lines, let them specify in lvm.conf which
fields to include.  timestamp, command[pid], and
file:line fields can all be disabled.

5 years agopvscan: fix hint recreation
David Teigland [Tue, 26 Feb 2019 16:30:11 +0000 (10:30 -0600)]
pvscan: fix hint recreation

Restore part of the fix from f0089472e7 that was lost
in the process of backporting 74a388cca1.

5 years agologging: add command[pid] and timestamp to file and verbose output
David Teigland [Fri, 22 Feb 2019 18:01:20 +0000 (12:01 -0600)]
logging: add command[pid] and timestamp to file and verbose output

Without this, the output from different commands in a single
log file could not be separated.

Change the default "indent" setting to 0 so that the default
debug output does not include variable spaces in the middle
of debug lines.

5 years agodmsetup: Fix multi-line concise table parsing
Alasdair G Kergon [Mon, 25 Feb 2019 13:41:51 +0000 (13:41 +0000)]
dmsetup: Fix multi-line concise table parsing

Use the correct loop variable within the loop, instead of reusing the
initial value.  Table lines after the first don't get terminated in
the right place.

Signed-off-by: Kurt Garloff <kurt@garloff.de>
5 years agoWHATS_NEW: concurrent pvscan autoactivation
David Teigland [Thu, 21 Feb 2019 21:31:23 +0000 (15:31 -0600)]
WHATS_NEW: concurrent pvscan autoactivation

5 years agopvscan: autoactivate a VG once
David Teigland [Wed, 13 Feb 2019 20:21:56 +0000 (14:21 -0600)]
pvscan: autoactivate a VG once

When a VG has multiple PVs, and all those PVs come online
at the same time, concurrent pvscans for each PV will all
create the individual pvid files, and all will often see
the VG is now complete.  This causes each of the pvscan
commands to think it should activate the VG, so there
are multiple activations of the same VG.  The vg lock
serializes them, and only the first pvscan actually does
the activation, but there is still a lot of extra overhead
and time used by the other pvscans that attempt to
activate the already active VG.  This can lead to a backlog
of pvscans and timeouts.

To fix this, this adds a new /run/lvm/vgs_online/ dir that
works like the existing /run/lvm/pvs_online/ dir.  Each pvscan
that wants to activate a VG will first try to exlusively create
the file vgs_online/<vgname>.  Only the first pvscan will
succeed, and that one will do the VG activation. The other
pvscans will find the vgname file exists and will not do the
activation step.

When a PV goes offline, the vgs_online file for the corresponding
VG is removed.  This allows the VG to be autoactivated again
when the PV comes online again.  This requires that the vgname be
stored in the pvid files.

5 years agopvscan: fix autoactivation from concurrent pvscans
David Teigland [Wed, 13 Feb 2019 19:35:24 +0000 (13:35 -0600)]
pvscan: fix autoactivation from concurrent pvscans

Use a file lock to ensure that only one pvscan will do
initialization of pvs_online, otherwise multiple concurrent
pvscans may all see an empty pvs_online directory and
do initialization.

The pvscan that is doing initialization should also only
attempt to activate complete VGs.

5 years agoWHATS_NEW: scan_lvs default change
David Teigland [Wed, 20 Feb 2019 20:04:49 +0000 (14:04 -0600)]
WHATS_NEW: scan_lvs default change

5 years agotests: set scan_lvs=1 in tests that stack PVs on LVs
David Teigland [Wed, 20 Feb 2019 19:31:30 +0000 (13:31 -0600)]
tests: set scan_lvs=1 in tests that stack PVs on LVs

5 years agoconfig: change scan_lvs default to 0
David Teigland [Wed, 20 Feb 2019 19:30:46 +0000 (13:30 -0600)]
config: change scan_lvs default to 0

so that lvm does not scan LVs for PVs by default.

5 years agohints: fix recreating hints from pvscan
David Teigland [Wed, 13 Feb 2019 21:23:43 +0000 (15:23 -0600)]
hints: fix recreating hints from pvscan

When aay was included in the pvscan --cache command,
the activation part was complaining about the unusual
state of the hint file since it had been recreated
just prior.

5 years agoapply obtain_device_list_from_udev to all libudev usage
David Teigland [Tue, 5 Feb 2019 16:15:40 +0000 (10:15 -0600)]
apply obtain_device_list_from_udev to all libudev usage

udev_dev_is_md_component and udev_dev_is_mpath_component
are not used for obtaining the device list, but they still
use libudev for device info.  When there are problems with
udev, these functions can get stuck. So, use the existing
obtain_device_list_from_udev config setting to also control
whether these "is component" functions are used, which gives
us a way to avoid using libudev entirely when it's causing
problems.

5 years agocleanup: indent
Zdenek Kabelac [Thu, 24 Jan 2019 13:12:42 +0000 (14:12 +0100)]
cleanup: indent

5 years agoman: lvmvdo component activation description
Zdenek Kabelac [Thu, 24 Jan 2019 15:12:04 +0000 (16:12 +0100)]
man: lvmvdo component activation description

Describe component activation for VDO Data LV.

5 years agoman: vdo regenerated
Zdenek Kabelac [Mon, 28 Jan 2019 20:37:23 +0000 (21:37 +0100)]
man: vdo regenerated

Correcting order of appearance of VDO description in lvcreate.

5 years agovdo: add some basic example
Zdenek Kabelac [Mon, 28 Jan 2019 20:39:40 +0000 (21:39 +0100)]
vdo: add some basic example

5 years agovdo: document types vdo and vdo-pool
Zdenek Kabelac [Mon, 28 Jan 2019 20:42:30 +0000 (21:42 +0100)]
vdo: document types vdo and vdo-pool

5 years agovdo: complete matching with thin syntax
Zdenek Kabelac [Mon, 28 Jan 2019 19:32:42 +0000 (20:32 +0100)]
vdo: complete matching with thin syntax

Just like we support for thin-pool syntax:

lvcreate --thinpool new_tpoolname -L Size vg

add same support logic with for vdo-poo:

lvcreate --vdopool new_vpoolname -L Size vg

Also move description of syntax bellow thin-pool, so it's
correctly ordered in generated man page.

5 years agolvconvert: pass force and yes options for vdo conversion
Zdenek Kabelac [Wed, 23 Jan 2019 21:51:24 +0000 (22:51 +0100)]
lvconvert: pass force and yes options for vdo conversion

5 years agotests: rounding for pools changed to power of 2
Zdenek Kabelac [Mon, 28 Jan 2019 21:05:17 +0000 (22:05 +0100)]
tests: rounding for pools changed to power of 2

Even with 64K chunk support, lvm2 will target power-of-2 chunks.

5 years agothin: select chunk size as power of 2
Zdenek Kabelac [Mon, 28 Jan 2019 18:50:41 +0000 (19:50 +0100)]
thin: select chunk size as power of 2

Whenever thin-pool chunk size is unspecified and left for lvm calculation
try to select the size as nearest highest power-of-2 instead of
just being a multiple of 64KiB.

5 years agocache: select chunk size as power of 2
Zdenek Kabelac [Mon, 28 Jan 2019 19:08:49 +0000 (20:08 +0100)]
cache: select chunk size as power of 2

When cache chunk size is not configured, and left for lvm deduction,
select the value which is power-of-2.

5 years agotests: use pvscan after enable_dev in process-each-duplicate-vgnames
David Teigland [Mon, 28 Jan 2019 17:38:05 +0000 (11:38 -0600)]
tests: use pvscan after enable_dev in process-each-duplicate-vgnames

instead of vgscan, so that new dev is recognized with hints

5 years agovgscan: drop 'take a while' message
David Teigland [Mon, 28 Jan 2019 17:22:42 +0000 (11:22 -0600)]
vgscan: drop 'take a while' message

every command does this

5 years agorpm: package lvmvdo man page
Zdenek Kabelac [Tue, 22 Jan 2019 13:33:03 +0000 (14:33 +0100)]
rpm: package lvmvdo man page

5 years agovdo: some formating updates
Zdenek Kabelac [Tue, 22 Jan 2019 13:27:55 +0000 (14:27 +0100)]
vdo: some formating updates

5 years agolv_manip: better work with PERCENT_VG modifier with lvresize
Zdenek Kabelac [Mon, 21 Jan 2019 14:37:51 +0000 (15:37 +0100)]
lv_manip: better work with PERCENT_VG modifier with lvresize

Fixing recent commit 022ebb0cfebee4ac8fdbe4e0c61e85db1038a115
Resize already has size that needs to be counted with,
otherwise upsizing operation could turn into size reduction one.

5 years agovdo: minor API cleanup
Zdenek Kabelac [Sun, 20 Jan 2019 23:48:05 +0000 (00:48 +0100)]
vdo: minor API cleanup

Since the parse_vdo_pool_status() become vdo_manip API part,
and there will be no 'dm' matching status parser,
the API can be simplified and closely match thin API here.

5 years agotests: vdo dmeventd resize
Zdenek Kabelac [Sun, 20 Jan 2019 15:08:53 +0000 (16:08 +0100)]
tests: vdo dmeventd resize

5 years agovdo: enable dmeventd resize
Zdenek Kabelac [Sun, 20 Jan 2019 15:08:11 +0000 (16:08 +0100)]
vdo: enable dmeventd resize

5 years agovdo: add simple wrapper for getting pool percentage
Zdenek Kabelac [Sun, 20 Jan 2019 23:24:30 +0000 (00:24 +0100)]
vdo: add simple wrapper for getting pool percentage

Just like with i.e. thins provide simple function for
getting percentage of VDO Pool usage (uses existing
status function).

5 years agotests: initial test for vdo resize
Zdenek Kabelac [Sun, 20 Jan 2019 11:38:59 +0000 (12:38 +0100)]
tests: initial test for vdo resize

5 years agotests: aux fix testing for kvdo
Zdenek Kabelac [Sun, 20 Jan 2019 11:15:20 +0000 (12:15 +0100)]
tests: aux fix testing for kvdo

5 years agotests: update cache test
Zdenek Kabelac [Sun, 20 Jan 2019 11:11:04 +0000 (12:11 +0100)]
tests: update cache test

Since migration_threshold is now protected to not be smaller
then 8*chunk_size - update tests to count with this modification.

5 years agovdo: man documenting resize
Zdenek Kabelac [Fri, 18 Jan 2019 19:28:35 +0000 (20:28 +0100)]
vdo: man documenting resize

5 years agocleanup: better naming
Zdenek Kabelac [Thu, 10 Jan 2019 17:01:06 +0000 (18:01 +0100)]
cleanup: better naming

5 years agovdo: allow resize of VDO and VDO pool volumes
Zdenek Kabelac [Thu, 10 Jan 2019 17:00:06 +0000 (18:00 +0100)]
vdo: allow resize of VDO and VDO pool volumes

Now with newer VDO kvdo target we can start to use standard mechanism
to enable resize of VDO volumes.

VDO pool can be grown.

Virtual volume grows on top of VDO pool when is not big enough.
Reduced VDOLV is calling discard for reduced areas - this can
take long time!

TODO: implement some pollable mechanism for out-of-lock TRIM.

5 years agovdo: size reduction requires VDO to be active
Zdenek Kabelac [Sat, 19 Jan 2019 18:32:02 +0000 (19:32 +0100)]
vdo: size reduction requires VDO to be active

To be able to send discard to reduced areas - the VDO LV needs to
be active.

5 years agovdo: discard reduced area
Zdenek Kabelac [Mon, 21 Jan 2019 11:20:07 +0000 (12:20 +0100)]
vdo: discard reduced area

Implement sending discard to reduced LV area.

5 years agovdo: estimate virtual size after resize
Zdenek Kabelac [Wed, 16 Jan 2019 14:35:07 +0000 (15:35 +0100)]
vdo: estimate virtual size after resize

5 years agovdo: introduce function for estimation of virtual size
Zdenek Kabelac [Wed, 16 Jan 2019 14:34:28 +0000 (15:34 +0100)]
vdo: introduce function for estimation of virtual size

5 years agolv_manip: better work with PERCENT_VG modifier
Zdenek Kabelac [Fri, 18 Jan 2019 21:27:02 +0000 (22:27 +0100)]
lv_manip: better work with PERCENT_VG modifier

When using 'lvcreate -l100%VG' and there is big disproportion between
real available space and requested setting - automatically fallback
to 100%FREE.

Difference can be seen when VG is big and already most space was
allocated, so the requestion 100%VG can end (and by spec for % modifier
it's correct) as LV with size of 1%VG.  Usually this is not a big
problem - buit in some cases - like cache-pool allocation, this
can result a big difference for chunksize selection.

With this patch it's more closely match common-sense logic without
the need of reitteration of too big changes in lvm2 core ATM.

TODO: in the future there should be allocator solving all allocations
in a single call.

5 years agodm: migration_threshold for old linked tools
Zdenek Kabelac [Sun, 20 Jan 2019 10:45:27 +0000 (11:45 +0100)]
dm: migration_threshold for old linked tools

Just like with precending  lvm2 device_mapper patch, ensure
that old users of libdm will also get fixed migration threshold
for caches.

This page took 0.068766 seconds and 5 git commands to generate.