1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
Commit Graph

13098 Commits

Author SHA1 Message Date
Zdenek Kabelac
6dc4d03508 lvconvert: enable work with partial LVs
Fix printed message and enable handling of missing PVs.
2016-07-19 17:39:41 +02:00
David Teigland
f8872578e9 lvmetad: use committed metadata to update
This fixes a regression from commit a7c45ddc5, which moved
the lvmetad VG update from vg_commit() to unlock_vg().

The lvmetad VG update needs to send the version of metadata
that was committed rather than sending the state of struct 'vg'.
The 'vg' may have been partially modified since vg_commit(),
and contain non-committed metadata that shouldn't be sent
to lvmetad.
2016-07-18 16:18:53 -05:00
Heinz Mauelshagen
94207dfd68 lvconvert: raid0 replace attempt segfaults
Any failing stripes in raid0/raid0_meta type LVs cause data loss,
thus replacement via 'lvconvert --replace...' does not make sense.

Patch prohibits replacement on raid0/raid0_meta LVs.

- resolves rhbz1356734
2016-07-18 20:16:40 +02:00
Bryn M. Reeves
da49d4d54e dmstats: fix bounds leak in _do_stats_create_regions() (Coverity) 2016-07-18 18:48:34 +01:00
Bryn M. Reeves
d2bf6742f8 dmstats: check uuid, major, and alldevices before argc (Coverity)
The --uuid, --major and --alldevices arguments were incorrectly tested
after confirming argc is > 0, in a branch that only executes if argc
== 0 (i.e. they were unreachable).

Move all device checks before the test for argc and log an appropriate
error before returning.
2016-07-18 18:48:34 +01:00
Bryn M. Reeves
252952ff33 libdm: document use of dm_free() with histogram bounds 2016-07-18 18:48:34 +01:00
Bryn M. Reeves
da146ae9b9 dmstats: free bounds string in _stats_create_file() (Coverity) 2016-07-18 18:48:34 +01:00
Bryn M. Reeves
4ef1f34549 libdm: free hist_arg in _stats_create_file_regions() (Coverity) 2016-07-18 18:09:21 +01:00
David Teigland
4b4d467004 lvmetad: free memory on exit
This is unnecessary but it quiets complaints (valgrind).
2016-07-18 11:31:00 -05:00
Alasdair G Kergon
9c6a26f50a post-release 2016-07-15 22:02:58 +01:00
Alasdair G Kergon
3d717b52c1 pre-release 2016-07-15 21:55:38 +01:00
Alasdair G Kergon
c425cdd115 Revert "lvcreate: raid0 needs default number of stripes"
This reverts commit 3928c96a37.

