]> sourceware.org Git - lvm2.git/log
lvm2.git
4 years agocleanup: user force_t enums instead of ints
Zdenek Kabelac [Sat, 29 Aug 2020 19:53:05 +0000 (21:53 +0200)]
cleanup: user force_t enums instead of ints

4 years agocleanup: matching declaration order
Zdenek Kabelac [Sat, 29 Aug 2020 19:37:39 +0000 (21:37 +0200)]
cleanup: matching declaration order

Cosmetic

4 years agocov: avoid duplicated assign
Zdenek Kabelac [Sat, 29 Aug 2020 18:40:20 +0000 (20:40 +0200)]
cov: avoid duplicated assign

4 years agocov: always initialized values
Zdenek Kabelac [Sat, 29 Aug 2020 18:27:32 +0000 (20:27 +0200)]
cov: always initialized values

Make sure values are initialized for all possible paths.

4 years agocov: explicitely ignore function result
Zdenek Kabelac [Tue, 1 Sep 2020 15:53:36 +0000 (17:53 +0200)]
cov: explicitely ignore function result

4 years agocov: always sure we end with '0'
Zdenek Kabelac [Sat, 29 Aug 2020 17:56:37 +0000 (19:56 +0200)]
cov: always sure we end with '0'

Use easier dm_strncpy().

4 years agogcc: keep using unsigned type
Zdenek Kabelac [Sat, 29 Aug 2020 20:24:34 +0000 (22:24 +0200)]
gcc: keep using unsigned type

4 years agogcc: preserve constness of buffer
Zdenek Kabelac [Sat, 29 Aug 2020 20:02:41 +0000 (22:02 +0200)]
gcc: preserve constness of buffer

4 years agogcc: zero-sized array to fexlible array C99
Zdenek Kabelac [Fri, 28 Aug 2020 17:15:01 +0000 (19:15 +0200)]
gcc: zero-sized array to fexlible array C99

Switch remaining zero sized struct to flexible arrays to be C99
complient.

These simple rules should apply:

- The incomplete array type must be the last element within the structure.
- There cannot be an array of structures that contain a flexible array member.
- Structures that contain a flexible array member cannot be used as a member of another structure.
- The structure must contain at least one named member in addition to the flexible array member.

Although some of the code pieces should be still improved.

4 years agogcc: change zero-sized array to fexlible array
Zhao Heming [Thu, 20 Aug 2020 16:05:04 +0000 (00:05 +0800)]
gcc: change zero-sized array to fexlible array

this patch makes gcc happy with compiling option: [-Wstringop-overflow=]

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
4 years agodmsetup: initilize winsize struct
Zdenek Kabelac [Sat, 29 Aug 2020 18:35:49 +0000 (20:35 +0200)]
dmsetup: initilize winsize struct

Ensure winsize struct is always defined.

4 years agotests: filefrag needs to support -e
Zdenek Kabelac [Sat, 29 Aug 2020 13:33:57 +0000 (15:33 +0200)]
tests: filefrag needs to support -e

Skip on systems with 'too old' filefrag without -e support

4 years agocachevol: correcting 64b math
Zdenek Kabelac [Sat, 29 Aug 2020 18:08:49 +0000 (20:08 +0200)]
cachevol: correcting 64b math

Widen to 64bit for correct 64b multiplication math.

4 years agoWHATS_NEW: update
Zdenek Kabelac [Fri, 28 Aug 2020 19:42:12 +0000 (21:42 +0200)]
WHATS_NEW: update

4 years agogcc: drop bogus ;
Zdenek Kabelac [Fri, 28 Aug 2020 19:14:06 +0000 (21:14 +0200)]
gcc: drop bogus ;

4 years agogcc: do not use return with void function
Zdenek Kabelac [Fri, 28 Aug 2020 17:33:49 +0000 (19:33 +0200)]
gcc: do not use return with void function

Follow C norm and do not use 'return' in void function to call other
functions.

