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

13030 Commits

Author SHA1 Message Date
Alasdair G Kergon
de7f1deb80 raid: Report supported lvconvert conversions if invalid. 2016-08-07 00:30:26 +01:00
Alasdair G Kergon
6f236c3353 raid: Add workaround to prepare for raid4 conversions. 2016-08-07 00:07:06 +01:00
Alasdair G Kergon
ba0c26a078 raid: Pass list of LVs to remove into more fns. 2016-08-06 23:46:45 +01:00
Alasdair G Kergon
30884208d4 raid: Move two functions. 2016-08-06 23:29:27 +01:00
Heinz Mauelshagen
802bd34562 WHATS_NEW: fixup order 2016-08-05 16:31:46 +02:00
Heinz Mauelshagen
8f25ad6416 raid_manip: fix log print format from commit d2c3b23e6d 2016-08-05 16:29:56 +02:00
Heinz Mauelshagen
9aefe9aa7a WHATS_NEW: add '--rebuild PV' option to lvchange to allow for PV selective rebuilds 2016-08-05 16:07:14 +02:00
Heinz Mauelshagen
d2c3b23e6d lvchange: Allow device specification when requesting a repair
'lvchange --resync LV' or 'lvchange --syncaction repair LV' request the
RAID layout specific parity blocks in raid4/5/6 to be recreated or the
mirrored blocks to be copied again from the master leg/copy for raid1/10,
thus not allowing a rebuild of a particular PV.

Introduce repeatable option '--[raid]rebuild PV' to allow to request
rebuilds of specific PVs in a RaidLV which are known to contain corrupt
data (e.g. rebuild a raid1 master leg).

Add test lvchange-rebuild-raid.sh to test/shell doing rebuild
variations on raid1/10 and 5; add aux function check_status_chars
to support the new test.

 - Resolves rhbz1064592
2016-08-05 16:01:46 +02:00
Alasdair G Kergon
91f866f786 raid: Tell lib whether stripesize was specified 2016-08-05 14:28:14 +01:00
Alasdair G Kergon
7482ff93b8 raid: Turn lv_raid_change_image_count into wrapper
Eventually the separate entry point will disappear.
2016-08-05 14:17:54 +01:00
Alasdair G Kergon
b66fa91c46 segtypes: Further segtype macros. 2016-08-05 14:00:40 +01:00
Alasdair G Kergon
b1b0b134ec raid0: Validate presence of raid0 meta_areas more tightly. 2016-08-04 21:15:07 +01:00
David Teigland
d1a25fe597 lvconvert: add FIXME
operations are no longer identified correctly.
2016-08-04 13:01:48 -05:00
Alasdair G Kergon
4a15abe865 striped: Add precise macros for original segtype.
The existing striped macros include raid0 segments.
2016-08-04 01:24:39 +01:00
Alasdair G Kergon
5c3141a8b9 lvconvert: Improve error message when no -m. 2016-08-03 23:43:59 +01:00
David Teigland
be497175e0 man: minor corrections in pvscan 2016-08-03 15:49:43 -05:00
David Teigland
2b01dca28a man: include info about disabled lvmetad 2016-08-03 15:42:12 -05:00
Alasdair G Kergon
8b1a368b59 lvconvert: Provide entry point for new functionality.
Prepare for new segment type conversion functionality in cases that
currently fail.  In the short-term, we need to do this while limiting
the changes to the code paths for the conversions that are already
supported.
2016-08-03 03:53:29 +01:00
Alasdair G Kergon
fdc3fcbfce lvconvert: Pass region_size to lv_raid_convert. 2016-08-02 23:51:20 +01:00
Alasdair G Kergon
a234cebbed lvconvert: Preserve mirror region size with --repair. 2016-08-02 19:50:04 +01:00
Alasdair G Kergon
415c5fd5d8 lvconvert: Divide into 12 categories. 2016-08-02 16:44:21 +01:00
Alasdair G Kergon
6361bc4734 lvconvert: Treat --repair as an independent case. 2016-08-02 16:22:12 +01:00
Alasdair G Kergon
804a397643 lvconvert: Forbid stripe parameters with --repair. 2016-08-02 15:59:12 +01:00
Heinz Mauelshagen
d0d03f315b vg_validate: correct min_recovery_rate check message 2016-08-02 15:27:13 +02:00
Heinz Mauelshagen
5765a28456 vg_validate: new RAID segment checks in check_lv_segments()
introduced with commit 8f62b7bfe5 rely on complete
             defintions of the relations between the LVs of a VG.
             Hence only run these checks when the complete_vg flag
             is set on calls to check_lv_segments().

             lvconvert failed in test lvconvert-thin-raid.sh when
             calling check_lv_segments() from _read_segments() without
             providing a complete definition.
2016-08-01 22:42:05 +02:00
Alasdair G Kergon
c490be9134 Revert "thin: when converting a thin pool data or metadata LV from"
This reverts commit 237f84e038.

This case failed:
    lvcreate --type raid1 -m1 -l2 vg99
    lvcreate -aey -l2 -s vg99/lvol0
    lvconvert -m2 vg99/lvol0