A new setting is required in lvm.conf to control this.
2016-07-15 21:53:37 +01:00
David Teigland
081e569e14 man: drop lvmraid references from lvconvert 2016-07-15 15:08:02 -05:00
Zdenek Kabelac
e96d1ad3ef cleanup: local static functions with _ 2016-07-15 15:49:01 +02:00
Zdenek Kabelac
4de7a843eb coverity: close socket before closing app
Opened socket descriptor goes out-of-sight still opened.
Close it - but since this happens before app exit, it
just fixed valgrind report.
2016-07-15 15:49:01 +02:00
Zdenek Kabelac
d2bb19e883 tests: check fail path on cache creation 2016-07-15 15:49:01 +02:00
Zdenek Kabelac
a57bf37cdb tests: require better cache driver
Version 1.4 can't handle this test without killing itself.
2016-07-15 15:49:01 +02:00
Alasdair G Kergon
12925d8b70 string: Add first_substring(). 2016-07-14 14:46:38 +01:00
Alasdair G Kergon
5af311ddd8 macros: Add lv_is_not_synced. 2016-07-14 14:21:01 +01:00
Peter Rajnoha
07be2b864f lvmdump: include major and minor numbers for pvs and lvs reports
Including major and minor numbers in pvs and lvs output when calling
lvmdump -a makes it a bit easier to match these items with possible
system log/journal.
2016-07-14 14:33:33 +02:00
Zdenek Kabelac
4e1bf7acd3 coverity: add some tests for function results
Even though they cannot normally happen...
2016-07-13 21:52:14 +02:00
Zdenek Kabelac
4661c6b6fb coverity: cleaning some PW.NOT_COMPATIBLE_WITH_PREVIOUS_DECL
Some very low-prio warns....
2016-07-13 21:52:14 +02:00
Zdenek Kabelac
bbf574ab90 coverity: easier to follow set-up of vsn variable
Helping coverity to see 'vsn' really can't be NULL.
2016-07-13 21:52:14 +02:00
Zdenek Kabelac
0b773eecd9 tests: skip more cache tests for older driver 2016-07-13 21:52:14 +02:00
Zdenek Kabelac
07587c2699 tests: resize of filesystem
Test for https://bugzilla.redhat.com/1354396
2016-07-13 21:52:14 +02:00
Zdenek Kabelac
deb6f6a06c cleanup: add some dots to messages 2016-07-13 21:52:14 +02:00
Zdenek Kabelac
e1112227d1 lvresize: fix zero size extension
Commit ca878a3426 changed behavior
or resize operation. Later the code has been futher changed
to skip fs resize completely when size of LV is already matching
and finaly at the most recent resize changeset for resize the
check for matching size has been eliminated as well so we ended
with a request call to resize fs to 0 size in some cases.

This commit reoders some test so the prompt happens just once before
resize of possibly 2 related volumes.

Also extra test for having LV already given size is added, and
whole metadata update is skipped for this case as the only
result would be an increment of seqno.

However the filesystem is still resized when requested,
so if the LV has some size and the resize is resolved to
the same size, the filesystem resize is called so in case FS
would not match, the resize will happen.
2016-07-13 21:52:04 +02:00
Heinz Mauelshagen
3928c96a37 lvcreate: raid0 needs default number of stripes
raid0/raid0_meta type LVs don't have a default number of stripes when
created without '-i/--stripes Stripes' whereas other raid types have one.

Patch sets the default for raid0/raid0_meta to 2 stripes.

The default amount of stripes for raid4/5/10 is changed to 2 and for raid6 to 3
rather than using all PVs in the VG or those provided on the command line.

This is to avoid unintended high number of stripes in case of many PVs.

To select a different amount of stripes from the default,
use 'lvcreate -i/--stripes Stripes'.

- resolves rhbz1354650
2016-07-13 21:45:49 +02:00
David Teigland
26f3b321f9 man: changes to lvconvert
Generally include more information about options.
2016-07-13 13:13:05 -05:00
Heinz Mauelshagen
df5021a201 lv_manip: extension of raid0 causes livelock
A livelock occurs on extension in lv_manip when adjusting the region size,
which doesn't apply to any raid0/raid0_meta LVs (these don't have a bitmap).

Fix by prohibiting the region size adjustment on any such LVs.

- resolves rhbz1354604
2016-07-13 15:17:24 +02:00
Heinz Mauelshagen
9c27573493 raid_manip: 'vgreduce --removemissing --force ...' segfaults on raid0 LV
An unconditional access to the non-existing MetaLV of a raid0 LV in
lv_raid_remove_missing() was causing the segfault.

Only call log_debug() on replacements of existing MetaLVs.

- resolves rhbz1354646
2016-07-12 17:55:01 +02:00
Heinz Mauelshagen
c77c59f3d9 lvchange: resync attempts on raid0 cause segfaults
Resync attempts on raid0/raid0_meta via 'lvchange --resync ...'
cause segfaults.

'lvchange --syncaction ...' doesn't get rejected either.

Prohibit both on raid0/raid0_meta LVs.

- resolves rhbz1354656
2016-07-12 17:23:05 +02:00
David Teigland
dcbcc65dc2 Revert "man: restore lost synopsis for lvconvert"
This reverts commit 80394ae7cd.