4 years agogcc: use apropriate type for reading and printing values
Zdenek Kabelac [Fri, 28 Aug 2020 17:35:25 +0000 (19:35 +0200)]
gcc: use apropriate type for reading and printing values

4 years agotools: move struct element before variable lenght list
Zdenek Kabelac [Fri, 28 Aug 2020 17:15:42 +0000 (19:15 +0200)]
tools: move struct element before variable lenght list

Move prio field before 'variable' struct array field.
Interesting why this has not been catched yet.

TODO: think about test case

4 years agogcc: calc size in compile time
Zdenek Kabelac [Fri, 28 Aug 2020 16:58:55 +0000 (18:58 +0200)]
gcc: calc size in compile time

4 years agogcc: avoid stack alloc arithmetic
Zdenek Kabelac [Fri, 28 Aug 2020 16:46:06 +0000 (18:46 +0200)]
gcc: avoid stack alloc arithmetic

4 years agogcc: keep unsigned arithmetic
Zdenek Kabelac [Fri, 28 Aug 2020 17:55:01 +0000 (19:55 +0200)]
gcc: keep unsigned arithmetic

Avoid conversion to int.

4 years agolv_manip: get_default_region_size return uint32_t
Zdenek Kabelac [Fri, 28 Aug 2020 18:07:34 +0000 (20:07 +0200)]
lv_manip: get_default_region_size return uint32_t

4 years agolvmcache: use uint32_t for seqno caching
Zdenek Kabelac [Fri, 28 Aug 2020 17:48:40 +0000 (19:48 +0200)]
lvmcache: use uint32_t for seqno caching

4 years agowritecache: correct usage of const struct
Zdenek Kabelac [Fri, 28 Aug 2020 16:26:40 +0000 (18:26 +0200)]
writecache: correct usage of const struct

4 years agocontainer_of: drop needless const converion
Zdenek Kabelac [Fri, 28 Aug 2020 16:26:07 +0000 (18:26 +0200)]
container_of: drop needless const converion

4 years agotests: check we detect lvm.conf read failure
Zdenek Kabelac [Thu, 27 Aug 2020 10:55:22 +0000 (12:55 +0200)]
tests: check we detect lvm.conf read failure

No coredumps with unreadable lvm.conf.

4 years agoconfig: drop reading file with mmap
Zdenek Kabelac [Thu, 27 Aug 2020 10:49:03 +0000 (12:49 +0200)]
config: drop reading file with mmap

While normally the 'mmap' file reading is better utilizing resources,
it has also its odd side with handling errors - so while we normally
use the mmap only for reading regular files from root filesystem
(i.e. lvm.conf) we can't prevent error to happen during the read
of these file - and such error unfortunately ends with SIGBUS error.
Maintaing signal handler would be compilated - so switch to slightly
less effiecient but more error resistant read() functinality.

4 years agoRevert "lvdisplay: dispaly correct status when underlying devs missing"
David Teigland [Fri, 28 Aug 2020 18:26:50 +0000 (13:26 -0500)]
Revert "lvdisplay: dispaly correct status when underlying devs missing"

This reverts commit 1d0dc74f9147e3c1f3681efa4166cbe2edcb6571.

We should avoid adding anything new to lvdisplay and report
new information via lvs reporting fields.

4 years agolvdisplay: dispaly correct status when underlying devs missing
Zhao Heming [Mon, 24 Aug 2020 14:47:04 +0000 (09:47 -0500)]
lvdisplay: dispaly correct status when underlying devs missing

reproducible steps:
1. vgcreate vg1 /dev/sda /dev/sdb
2. lvcreate --type raid0 -l 100%FREE -n raid0lv vg1
3. do remove the /dev/sdb action
4. lvdisplay show wrong 'LV Status'

After removing raid0 type LV underlying dev, lvdisplay still display
'available'. This is wrong status for raid0.

This patch add a new function raid_is_available(), which will handle
all raid case.

With this patch, lvdisplay will show
from:
  LV Status              available
to:
  LV Status              NOT available (partial)

