Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=05aceaffbd184c6b5d892…
Commit: 05aceaffbd184c6b5d892d92a6c4d9db182da8f8
Parent: f4b30b0daef3bac7f775dff29c21ac47fe5d82a7
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Tue Mar 7 21:36:03 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Tue Mar 7 21:36:03 2017 +0100
lvconvert: adjust --stripes on raid10 convert
For the time being raid10 is limited to even number of total stripes
as is and 2 data copies. The number of stripes provided on creation
of a raid10(_near) LV with -i/--stripes gets doubled to define
that even total number of stripes (i.e. images).
Apply the same on disk adding conversions (reshapes) with
"lvconvert --stripes RaidLV" (e.g. 2 stripes = 4 images
total converted to 3 stripes = 6 images total).
Related: rhbz834579
Related: rhbz1191935
Related: rhbz1191978
---
lib/metadata/raid_manip.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 6cc1c12..1a4a860 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -5878,7 +5878,7 @@ int lv_raid_convert(struct logical_volume *lv,
struct dm_list *allocate_pvs)
{
struct lv_segment *seg = first_seg(lv);
- uint32_t stripes, stripe_size;
+ uint32_t stripes = new_stripes, stripe_size;
uint32_t new_image_count = seg->area_count;
uint32_t region_size = new_region_size;
uint32_t data_copies = seg->data_copies;
@@ -5890,7 +5890,10 @@ int lv_raid_convert(struct logical_volume *lv,
return 0;
}
- stripes = new_stripes ? : _data_rimages_count(seg, seg->area_count);
+ if (seg_is_raid10(seg))
+ stripes *= 2;
+
+ stripes = stripes ? : _data_rimages_count(seg, seg->area_count);
/* FIXME Ensure caller does *not* set wrong default value! */
/* Define new stripe size if not passed in */
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=872932a0fb31af4bb52b5…
Commit: 872932a0fb31af4bb52b575157bc7f93025bfd59
Parent: 0b019c5406c27edfd00b502a95cb57e198c949a8
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Mon Mar 6 19:33:10 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Mon Mar 6 19:33:10 2017 +0100
man lvs: describe new 'R' volume health character
---
man/lvs.8.end | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/man/lvs.8.end b/man/lvs.8.end
index d71f7c1..ff92148 100644
--- a/man/lvs.8.end
+++ b/man/lvs.8.end
@@ -56,6 +56,7 @@ Inconsistencies are detected by initiating a "check" on a RAID logical volume.
(The scrubbing operations, "check" and "repair", can be performed on a RAID
logical volume via the 'lvchange' command.) (w)ritemostly signifies the
devices in a RAID 1 logical volume that have been marked write-mostly.
+(R)emove after reshape signifies freed striped raid images to be removed.
.IP
Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space,
(M)etadata read only.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0b019c5406c27edfd00b5…
Commit: 0b019c5406c27edfd00b502a95cb57e198c949a8
Parent: ef97360866d8a9221eb8d9b2d0e2f7e366bbd8ef
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Mar 6 12:01:11 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Mar 6 12:20:33 2017 -0600
man/help: improve stripes option wording
---
tools/args.h | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index 7c44256..7bb177d 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -974,15 +974,15 @@ arg(stripes_ARG, 'i', "stripes", number_VAL, 0, 0,
"Specifies the number of stripes in a striped LV. This is the number of\n"
"PVs (devices) that a striped LV is spread across. Data that\n"
"appears sequential in the LV is spread across multiple devices in units of\n"
- "the stripe size (see --stripesize). This does not apply to\n"
- "existing allocated space, only newly allocated space can be striped.\n"
+ "the stripe size (see --stripesize). This does not change existing\n"
+ "allocated space, but only applies to space being allocated by the command.\n"
"When creating a RAID 4/5/6 LV, this number does not include the extra\n"
"devices that are required for parity. The largest number depends on\n"
- "the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62.)\n"
- "When unspecified, the default depends on the RAID type\n"
+ "the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and\n"
+ "when unspecified, the default depends on the RAID type\n"
"(raid0: 2, raid10: 4, raid4/5: 3, raid6: 5.)\n"
- "When unspecified, to stripe across all PVs of the VG,\n"
- "set lvm.conf allocation/raid_stripe_all_devices=1.\n")
+ "To stripe a new raid LV across all PVs by default,\n"
+ "see lvm.conf allocation/raid_stripe_all_devices.\n")
arg(stripesize_ARG, 'I', "stripesize", sizekb_VAL, 0, 0,
"The amount of data that is written to one device before\n"
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ef97360866d8a9221eb8d…
Commit: ef97360866d8a9221eb8d9b2d0e2f7e366bbd8ef
Parent: 17838e6439f7cabfa4609dbfb48197d5a33138f8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Mar 6 11:27:56 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Mar 6 11:27:56 2017 -0600
man lvextend: mention segment type
---
man/lvextend.8.des | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/man/lvextend.8.des b/man/lvextend.8.des
index 346bd23..4c0575d 100644
--- a/man/lvextend.8.des
+++ b/man/lvextend.8.des
@@ -1,7 +1,10 @@
lvextend extends the size of an LV. This requires allocating logical
-extents from the VG's free physical extents. A copy\-on\-write snapshot LV
-can also be extended to provide more space to hold COW blocks. Use
-\fBlvconvert\fP(8) to change the number of data images in a RAID or
+extents from the VG's free physical extents. If the extension adds a new
+LV segment, the new segment will use the existing segment type of the LV.
+
+Extending a copy\-on\-write snapshot LV adds space for COW blocks.
+
+Use \fBlvconvert\fP(8) to change the number of data images in a RAID or
mirrored LV.
In the usage section below, \fB--size\fP \fISize\fP can be replaced