2016-08-01 15:17:44 +01:00
Alasdair G Kergon
d0df1ff995 lvconvert: Set lp->segtype in only one place. 2016-07-30 18:20:04 +01:00
Alasdair G Kergon
1ce958bc5e lvconvert: Rely upon lp->thin and lp->cache. 2016-07-30 15:58:09 +01:00
Alasdair G Kergon
48d9c46daa lvconvert: Fix --type thin recognition.
lp->thin already holds the result of the cmdline arg resolution.
2016-07-30 15:08:50 +01:00
Alasdair G Kergon
52d2fa7022 tools: Also recognise segtype with thin and cache.
(--type thin still needs this for lvcreate - more logic should be
shared between lvcreate and lvconvert)
2016-07-30 04:12:58 +01:00
Alasdair G Kergon
d1ff254c3c tools: mirror also supports stripesize 2016-07-30 03:52:49 +01:00
Alasdair G Kergon
b3fbcd1ff7 lvconvert: Move stripe validation code later.
Simpler to delay it all until the actual LV being changed is available,
rather than having it split in two parts.
2016-07-30 02:52:06 +01:00
Alasdair G Kergon
4ffe15bf6a tools: Unify stripesize parameter validation.
Move it all into get_stripe_params().
Some code paths missed --stripesize checks.
E.g. lvcreate --type raid4 -i1
2016-07-30 02:05:50 +01:00
Alasdair G Kergon
d01b1b6cc1 lvconvert: Rearrange code that decides segtype. 2016-07-30 00:22:13 +01:00
Alasdair G Kergon
a8e4790810 lvconvert: Only obtain --type parameter once. 2016-07-29 21:45:22 +01:00
Alasdair G Kergon
800c0d3dd6 lvconvert: Remove hard-coded segment names. 2016-07-29 21:11:12 +01:00
Heinz Mauelshagen
237f84e038 thin: when converting a thin pool data or metadata LV from
linear to raid1, the linear wasnt't switched to the
      raid1 mapping, thus creating the false impression of
      resilience.
2016-07-29 19:17:12 +02:00
Alasdair G Kergon
6b6e258e0c post-release 2016-07-28 19:58:22 +01:00
Alasdair G Kergon
6f47e79a88 pre-release 2016-07-28 18:36:45 +01:00
Heinz Mauelshagen
a579ba2ac2 vgsplit: ea90a3d622 added an unconditional call to lv_is_on_pvs()
on any thin snap external origin LV which caused a segfault
         when none existed as exposed by the vgsplit-thin.sh test.

         Only call lv_is_on_pvs() if an external origin LV actually
         exists and correct the related splitting logic.
2016-07-28 18:35:33 +02:00
Tony Asleson
4bc351d658 lvmdbusd: Add '-y' to lvconvert for lv cache create
When converting to a cache lv, tests were hanging with a prompt for
"Do you want wipe existing metadata of cache pool volume
To preserve cache metadata add option "--zero n".
WARNING: Reusing mismatched cache pool metadata MAY DESTROY YOUR DATA!"

This is new.
2016-07-28 11:13:29 -05:00
Tony Asleson
20b21f4fd8 lvmdbusd: Fix hang for Job.Wait(n)
When a client is doing a wait on a job, any other clients will hang
when trying to do anything with the service.  This is caused by
the wait code which  was placing the thread that handles
incoming dbus requests to sleep until either the timeout expired or
the job operation completed.

This change creates a thread for the wait request, so that the thread
processing incoming requests can continue to run.
2016-07-28 11:13:29 -05:00
Heinz Mauelshagen
8d959b6c75 man: lvcreate correction on --stripes explanation and examples
with respect to the changed, configurable default behaviour
     introduced with commit 7eb7909193.

     E.g. raid default of 2 stripes rather than number of PVs in the VG
     or on the command line minus one.
2016-07-28 17:34:42 +02:00
Zdenek Kabelac
02ddd48c11 tests: updates for new raid allocation logic
(with backward compatible settings user as well to check old logic
is still available when needed).
2016-07-28 16:37:20 +02:00
Zdenek Kabelac
edb5d12463 config: keep new setting commented out 2016-07-28 15:08:11 +02:00
Heinz Mauelshagen
43f4555893 vg_validate: only reject min_recovery_rate in case max_recovery_rate is set and smaller 2016-07-27 23:20:58 +02:00
Heinz Mauelshagen
d46de28a6c vg_validate: add missing check for raid6 segment types 2016-07-27 23:14:46 +02:00
Heinz Mauelshagen
df02917d7e vg_validate: fix seg->extents_copied check introduced with
commit 8f62b7bfe5 and add comment for the member
             to 'struct lv_segment'
2016-07-27 23:09:54 +02:00
David Teigland
ea90a3d622 vgsplit: restore check for thin pool external origin
Fix a regression from commit 4420d41f, in which the
check was skipped for splitting a thin pool and an
external origin.
2016-07-27 14:00:57 -05:00
David Teigland
17fb64b569 man: lvmthin clean up syntax example
The syntax for converting an LV to a thin LV
included an unnecessary --thin option.  I was
probably still confused about these options
when writing this.
2016-07-27 13:13:59 -05:00