Reviewed-by: Enzo Matsumiya <ematsumiya@suse.com>
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
4 years agowipe_lv: close devices on error path
Zdenek Kabelac [Wed, 19 Aug 2020 12:40:08 +0000 (14:40 +0200)]
wipe_lv: close devices on error path

Device was kept open preventing its deactivated and removed
on error path.

4 years agoman: vdo improvals
Zdenek Kabelac [Tue, 21 Jul 2020 22:41:35 +0000 (00:41 +0200)]
man: vdo improvals

Add some more notes about discard.
Correct enumeration.

4 years agoconfig: move some config setting into commented part
Zdenek Kabelac [Thu, 9 Jul 2020 21:22:52 +0000 (23:22 +0200)]
config: move some config setting into commented part

It's better to set most of option as 'commented' with some
documented defaults instead of providing strict values.

This has the advantage we can eventually 'change' defualts
and get them working in future. Otherwise once the setting
is stored in lvm.conf in /etc, such setting has strictly
defined value and that can be only change with file update.

4 years agoUpdate README
Marian Csontos [Wed, 12 Aug 2020 10:05:36 +0000 (12:05 +0200)]
Update README

4 years agopost-release
Marian Csontos [Sun, 9 Aug 2020 14:16:39 +0000 (16:16 +0200)]
post-release

4 years agopre-release v2_03_10
Marian Csontos [Sun, 9 Aug 2020 14:15:31 +0000 (16:15 +0200)]
pre-release

4 years agoWHATS_NEW
Marian Csontos [Sun, 9 Aug 2020 14:15:13 +0000 (16:15 +0200)]
WHATS_NEW

4 years agobuild: make generate
Marian Csontos [Sun, 9 Aug 2020 13:20:22 +0000 (15:20 +0200)]
build: make generate

4 years agoWHATS_NEW: Add writecache lvmdbusd
Tony Asleson [Thu, 6 Aug 2020 20:42:49 +0000 (15:42 -0500)]
WHATS_NEW: Add writecache lvmdbusd

4 years agolvmdbusd: Bump LVM DBus API version
Vojtech Trefny [Wed, 1 Jul 2020 11:27:47 +0000 (13:27 +0200)]
lvmdbusd: Bump LVM DBus API version

So users can check for writecache support.

4 years agolvmdbusd: Add support for LVM writecache
Vojtech Trefny [Wed, 1 Jul 2020 11:27:46 +0000 (13:27 +0200)]
lvmdbusd: Add support for LVM writecache

4 years agotests: Adapt RAID test to changes
Marian Csontos [Tue, 28 Jul 2020 15:36:57 +0000 (17:36 +0200)]
tests: Adapt RAID test to changes

Change 3c9177fdc0b8 causes a conversion of raid1 volume to a raid1 with
the same number of legs succeed with a warning.

4 years agocachevol: add LV type restrictions to command defs
David Teigland [Thu, 23 Jul 2020 20:10:35 +0000 (15:10 -0500)]
cachevol: add LV type restrictions to command defs

LV type restrictions were missed on the command definitions.

4 years agocachevol: generate a unique name when creating
David Teigland [Thu, 23 Jul 2020 18:07:32 +0000 (13:07 -0500)]
cachevol: generate a unique name when creating

When a cachevol is automatically created, if the default name
conflicts with an existing name, generate a new unique name.

4 years agolvconvert: display warning if raid1 LV image count does not change
Heinz Mauelshagen [Mon, 20 Jul 2020 13:36:25 +0000 (15:36 +0200)]
lvconvert: display warning if raid1 LV image count does not change

Fix "lvconvert -mN $RaidLV" to display a warning in
case the same number of images is being requested.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1774696

4 years agointegrity: allow type option to be set when changing mirrors
David Teigland [Wed, 15 Jul 2020 15:57:05 +0000 (10:57 -0500)]
integrity: allow type option to be set when changing mirrors

Allow the optional '--type raid1' to be included in the lvconvert
command when adding or removing raid images with integrity.
It does not change the meaning of the command (specifying a type
that matches the current type is redundant but generally allowed.)