Anything that was missing or in error will be handled differently.
2016-07-12 09:48:59 -05:00
Heinz Mauelshagen
c32f96f277 vgsplit: use dm_list_next() 2016-07-12 16:25:12 +02:00
Heinz Mauelshagen
4ca55192e0 vgsplit: temporary list pointer may be invalid
4420d41fea introduced recursive split of lvs which
splits a top-level LV together with it's sub LVs.

This lead to invalid temporary list pointers
causing hangs/OOM situations.

Patch updates the temporary list pointer
referencing a moved sub LV.

- resolves rhbz1354686
2016-07-12 16:15:32 +02:00
Peter Rajnoha
d5be748341 man: lvcreate: try to be clearer about -W|--wipesignatures
There was still some confusion report about -W|--wipesignatures
lvcreate option so try to be even clearer. Hopefully, the last edit
here.
2016-07-12 15:23:29 +02:00
Zdenek Kabelac
957480f4b9 tests: remove more test
Try to remove more tests before confusing older driver to death.
2016-07-12 13:20:56 +02:00
Zdenek Kabelac
1891fa8272 tests: cache error message changes too often
Until lvconvert stabilize, avoid testing resulting error message.
2016-07-12 13:20:56 +02:00
Zdenek Kabelac
80394ae7cd man: restore lost synopsis for lvconvert
Synopsis are very useful for quick orientation and also
we provide then for all remaining command.

Also list ALL supported options in a single ordered list,
user should not seek for them.
2016-07-12 13:20:56 +02:00
Zdenek Kabelac
5254971418 cleanup: lvconvert display_lvname and indent updates
Use display_lvname() for printing vg/lv names.
Add some missing dots.
Some indents.
2016-07-12 13:20:20 +02:00
Zdenek Kabelac
fd53d86eea cleanup: gcc warns removal
Ensure vars have always defined value.
2016-07-12 10:39:33 +02:00
Peter Rajnoha
42e76a1920 blkdeactivate: add -m|--mpathoption disablequeueing and use it for blk-availability systemd service and initscript
blkdeactivate -m disablequeueing causes "multipathd disablequeueing maps"
call inside blkdeactivate script before deactivating devices. This
avoids a situation where blkdeactivate may wait for paths to appear if
multipath is set to queueing and there's a stack of other devices and/or
mount points on top of such multipath device.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1344381.
2016-07-12 10:01:07 +02:00
David Teigland
9f7e8f22dc lvconvert: remove some FIXME comments 2016-07-11 10:29:10 -05:00
David Teigland
c526c327d7 man: lvconvert changes 2016-07-11 10:29:07 -05:00
Zdenek Kabelac
06a9dab730 tests: skip some tests for older cache driver
Cache target 1.4 on f19 kernel shows error, skipping some tests...
2016-07-11 15:45:28 +02:00
Zdenek Kabelac
6336b5dedf tests: reduce amount of pvcreates
Reduce number of evualted pvcreate commands.
Since 0 is default value used to fill missing params,
and 0 is also 1st. value in array, it's being tested.

Drop unused data_alignment_offset.
2016-07-11 15:29:28 +02:00
Zdenek Kabelac
8756297a8d tests: increase max lines for clvmd
Clvmd is a bit more verbose long time running process so
let it live with more logged lines.

Also fix typo in warn message from last commit.
2016-07-11 14:45:25 +02:00
Zdenek Kabelac
34c55d98ee tests: add LVM_LOG_FILE_MAX_LINES
When logging to epoch files we would like to prevent creating too large
log files otherwise a spining command could fulfill available space
very easily and quickly.

Limit for to 100000 per command.
2016-07-11 12:43:28 +02:00
Bryn M. Reeves
309bdfa224 libdm: add configure.in checks for fiemap.h and magic.h 2016-07-08 23:42:32 +01:00
Bryn M. Reeves
61cb58e549 libdm: use 'goto_bad' if extent pool allocation fails
Generate a backtrace if unable to extend the extent table.
2016-07-08 22:28:50 +01:00