4 years agolvmdbusd: recognize lv attr letter g for integrity
David Teigland [Wed, 15 Jul 2020 15:07:28 +0000 (10:07 -0500)]
lvmdbusd: recognize lv attr letter g for integrity

4 years agolvconvert: preset raid1 in case of striped conversions
Heinz Mauelshagen [Thu, 9 Jul 2020 16:51:33 +0000 (18:51 +0200)]
lvconvert: preset raid1 in case of striped conversions

Fixed invoking "lvconvert -m+1 $StripedLV" to cause errors
(preset raid conversion implied by '-m').

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1781406

4 years agodevices: simplify md superblock checking code
David Teigland [Thu, 19 Sep 2019 17:17:36 +0000 (12:17 -0500)]
devices: simplify md superblock checking code

4 years agodevices: detect md ddf and imsm superblocks
David Teigland [Thu, 19 Sep 2019 16:33:59 +0000 (11:33 -0500)]
devices: detect md ddf and imsm superblocks

4 years agolvconvert: fix conversion to 'mirrored' mirror log with larger regionsize
Heinz Mauelshagen [Thu, 9 Jul 2020 12:09:46 +0000 (14:09 +0200)]
lvconvert: fix conversion to 'mirrored' mirror log with larger regionsize

merge.c:_check_lv_segment() was checking regionsize vs. mirrored LV size on
any 'mirror/raid1/raid10' segment type including type 'mirrored' mirror logs.

Avoid the check only for 'mirrored' mirror logs to allow conversion from log
type 'disk' with regionsize > mirror log SubLV size.

As we disabled support for 'mirrored' mirror logs with
commit e82303fd6abc3ae43168f8032806c7c17d181a3e which still conditionally
allows to enable it via global/support_mirrored_mirror_logs=1,
patch is mandatory for all distributions.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1712983

4 years agodebug: missing stacktrace
Zdenek Kabelac [Wed, 8 Jul 2020 09:06:39 +0000 (11:06 +0200)]
debug: missing stacktrace

4 years agoraid: no wiping when zeroing raid metadata device
Zdenek Kabelac [Wed, 8 Jul 2020 08:59:51 +0000 (10:59 +0200)]
raid: no wiping when zeroing raid metadata device

Currently lvm2 is not wiping signatures when creating 'metadata' volumes
and raid _rmeta was the only exception - so make the behavior consistent
with other metadata devices and drop wiping ATM.
Drop also some extra debug since they are now more explanatory in
wipe_lv() function.
Also note - although lvm2 now does not wipe signatures - the error
from such wipping used to be actually 'ignored' before wipe_lv()
started to return error (with recent commit) and raid creation
continued with 'unzeroed' metadata device.

TODO: Several issues to resolve:

1. We may want to flip to wipping with all LVs (in that case we need to
support passing --yet & --force).

2. Also we may want to clear whole metadata device - however current
function is also used for wipping i.e. snapshot COW device which
is likely not a good candidate for full device zeroing.
We may also need to think about better logic when extent size is
enforcing very large LVs, when only a small portion of LV is ever
being used.

3. Using TRIM instead of zeroing metadata device might be worth to
implement.

mm

4 years agolvconvert: more support for yes conversion
Zdenek Kabelac [Wed, 8 Jul 2020 08:57:52 +0000 (10:57 +0200)]
lvconvert: more support for yes conversion

When converting volume to pool LV use also wiping of other signatures.
For writecache & pool conversion support --yet and --force
to bypass prompting for signature wiping.
For writecache drop unneded zero_sectors.

Note: currently we have lvconvert doing convertion and prompting
for confirmation of conversion - and then again wipe_lv() prompts
for removing i.e. filesystem signature - we should unify this
prompting into 1 message  - althought the 'filesystem' discovery
needs active volume - while the 1st. conversion prompt can
work without active converted volume.

4 years agowipe_lv: always zero at least 4K
Zdenek Kabelac [Wed, 8 Jul 2020 08:38:36 +0000 (10:38 +0200)]
wipe_lv: always zero at least 4K

When zero_sectors passed value like 1 - we could zero only 1 sector.
Reinstantiate we always zero at least 4K block.

4 years agowritecache: skip fs block size check in test mode
David Teigland [Tue, 7 Jul 2020 18:20:18 +0000 (13:20 -0500)]
writecache: skip fs block size check in test mode

if doing so requires activating the LV

4 years agointegrity: add initial size to metadata size
David Teigland [Tue, 30 Jun 2020 17:52:27 +0000 (12:52 -0500)]
integrity: add initial size to metadata size

The metadata device size needs to include space for
the dm-integrity "initial_sectors" which hold journals.

4 years agotests: check pool metadata are zeroed
Zdenek Kabelac [Wed, 24 Jun 2020 12:42:11 +0000 (14:42 +0200)]
tests: check pool metadata are zeroed

4 years agotests: failure of zeroing fails command
Zdenek Kabelac [Tue, 23 Jun 2020 12:10:18 +0000 (14:10 +0200)]
tests: failure of zeroing fails command

4 years agomake: make generate
Zdenek Kabelac [Tue, 23 Jun 2020 10:19:35 +0000 (12:19 +0200)]
make: make generate

update

4 years agoman: update cache page
Zdenek Kabelac [Tue, 23 Jun 2020 10:19:54 +0000 (12:19 +0200)]
man: update cache page

Few more sentences around migration threshold.

4 years agocov: avoid double call of free_hints() on error path
Zdenek Kabelac [Mon, 22 Jun 2020 09:07:34 +0000 (11:07 +0200)]
cov: avoid double call of free_hints() on error path

Since we 'free_hints()' on return error path from call of
_read_hint_file(), avoid calling it twice in the middle of
error path process.

4 years agocov: remove unused header
Zdenek Kabelac [Tue, 16 Jun 2020 14:38:15 +0000 (16:38 +0200)]
cov: remove unused header

4 years agocov: use 64bit arithmetic
Zdenek Kabelac [Wed, 10 Jun 2020 21:36:06 +0000 (23:36 +0200)]
cov: use 64bit arithmetic

Although values of VDO block_map_cache_size, index_memory_size, slab_size
should not overflow here - use proper 64bit math.

4 years agopool: zero metadata
Zdenek Kabelac [Wed, 24 Jun 2020 10:11:21 +0000 (12:11 +0200)]
pool: zero metadata

To avoid polution of metadata with some 'garbage' content or eventualy
some leak of stale data in case user want to upload metadata somewhere,
ensure upon allocation the metadata device is fully zeroed.

Behaviour may slow down allocation of thin-pool or cache-pool a bit
so the old behaviour can be restored with lvm.conf setting:
allocation/zero_metadata=0

TODO: add zeroing for extension of metadata volume.

4 years agowipe_lv: make error a fatal event
Zdenek Kabelac [Tue, 23 Jun 2020 11:56:15 +0000 (13:56 +0200)]
wipe_lv: make error a fatal event

Failure in wiping/zeroing stop the command.
If user wants to avoid command abortion he should use -Zn or -Wn
to avoid wiping.

Note: there is no easy way to distinguish which kind of failure has
happend - so it's safe to not proceed any futher.

4 years agobcache: support longer writes
Zdenek Kabelac [Wed, 24 Jun 2020 11:37:23 +0000 (13:37 +0200)]
bcache: support longer writes

When initiated larger write request, it may have happened, bcache
got out of free chunks - fix the loop, that is supposed to wait
until next free chunk becomes avain available.

4 years agolv{resize,extend,reduce}: also check for 2-legged raid4
Heinz Mauelshagen [Wed, 24 Jun 2020 12:02:29 +0000 (14:02 +0200)]
lv{resize,extend,reduce}: also check for 2-legged raid4

Users can also convert 2-legged raid1 to raid4 thus causing 'Bus error'
on resize requests.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1784351

4 years agolv{resize,extend,reduce}: reject size change on 2-legged raid5*
Heinz Mauelshagen [Wed, 24 Jun 2020 11:52:53 +0000 (13:52 +0200)]
lv{resize,extend,reduce}: reject size change on 2-legged raid5*

Reject size changing request in to avoid 'Bus error' and
display hint to convert to more stripes.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1784351

4 years agoman: lvmcache info about cachedevice usage
David Teigland [Thu, 11 Jun 2020 22:01:01 +0000 (17:01 -0500)]
man: lvmcache info about cachedevice usage

4 years agotests: cachevol-cachedevice
David Teigland [Fri, 10 Apr 2020 21:59:16 +0000 (16:59 -0500)]
tests: cachevol-cachedevice

4 years agolvcreate: new cache or writecache lv with single command
David Teigland [Fri, 10 Apr 2020 18:17:37 +0000 (13:17 -0500)]
lvcreate: new cache or writecache lv with single command

To create a new cache or writecache LV with a single command:

lvcreate --type cache|writecache
    -n Name -L Size --cachedevice PVfast VG [PVslow ...]

- A new main linear|striped LV is created as usual, using the
  specified -n Name and -L Size, and using the optionally
  specified PVslow devices.
- Then, a new cachevol LV is created internally, using PVfast
  specified by the cachedevice option.
- Then, the cachevol is attached to the main LV, converting the
  main LV to type cache|writecache.

Include --cachesize Size to specify the size of cache|writecache
to create from the specified --cachedevice PVs, otherwise the
entire cachedevice PV is used.  The --cachedevice option can be
repeated to create the cache from multiple devices, or the
cachedevice option can contain a tag name specifying a set of PVs
to allocate the cache from.

To create a new cache or writecache LV with a single command
using an existing cachevol LV:

lvcreate --type cache|writecache
    -n Name -L Size --cachevol LVfast VG [PVslow ...]

- A new main linear|striped LV is created as usual, using the
  specified -n Name and -L Size, and using the optionally
  specified PVslow devices.
- Then, the cachevol LVfast is attached to the main LV, converting
  the main LV to type cache|writecache.

In cases where more advanced types (for the main LV or cachevol LV)
are needed, they should be created independently and then combined
with lvconvert.

Example
-------

user creates a new VG with one slow device and one fast device:

$ vgcreate vg /dev/slow1 /dev/fast1

user creates a new 8G main LV on /dev/slow1 that uses all of
/dev/fast1 as a writecache:

$ lvcreate --type writecache --cachedevice /dev/fast1
    -n main -L 8G vg /dev/slow1

Example
-------

user creates a new VG with two slow devs and two fast devs:

$ vgcreate vg /dev/slow1 /dev/slow2 /dev/fast1 /dev/fast2

user creates a new 8G main LV on /dev/slow1 and /dev/slow2
that uses all of /dev/fast1 and /dev/fast2 as a writecache:

$ lvcreate --type writecache --cachedevice /dev/fast1 --cachedevice /dev/fast2
    -n main -L 8G vg /dev/slow1 /dev/slow2

Example
-------

A user has several slow devices and several fast devices in their VG,
the slow devs have tag @slow, the fast devs have tag @fast.

user creates a new 8G main LV on the slow devs with a
2G writecache on the fast devs:

$ lvcreate --type writecache -n main -L 8G
    --cachedevice @fast --cachesize 2G vg @slow

4 years agolvconvert: single step cachevol creation and attachment
David Teigland [Wed, 5 Feb 2020 19:42:36 +0000 (13:42 -0600)]
lvconvert: single step cachevol creation and attachment

To add a cache or writecache to a main LV with a single command:

lvconvert --type cache|writecache --cachedevice /dev/ssd vg/main

A cachevol LV will be allocated from the specified cache device,
then attached to the main LV.  Include --cachesize to specify the
size of cachevol to create, otherwise the entire cachedevice is
used.  The cachedevice option can be repeated to create a cachevol
from multiple devices.

Example
-------

A user has an existing main LV that they want to speed up
using a new ssd.

user adds the new ssd to the VG:

$ vgextend vg /dev/ssd

user attaches the new ssd their main LV:

$ lvconvert --type writecache --cachedevice /dev/ssd vg/main

Example
-------

A user has two existing main LVs that they want to speed up
with a new ssd.

user adds the new 16G ssd to the VG:

$ vgextend vg /dev/ssd

user attaches some of the new ssd to the first main LV,
using half of the space:

$ lvconvert --type writecache --cachedevice /dev/ssd
    --cachesize 8G vg/main1

user attaches some of the new ssd to the second main LV,
using the other half of the space:

$ lvconvert --type writecache --cachedevice /dev/ssd
    --cachesize 8G vg/main2

Example
-------

A user has an existing main LV that they want to speed up using
two new ssds.

user adds the new two ssds the VG:

$ vgextend vg /dev/ssd1
$ vgextend vg /dev/ssd2

user attaches both ssds their main LV:

$ lvconvert --type writecache
    --cachedevice /dev/ssd1 --cachedevice /dev/ssd2 vg/main

4 years agointegrity: wait for raid sync to complete
David Teigland [Tue, 16 Jun 2020 17:29:41 +0000 (12:29 -0500)]
integrity: wait for raid sync to complete

4 years agointegrity: avoid increasing logical block size of active LV
David Teigland [Tue, 16 Jun 2020 16:59:59 +0000 (11:59 -0500)]
integrity: avoid increasing logical block size of active LV

When adding integrity to an active LV, avoid choosing an
integrity block size that would result in increasing the
logical block size of the LV.

4 years agotests: integrity and block size
David Teigland [Mon, 15 Jun 2020 19:08:28 +0000 (14:08 -0500)]
tests: integrity and block size

4 years agoimprove get_fs_block_size string to number
David Teigland [Thu, 11 Jun 2020 20:05:47 +0000 (15:05 -0500)]
improve get_fs_block_size string to number

4 years agotests: fix typo in writecache-blocksize
David Teigland [Thu, 11 Jun 2020 18:15:38 +0000 (13:15 -0500)]
tests: fix typo in writecache-blocksize

4 years agotests: expand integrity-blocksize
David Teigland [Thu, 11 Jun 2020 17:46:47 +0000 (12:46 -0500)]
tests: expand integrity-blocksize

4 years agointegrity: fix block size check when inactive
David Teigland [Thu, 11 Jun 2020 17:43:52 +0000 (12:43 -0500)]
integrity: fix block size check when inactive

Checking fs block size requires the LV to be active.

4 years agofix libblkid BLOCK_SIZE check
David Teigland [Thu, 11 Jun 2020 17:43:07 +0000 (12:43 -0500)]
fix libblkid BLOCK_SIZE check

4 years agotests: writecache tests
David Teigland [Wed, 10 Jun 2020 21:08:28 +0000 (16:08 -0500)]
tests: writecache tests

backport updates from later commits

4 years agowritecache: activate to check block size
David Teigland [Wed, 10 Jun 2020 20:58:25 +0000 (15:58 -0500)]
writecache: activate to check block size

backport fixes from later commit

4 years agowritecache: allow snapshot of LV with writecache
David Teigland [Mon, 13 Apr 2020 20:58:28 +0000 (15:58 -0500)]
writecache: allow snapshot of LV with writecache

4 years agofix bad result from _cache_min_metadata_size
David Teigland [Fri, 10 Apr 2020 21:57:12 +0000 (16:57 -0500)]
fix bad result from _cache_min_metadata_size

fixes regression from switching to use _cache_min_metadata_size
(commit c08704cee7e34a96fdaa453faf900683283e8691) which returns
a bogus value when the cachevol size is 8MB.

4 years agotests: writecache-blocksize
David Teigland [Wed, 8 Apr 2020 20:33:30 +0000 (15:33 -0500)]
tests: writecache-blocksize

4 years agowritecache: add settings cleaner and max_age
David Teigland [Tue, 31 Mar 2020 19:14:50 +0000 (14:14 -0500)]
writecache: add settings cleaner and max_age

available in dm-writecache 1.2

4 years agowritecache: attach while active using fs block size
David Teigland [Mon, 30 Mar 2020 21:25:15 +0000 (16:25 -0500)]
writecache: attach while active using fs block size

Use libblkid to detect sector/block size of the fs on the LV.
Use this to choose a compatible writecache block size.
Enable attaching writecache to an active LV.

4 years agowritecache: cachesettings in lvchange and lvs
David Teigland [Wed, 26 Feb 2020 20:47:29 +0000 (14:47 -0600)]
writecache: cachesettings in lvchange and lvs

lvchange --cachesettings
lvs -o+cache_settings

4 years agowritecache: show error in lv_health_status and lv_attr
David Teigland [Tue, 25 Feb 2020 22:20:05 +0000 (16:20 -0600)]
writecache: show error in lv_health_status and lv_attr

lv_attr is 'E' and lv_health_status is 'error'
when dm-writecache status reports error.

4 years agowritecache: remove from an active lv
David Teigland [Mon, 24 Feb 2020 19:52:12 +0000 (13:52 -0600)]
writecache: remove from an active lv

4 years agoblkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo
Peter Rajnoha [Mon, 8 Jun 2020 13:41:35 +0000 (15:41 +0200)]
blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo

4 years agoimprove info about vgck updatemetadata
David Teigland [Wed, 3 Jun 2020 17:38:27 +0000 (12:38 -0500)]
improve info about vgck updatemetadata

Add man page info about this option, and add log messages
pointing to this option.

4 years agoChange dev->bcache_fd default value from 0 to -1
Zhao Heming [Mon, 1 Jun 2020 17:22:15 +0000 (12:22 -0500)]
Change dev->bcache_fd default value from 0 to -1

This fix can avoid bcache_fd will mistakenly open/close in later.

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
4 years agoRevert "pvck: dump headers_only to skip metadata text"
David Teigland [Fri, 29 May 2020 18:26:43 +0000 (13:26 -0500)]
Revert "pvck: dump headers_only to skip metadata text"

This reverts commit 5410dd5441aa827b381ff64dfc6be6e4589d87a1.

Accidental push.

4 years agointegrity: skip calling add when removing images
David Teigland [Fri, 29 May 2020 18:18:24 +0000 (13:18 -0500)]
integrity: skip calling add when removing images

When lvconvert is used to remove raid images, we can
skip calling lv_add_integrity_to_raid(), which finds
nothing to do, but the the blocksize validation would
be called unnecessarily and trigger spurious errors.

4 years agotests: integrity wait for sync
David Teigland [Fri, 29 May 2020 15:57:56 +0000 (10:57 -0500)]
tests: integrity wait for sync

The test was using a raid+integrity LV without
first waiting for the integrity sync, which could
cause the test to fail (depending on init speed)
where it depends on integrity to work in uninitialized
areas.

Also use cmp instead of diff.

4 years agopvck: dump headers_only to skip metadata text
David Teigland [Thu, 28 May 2020 20:51:59 +0000 (15:51 -0500)]
pvck: dump headers_only to skip metadata text

pvck --dump headers reads the metadata text area
to compute the text metadata checksum to compare
with the mda_header checksum.
The new header_only will skip reading the metadata
text and not validate the mda_header checksum.

4 years agotest: Warn and exit on problematic integrity device behavior
Marian Csontos [Thu, 28 May 2020 15:04:35 +0000 (17:04 +0200)]
test: Warn and exit on problematic integrity device behavior

The first leg of integrity enabled raid device sometimes does not get
recalculated.

4 years agolvconvert: error when using existing cachevol
David Teigland [Fri, 22 May 2020 18:44:33 +0000 (13:44 -0500)]
lvconvert: error when using existing cachevol

Check if LV is an existing cachevol before attempting
to use it again as a cachevol or cachepool.

4 years agotests: also udev wait on clean-up path
Zdenek Kabelac [Thu, 21 May 2020 13:19:31 +0000 (15:19 +0200)]
tests: also udev wait on clean-up path

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