master - lvconvert: better message on --regionsize
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9a20c0a0aff98cce9df...
Commit: 9a20c0a0aff98cce9df1958b64a552f23a3149b9
Parent: f5b0697c0535a532aa81bcf78e59fb6d7cdd9fe0
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Wed Apr 12 19:31:02 2017 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Wed Apr 12 19:31:20 2017 +0200
lvconvert: better message on --regionsize
Enhance message on "lvconvert --regionsize size RaidLV".
in case the regionsize does not change and return error.
---
lib/metadata/raid_manip.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index b58ba2d..60de51e 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -5792,9 +5792,10 @@ static int _region_size_change_requested(struct logical_volume *lv, int yes, con
return_0;
if (region_size == seg->region_size) {
- log_print_unless_silent("Region size wouldn't change on %s LV %s.",
+ log_print_unless_silent("Region size is already %s on %s LV %s.",
+ display_size(lv->vg->cmd, region_size),
lvseg_name(seg), display_lvname(lv));
- return 1;
+ return 0;
}
if (!_check_region_size_constraints(lv, seg->segtype, region_size, seg->stripe_size))
7 years
master - WHATS_NEW_DM: add recent dmsetup and dmfilemapd entries
by Bryn Reeves
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f5b0697c0535a532aa8...
Commit: f5b0697c0535a532aa81bcf78e59fb6d7cdd9fe0
Parent: ba12a2e81a319c22353c8e52bf29f55c924b2d9f
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Wed Apr 12 17:41:29 2017 +0100
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Wed Apr 12 17:41:29 2017 +0100
WHATS_NEW_DM: add recent dmsetup and dmfilemapd entries
---
WHATS_NEW_DM | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 7afeb5e..23f3ce5 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,9 @@
Version 1.02.139 -
==================================
+ Flush stdout on each iteration when using --count or --interval.
+ Show detailed error message when execvp fails while starting dmfilemapd.
+ Fix segmentation fault when dmfilemapd is run with no arguments.
+ Numerous minor dmfilemapd fixes from coverity.
Version 1.02.138 - 28th March 2017
==================================
7 years
master - Typo: change loose to lose
by Jonathan Brassow
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ba12a2e81a319c22353...
Commit: ba12a2e81a319c22353c8e52bf29f55c924b2d9f
Parent: 532388fad510c7ba706ecbd4b5fbd2643134d63b
Author: Jonathan Brassow <jbrassow(a)redhat.com>
AuthorDate: Wed Apr 12 10:28:19 2017 -0500
Committer: Jonathan Brassow <jbrassow(a)redhat.com>
CommitterDate: Wed Apr 12 10:28:19 2017 -0500
Typo: change loose to lose
loose (v): set free; release
lose (v) : be deprived of or cease to have or retain
We 'lose' redundancy or 'lose' meaning.
---
daemons/cmirrord/cluster.c | 2 +-
lib/metadata/raid_manip.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/daemons/cmirrord/cluster.c b/daemons/cmirrord/cluster.c
index e196eb2..94be563 100644
--- a/daemons/cmirrord/cluster.c
+++ b/daemons/cmirrord/cluster.c
@@ -182,7 +182,7 @@ int cluster_send(struct clog_request *rq)
}
/*
- * Once the request heads for the cluster, the luid looses
+ * Once the request heads for the cluster, the luid loses
* all its meaning.
*/
rq->u_rq.luid = 0;
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 9614179..b58ba2d 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -2932,7 +2932,7 @@ static int _raid_remove_images(struct logical_volume *lv, int yes,
/* Convert to linear? */
if (new_count == 1) {
- if (!yes && yes_no_prompt("Are you sure you want to convert %s LV %s to type %s loosing all resilience? [y/n]: ",
+ if (!yes && yes_no_prompt("Are you sure you want to convert %s LV %s to type %s losing all resilience? [y/n]: ",
lvseg_name(first_seg(lv)), display_lvname(lv), SEG_TYPE_NAME_LINEAR) == 'n') {
log_error("Logical volume %s NOT converted to \"%s\".",
display_lvname(lv), SEG_TYPE_NAME_LINEAR);
@@ -3072,9 +3072,9 @@ int lv_raid_split(struct logical_volume *lv, int yes, const char *split_name,
return 0;
}
- /* Split on a 2-legged raid1 LV causes loosing all resilience */
+ /* Split on a 2-legged raid1 LV causes losing all resilience */
if (new_count == 1 &&
- !yes && yes_no_prompt("Are you sure you want to split %s LV %s loosing all resilience? [y/n]: ",
+ !yes && yes_no_prompt("Are you sure you want to split %s LV %s losing all resilience? [y/n]: ",
lvseg_name(first_seg(lv)), display_lvname(lv)) == 'n') {
log_error("Logical volume %s NOT split.", display_lvname(lv));
return 0;
@@ -3214,9 +3214,9 @@ int lv_raid_split_and_track(struct logical_volume *lv,
return 0;
}
- /* Split and track changes on a 2-legged raid1 LV causes loosing resilience for newly written data. */
+ /* Split and track changes on a 2-legged raid1 LV causes losing resilience for newly written data. */
if (seg->area_count == 2 &&
- !yes && yes_no_prompt("Are you sure you want to split and track %s LV %s loosing resilience for any newly written data? [y/n]: ",
+ !yes && yes_no_prompt("Are you sure you want to split and track %s LV %s losing resilience for any newly written data? [y/n]: ",
lvseg_name(seg), display_lvname(lv)) == 'n') {
log_error("Logical volume %s NOT split.", display_lvname(lv));
return 0;
7 years
master - lvconvert: fix failing valid regionsize change
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=532388fad510c7ba706...
Commit: 532388fad510c7ba706ecbd4b5fbd2643134d63b
Parent: 01b5820d03c41516222675eb458ce6eb3dff53a7
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Wed Apr 12 14:38:49 2017 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Wed Apr 12 14:38:49 2017 +0200
lvconvert: fix failing valid regionsize change
Reshape check failed when regionsize changed and current raid type
was provided with no other change requested (stripes or stripesize).
E.g. "lvconvert --type raid6 --regionsize 256K" on a raid6 LV
with != 256K regionsize.
Enable --type in test script.
---
lib/metadata/raid_manip.c | 10 ++++------
test/shell/lvconvert-raid-regionsize.sh | 2 +-
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index f99788f..9614179 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -2389,7 +2389,7 @@ static int _reshape_requested(const struct logical_volume *lv, const struct segm
if (seg_is_any_raid10(seg) && seg->area_count > 2 &&
stripes && stripes < seg->area_count - seg->segtype->parity_devs) {
log_error("Can't remove stripes from raid10");
- goto err;
+ return 2;
}
if (data_copies != seg->data_copies) {
@@ -2400,22 +2400,20 @@ static int _reshape_requested(const struct logical_volume *lv, const struct segm
/* Change layout (e.g. raid5_ls -> raid5_ra) keeping # of stripes */
if (seg->segtype != segtype) {
if (stripes && stripes != _data_rimages_count(seg, seg->area_count))
- goto err;
+ return 2;
return 1;
}
if (stripes && stripes == _data_rimages_count(seg, seg->area_count) &&
- stripe_size == seg->stripe_size) {
+ stripe_size == seg->stripe_size &&
+ region_size == seg->region_size) {
log_error("LV %s already has %u stripes.",
display_lvname(lv), stripes);
return 2;
}
return (stripes || stripe_size) ? 1 : 0;
-
-err:
- return 2;
}
/*
diff --git a/test/shell/lvconvert-raid-regionsize.sh b/test/shell/lvconvert-raid-regionsize.sh
index 9baa99a..7a6c7f0 100644
--- a/test/shell/lvconvert-raid-regionsize.sh
+++ b/test/shell/lvconvert-raid-regionsize.sh
@@ -27,7 +27,7 @@ function _test_regionsize
local vg=$4
local lv=$5
- lvconvert --yes -R $regionsize $vg/$lv
+ lvconvert --type $type --yes -R $regionsize $vg/$lv
[ $? -ne 0 ] && return 1
check lv_field $vg/$lv regionsize "$regionsize_str"
fsck -fn "$DM_DEV_DIR/$vg/$lv"
7 years
master - lvconvert: add segment type raid10_near
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=01b5820d03c41516222...
Commit: 01b5820d03c41516222675eb458ce6eb3dff53a7
Parent: 7bc85177b08c7a6f4f0c3384c8d05b9089267c14
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Wed Apr 12 01:28:22 2017 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Wed Apr 12 01:28:22 2017 +0200
lvconvert: add segment type raid10_near
Introducing this alias for "raid10", avoid allocating
reshape space when converting between them.
Resolves: rhbz1441347
---
lib/metadata/raid_manip.c | 27 +++++++++++++++++++++++----
lib/metadata/segtype.h | 10 ++++++----
lib/raid/raid.c | 1 +
libdm/libdm-deptree.c | 1 +
4 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 4662736..f99788f 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1976,6 +1976,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
* Reshape: keep images in RAID @lv but change stripe size or data copies
*
*/
+static const char *_get_segtype_alias(const struct segment_type *segtype);
static int _raid_reshape_keep_images(struct logical_volume *lv,
const struct segment_type *new_segtype,
int yes, int force, int *force_repair,
@@ -1995,8 +1996,6 @@ static int _raid_reshape_keep_images(struct logical_volume *lv,
return 0;
}
- seg->stripe_size = new_stripe_size;
-
/*
* Reshape layout alogorithm or chunksize:
*
@@ -2010,8 +2009,22 @@ static int _raid_reshape_keep_images(struct logical_volume *lv,
* The dm-raid target is able to use the space whereever it
* is found by appropriately selecting forward or backward reshape.
*/
- if (seg->area_count != 2 &&
- alloc_reshape_space &&
+ if (seg->segtype != new_segtype) {
+ const char *alias = _get_segtype_alias(seg->segtype);
+
+ if (!strcmp(alias, new_segtype->name))
+ alloc_reshape_space = 0;
+ }
+
+ if (seg->stripe_size != new_stripe_size)
+ alloc_reshape_space = 1;
+
+ seg->stripe_size = new_stripe_size;
+
+ if (seg->area_count == 2)
+ alloc_reshape_space = 0;
+
+ if (alloc_reshape_space &&
!_lv_alloc_reshape_space(lv, where, NULL, allocate_pvs))
return 0;
@@ -4411,6 +4424,12 @@ static const char *_get_segtype_alias(const struct segment_type *segtype)
if (!strcmp(segtype->name, SEG_TYPE_NAME_RAID6_ZR))
return SEG_TYPE_NAME_RAID6;
+ if (!strcmp(segtype->name, SEG_TYPE_NAME_RAID10))
+ return SEG_TYPE_NAME_RAID10_NEAR;
+
+ if (!strcmp(segtype->name, SEG_TYPE_NAME_RAID10_NEAR))
+ return SEG_TYPE_NAME_RAID10;
+
return "";
}
diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h
index 0eea6e6..93132c3 100644
--- a/lib/metadata/segtype.h
+++ b/lib/metadata/segtype.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2016 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2017 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -89,6 +89,7 @@ struct dev_manager;
#define SEG_TYPE_NAME_RAID0_META "raid0_meta"
#define SEG_TYPE_NAME_RAID1 "raid1"
#define SEG_TYPE_NAME_RAID10 "raid10"
+#define SEG_TYPE_NAME_RAID10_NEAR "raid10_near"
#define SEG_TYPE_NAME_RAID4 "raid4"
#define SEG_TYPE_NAME_RAID5 "raid5"
#define SEG_TYPE_NAME_RAID5_N "raid5_n"
@@ -137,11 +138,12 @@ struct dev_manager;
#define segtype_is_raid6_rs_6(segtype) ((segtype)->flags & SEG_RAID6_RS_6 ? 1 : 0)
#define segtype_is_raid6_la_6(segtype) ((segtype)->flags & SEG_RAID6_LA_6 ? 1 : 0)
#define segtype_is_raid6_ra_6(segtype) ((segtype)->flags & SEG_RAID6_RA_6 ? 1 : 0)
-#define segtype_is_any_raid10(segtype) ((segtype)->flags & SEG_RAID10 ? 1 : 0)
#define segtype_is_raid10(segtype) ((segtype)->flags & SEG_RAID10 ? 1 : 0)
-#define segtype_is_raid10_near(segtype) segtype_is_raid10(segtype)
-/* FIXME: once raid10_offset supported */
+#define segtype_is_raid10_near(segtype) ((segtype)->flags & SEG_RAID10_NEAR ? 1 : 0)
+/* FIXME: once raid10_{far,offset} supported */
+#define segtype_is_raid10_far(segtype) 0 /* FIXME ((segtype)->flags & SEG_RAID10_FAR ? 1 : 0 */
#define segtype_is_raid10_offset(segtype) 0 /* FIXME ((segtype)->flags & SEG_RAID10_OFFSET ? 1 : 0 */
+#define segtype_is_any_raid10(segtype) (segtype_is_raid10(segtype) || segtype_is_raid10_near(segtype) || segtype_is_raid10_far(segtype) || segtype_is_raid10_offset(segtype))
#define segtype_is_raid_with_meta(segtype) (segtype_is_raid(segtype) && !segtype_is_raid0(segtype))
#define segtype_is_striped_raid(segtype) (segtype_is_raid(segtype) && !segtype_is_raid1(segtype))
#define segtype_is_reshapable_raid(segtype) ((segtype_is_striped_raid(segtype) && !segtype_is_any_raid0(segtype)) || segtype_is_raid10_near(segtype) || segtype_is_raid10_offset(segtype))
diff --git a/lib/raid/raid.c b/lib/raid/raid.c
index df9796d..25009f6 100644
--- a/lib/raid/raid.c
+++ b/lib/raid/raid.c
@@ -599,6 +599,7 @@ static const struct raid_type {
{ SEG_TYPE_NAME_RAID0_META, 0, SEG_RAID0_META | SEG_AREAS_STRIPED },
{ SEG_TYPE_NAME_RAID1, 0, SEG_RAID1 | SEG_AREAS_MIRRORED },
{ SEG_TYPE_NAME_RAID10, 0, SEG_RAID10 | SEG_AREAS_MIRRORED },
+ { SEG_TYPE_NAME_RAID10_NEAR,0, SEG_RAID10_NEAR | SEG_AREAS_MIRRORED },
{ SEG_TYPE_NAME_RAID4, 1, SEG_RAID4 },
{ SEG_TYPE_NAME_RAID5, 1, SEG_RAID5 },
{ SEG_TYPE_NAME_RAID5_N, 1, SEG_RAID5_N },
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index a25d4c3..80bfc1b 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -108,6 +108,7 @@ static const struct {
*/
{ SEG_RAID5_LS, "raid5"}, /* same as "raid5_ls" (default for MD also) */
{ SEG_RAID6_ZR, "raid6"}, /* same as "raid6_zr" */
+ { SEG_RAID10, "raid10_near"}, /* same as "raid10" */
};
/* Some segment types have a list of areas of other devices attached */
7 years, 1 month
master - raid: handle insufficent PVs on takeover from striped/raid0
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7bc85177b08c7a6f4f0...
Commit: 7bc85177b08c7a6f4f0c3384c8d05b9089267c14
Parent: c7ecf379abfffee385c8e862029285d1b436845d
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Wed Apr 12 00:25:23 2017 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Wed Apr 12 00:27:59 2017 +0200
raid: handle insufficent PVs on takeover from striped/raid0
Remove any newly allocated sub LV (pair) remnants in case
allocation fails due to lag of (parallel) free PV space
and keep initial raid type.
Resolves: rhbz1438013
---
lib/metadata/raid_manip.c | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 06a92b3..4662736 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -5006,6 +5006,7 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
{
uint32_t extents_copied, region_size, seg_len, stripe_size;
struct lv_segment *seg = first_seg(lv);
+ const struct segment_type *initial_segtype = seg->segtype;
struct dm_list removal_lvs;
dm_list_init(&removal_lvs);
@@ -5083,7 +5084,7 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
/* Add metadata LVs */
if (seg_is_raid0(seg)) {
log_debug_metadata("Adding metadata LVs to %s.", display_lvname(lv));
- if (!_raid0_add_or_remove_metadata_lvs(lv, 1 /* update_and_reload */, allocate_pvs, NULL))
+ if (!_raid0_add_or_remove_metadata_lvs(lv, 0 /* update_and_reload */, allocate_pvs, NULL))
return 0;
/* raid0_meta -> raid4 needs clearing of MetaLVs in order to avoid raid disk role change issues in the kernel */
}
@@ -5111,8 +5112,28 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
log_debug_metadata("Adding %" PRIu32 " component LV pair(s) to %s.",
new_image_count - lv_raid_image_count(lv),
display_lvname(lv));
- if (!_lv_raid_change_image_count(lv, 1, new_image_count, allocate_pvs, NULL, 0, 1))
+ if (!_lv_raid_change_image_count(lv, 1, new_image_count, allocate_pvs, NULL, 0, 1)) {
+ /*
+ * Rollback to initial type raid0/striped after failure to upconvert
+ * to raid4/5/6/10 elminating any newly allocated metadata devices
+ * (raid4/5 -> raid6 doesn't need any explicit changes after
+ * the allocation of the additional sub LV pair failed)
+ *
+ * - initial type is raid0 -> just remove remove metadata devices
+ *
+ * - initial type is striped -> convert back to it (removes metadata devices)
+ */
+ if (segtype_is_raid0(initial_segtype) &&
+ !_raid0_add_or_remove_metadata_lvs(lv, 0, NULL, &removal_lvs))
+ return_0;
+ if (segtype_is_striped_target(initial_segtype) &&
+ !_convert_raid0_to_striped(lv, 0, &removal_lvs))
+ return_0;
+ if (!_eliminate_extracted_lvs(lv->vg, &removal_lvs)) /* Updates vg */
+ return_0;
+
return 0;
+ }
seg = first_seg(lv);
}
7 years, 1 month
master - man lvmraid: wrap long lines
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c7ecf379abfffee385c...
Commit: c7ecf379abfffee385c8e862029285d1b436845d
Parent: 69c3543855a98fcbb644bec0c7816913369c3892
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 11 15:23:48 2017 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 11 15:23:48 2017 -0500
man lvmraid: wrap long lines
Break lines in examples to keep line length under 80.
---
man/lvmraid.7_main | 284 ++++++++++++++++++++++++++++++----------------------
1 files changed, 165 insertions(+), 119 deletions(-)
diff --git a/man/lvmraid.7_main b/man/lvmraid.7_main
index 995115d..47dc6ba 100644
--- a/man/lvmraid.7_main
+++ b/man/lvmraid.7_main
@@ -357,9 +357,9 @@ Also, if mismatches were found, the lvs attr field will display the letter
"m" (mismatch) in the 9th position, e.g.
.nf
-# lvs -o name,vgname,segtype,attr vg/lvol0
- LV VG Type Attr
- lvol0 vg raid1 Rwi-a-r-m-
+# lvs -o name,vgname,segtype,attr vg/lv
+ LV VG Type Attr
+ lv vg raid1 Rwi-a-r-m-
.fi
@@ -427,9 +427,9 @@ Each rimage SubLV holds a portion of LV data. No parity is used.
No RAID metadata is used.
.nf
-lvcreate --type raid0 --stripes 2 --name lvr0 ...
+# lvcreate --type raid0 --stripes 2 --name lvr0 ...
-lvs -a -o name,segtype,devices
+# lvs -a -o name,segtype,devices
lvr0 raid0 lvr0_rimage_0(0),lvr0_rimage_1(0)
[lvr0_rimage_0] linear /dev/sda(...)
[lvr0_rimage_1] linear /dev/sdb(...)
@@ -441,9 +441,9 @@ Each rimage SubLV holds a complete copy of LV data. No parity is used.
Each rmeta SubLV holds RAID metadata.
.nf
-lvcreate --type raid1 --mirrors 1 --name lvr1 ...
+# lvcreate --type raid1 --mirrors 1 --name lvr1 ...
-lvs -a -o name,segtype,devices
+# lvs -a -o name,segtype,devices
lvr1 raid1 lvr1_rimage_0(0),lvr1_rimage_1(0)
[lvr1_rimage_0] linear /dev/sda(...)
[lvr1_rimage_1] linear /dev/sdb(...)
@@ -457,9 +457,9 @@ At least three rimage SubLVs each hold a portion of LV data and one rimage SubLV
holds parity. Each rmeta SubLV holds RAID metadata.
.nf
-lvcreate --type raid4 --stripes 2 --name lvr4 ...
+# lvcreate --type raid4 --stripes 2 --name lvr4 ...
-lvs -a -o name,segtype,devices
+# lvs -a -o name,segtype,devices
lvr4 raid4 lvr4_rimage_0(0),\\
lvr4_rimage_1(0),\\
lvr4_rimage_2(0)
@@ -478,9 +478,9 @@ At least three rimage SubLVs each typcially hold a portion of LV data and parity
Each rmeta SubLV holds RAID metadata.
.nf
-lvcreate --type raid5 --stripes 2 --name lvr5 ...
+# lvcreate --type raid5 --stripes 2 --name lvr5 ...
-lvs -a -o name,segtype,devices
+# lvs -a -o name,segtype,devices
lvr5 raid5 lvr5_rimage_0(0),\\
lvr5_rimage_1(0),\\
lvr5_rimage_2(0)
@@ -499,9 +499,9 @@ At least five rimage SubLVs each typically hold a portion of LV data and parity.
Each rmeta SubLV holds RAID metadata.
.nf
-lvcreate --type raid6 --stripes 3 --name lvr6
+# lvcreate --type raid6 --stripes 3 --name lvr6
-lvs -a -o name,segtype,devices
+# lvs -a -o name,segtype,devices
lvr6 raid6 lvr6_rimage_0(0),\\
lvr6_rimage_1(0),\\
lvr6_rimage_2(0),\\
@@ -528,9 +528,9 @@ At least four rimage SubLVs each hold a portion of LV data. No parity is used.
Each rmeta SubLV holds RAID metadata.
.nf
-lvcreate --type raid10 --stripes 2 --mirrors 1 --name lvr10
+# lvcreate --type raid10 --stripes 2 --mirrors 1 --name lvr10
-lvs -a -o name,segtype,devices
+# lvs -a -o name,segtype,devices
lvr10 raid10 lvr10_rimage_0(0),\\
lvr10_rimage_1(0),\\
lvr10_rimage_2(0),\\
@@ -689,14 +689,14 @@ the lvchange command to refresh an LV:
.nf
# lvs -o name,vgname,segtype,attr,size vg
- LV VG Type Attr LSize
- raid1 vg raid1 Rwi-a-r-r- 100.00g
+ LV VG Type Attr LSize
+ lv vg raid1 Rwi-a-r-r- 100.00g
-# lvchange --refresh vg/raid1
+# lvchange --refresh vg/lv
# lvs -o name,vgname,segtype,attr,size vg
- LV VG Type Attr LSize
- raid1 vg raid1 Rwi-a-r--- 100.00g
+ LV VG Type Attr LSize
+ lv vg raid1 Rwi-a-r--- 100.00g
.fi
.SS Automatic repair
@@ -1133,29 +1133,27 @@ Convert it from 3-way striped to 5-way-striped.
capacity.
Logical volume vg/lv successfully converted.
-# lvs
+# lvs vg/lv
LV VG Attr LSize Cpy%Sync
- root fedora -wi-ao---- 15.00g
- swap fedora -wi-ao---- 3.99g
lv vg rwi-a-r-s- 652.00m 52.94
# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
- LV Attr Type PE Ranges DOff
+ LV Attr Type PE Ranges DOff
lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 \\
lv_rimage_1:0-33 \\
lv_rimage_2:0-33 ... \\
lv_rimage_5:0-33 \\
- lv_rimage_6:0-33 0
- [lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 0
+ lv_rimage_6:0-33 0
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 0
[lv_rimage_0] iwi-aor--- linear /dev/sda:34-34
- [lv_rimage_1] iwi-aor--- linear /dev/sdaa:0-32 0
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:0-32 0
[lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-34
- [lv_rimage_2] iwi-aor--- linear /dev/sdab:0-32 0
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:0-32 0
[lv_rimage_2] iwi-aor--- linear /dev/sdab:34-34
- [lv_rimage_3] iwi-aor--- linear /dev/sdac:1-34 0
- [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-34 0
- [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-34 0
- [lv_rimage_6] iwi-aor--- linear /dev/sdaf:1-34 0
+ [lv_rimage_3] iwi-aor--- linear /dev/sdac:1-34 0
+ [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-34 0
+ [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-34 0
+ [lv_rimage_6] iwi-aor--- linear /dev/sdaf:1-34 0
[lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33
[lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33
[lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33
@@ -1184,22 +1182,22 @@ The force option needs to be used, because removing stripes
Logical volume vg/lv successfully converted.
# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
- LV Attr Type PE Ranges DOff
+ LV Attr Type PE Ranges DOff
lv rwi-a-r-s- raid6_nr lv_rimage_0:0-33 \\
lv_rimage_1:0-33 \\
lv_rimage_2:0-33 ... \\
lv_rimage_5:0-33 \\
- lv_rimage_6:0-33 0
- [lv_rimage_0] Iwi-aor--- linear /dev/sda:0-32 0
+ lv_rimage_6:0-33 0
+ [lv_rimage_0] Iwi-aor--- linear /dev/sda:0-32 0
[lv_rimage_0] Iwi-aor--- linear /dev/sda:34-34
- [lv_rimage_1] Iwi-aor--- linear /dev/sdaa:0-32 0
+ [lv_rimage_1] Iwi-aor--- linear /dev/sdaa:0-32 0
[lv_rimage_1] Iwi-aor--- linear /dev/sdaa:34-34
- [lv_rimage_2] Iwi-aor--- linear /dev/sdab:0-32 0
+ [lv_rimage_2] Iwi-aor--- linear /dev/sdab:0-32 0
[lv_rimage_2] Iwi-aor--- linear /dev/sdab:34-34
- [lv_rimage_3] Iwi-aor--- linear /dev/sdac:1-34 0
- [lv_rimage_4] Iwi-aor--- linear /dev/sdad:1-34 0
- [lv_rimage_5] Iwi-aor--- linear /dev/sdae:1-34 0
- [lv_rimage_6] Iwi-aor-R- linear /dev/sdaf:1-34 0
+ [lv_rimage_3] Iwi-aor--- linear /dev/sdac:1-34 0
+ [lv_rimage_4] Iwi-aor--- linear /dev/sdad:1-34 0
+ [lv_rimage_5] Iwi-aor--- linear /dev/sdae:1-34 0
+ [lv_rimage_6] Iwi-aor-R- linear /dev/sdaf:1-34 0
[lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33
[lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33
[lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33
@@ -1214,41 +1212,48 @@ The 'R' in the same column of the attribute field shows the freed image Sub LVs
.nf
# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
- LV Attr Type PE Ranges DOff
+ LV Attr Type PE Ranges DOff
lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 \\
lv_rimage_1:0-33 \\
lv_rimage_2:0-33 ... \\
lv_rimage_5:0-33 \\
- lv_rimage_6:0-33 8192
+ lv_rimage_6:0-33 8192
.fi
Now that the reshape is finished the 'R' atribute on the RaidLV shows images can be removed.
.nf
# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
- LV Attr Type PE Ranges DOff
- lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 lv_rimage_6:0-33 8192
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 \\
+ lv_rimage_6:0-33 8192
.fi
This is achieved by repeating the command ("lvconvert --stripes 4 vg/lv" would be sufficient).
.nf
-# lvconvert --stripes 4 --force -y vg/lv
+# lvconvert --stripes 4 vg/lv
Using default stripesize 64.00 KiB.
Logical volume vg/lv successfully converted.
# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
- LV Attr Type PE Ranges DOff
- lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 lv_rimage_1:0-33 lv_rimage_2:0-33 ... lv_rimage_5:0-33 8192
- [lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 8192
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 8192
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 8192
[lv_rimage_0] iwi-aor--- linear /dev/sda:34-34
- [lv_rimage_1] iwi-aor--- linear /dev/sdaa:0-32 8192
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:0-32 8192
[lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-34
- [lv_rimage_2] iwi-aor--- linear /dev/sdab:0-32 8192
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:0-32 8192
[lv_rimage_2] iwi-aor--- linear /dev/sdab:34-34
- [lv_rimage_3] iwi-aor--- linear /dev/sdac:1-34 8192
- [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-34 8192
- [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-34 8192
+ [lv_rimage_3] iwi-aor--- linear /dev/sdac:1-34 8192
+ [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-34 8192
+ [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-34 8192
[lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33
[lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33
[lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33
@@ -1319,54 +1324,72 @@ In case the RaidLV should be converted to striped:
raid6_ra_6
raid6_rs_6
raid6_n_6
+.fi
A direct conversion isn't possible thus the command informed about the possible ones.
raid6_n_6 is suitable to convert to striped so convert to it first (this is a reshape
changing the raid6 layout from raid6_nr to raid6_n_6).
+.nf
# lvconvert --type raid6_n_6
Using default stripesize 64.00 KiB.
Converting raid6_nr LV vg/lv to raid6_n_6.
Are you sure you want to convert raid6_nr LV vg/lv? [y/n]: y
Logical volume vg/lv successfully converted.
+.fi
Wait for the reshape to finish.
-# lvconvert -y --type striped vg/lv
+.nf
+# lvconvert --type striped vg/lv
Logical volume vg/lv successfully converted.
-[root@vm46 ~]# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
- LV Attr Type PE Ranges DOff
- lv -wi-a----- striped /dev/sda:2-32 /dev/sdaa:2-32 /dev/sdab:2-32 /dev/sdac:3-33
- lv -wi-a----- striped /dev/sda:34-35 /dev/sdaa:34-35 /dev/sdab:34-35 /dev/sdac:34-35
+# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ LV Attr Type PE Ranges DOff
+ lv -wi-a----- striped /dev/sda:2-32 \\
+ /dev/sdaa:2-32 \\
+ /dev/sdab:2-32 \\
+ /dev/sdac:3-33
+ lv -wi-a----- striped /dev/sda:34-35 \\
+ /dev/sdaa:34-35 \\
+ /dev/sdab:34-35 \\
+ /dev/sdac:34-35
.fi
From striped we can convert to raid10
.nf
-# lvconvert -y --type raid10 vg/lv
+# lvconvert --type raid10 vg/lv
Using default stripesize 64.00 KiB.
Logical volume vg/lv successfully converted.
# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
- LV Attr Type PE Ranges DOff
- lv rwi-a-r--- raid10 lv_rimage_0:0-32 lv_rimage_4:0-32 lv_rimage_1:0-32 ... lv_rimage_3:0-32 lv_rimage_7:0-32 0
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r--- raid10 lv_rimage_0:0-32 \\
+ lv_rimage_4:0-32 \\
+ lv_rimage_1:0-32 ... \\
+ lv_rimage_3:0-32 \\
+ lv_rimage_7:0-32 0
# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
WARNING: Cannot find matching striped segment for vg/lv_rimage_3.
- LV Attr Type PE Ranges DOff
- lv rwi-a-r--- raid10 lv_rimage_0:0-32 lv_rimage_4:0-32 lv_rimage_1:0-32 ... lv_rimage_3:0-32 lv_rimage_7:0-32 0
- [lv_rimage_0] iwi-aor--- linear /dev/sda:2-32 0
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r--- raid10 lv_rimage_0:0-32 \\
+ lv_rimage_4:0-32 \\
+ lv_rimage_1:0-32 ... \\
+ lv_rimage_3:0-32 \\
+ lv_rimage_7:0-32 0
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:2-32 0
[lv_rimage_0] iwi-aor--- linear /dev/sda:34-35
- [lv_rimage_1] iwi-aor--- linear /dev/sdaa:2-32 0
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:2-32 0
[lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-35
- [lv_rimage_2] iwi-aor--- linear /dev/sdab:2-32 0
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:2-32 0
[lv_rimage_2] iwi-aor--- linear /dev/sdab:34-35
- [lv_rimage_3] iwi-XXr--- linear /dev/sdac:3-35 0
- [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-33 0
- [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-33 0
- [lv_rimage_6] iwi-aor--- linear /dev/sdaf:1-33 0
- [lv_rimage_7] iwi-aor--- linear /dev/sdag:1-33 0
+ [lv_rimage_3] iwi-XXr--- linear /dev/sdac:3-35 0
+ [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-33 0
+ [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-33 0
+ [lv_rimage_6] iwi-aor--- linear /dev/sdaf:1-33 0
+ [lv_rimage_7] iwi-aor--- linear /dev/sdag:1-33 0
[lv_rmeta_0] ewi-aor--- linear /dev/sda:0-0
[lv_rmeta_1] ewi-aor--- linear /dev/sdaa:0-0
[lv_rmeta_2] ewi-aor--- linear /dev/sdab:0-0
@@ -1387,24 +1410,27 @@ by restripe (4 steps).
We start with the linear LV.
.nf
-# lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg
- LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices
- lv -wi-a----- 128.00m linear 1 0 /dev/sda(0)
+# lvs -a -o name,size,segtype,syncpercent,datastripes,\\
+ stripesize,reshapelenle,devices vg
+ LV LSize Type Cpy%Sync #DStr Stripe RSize Devices
+ lv 128.00m linear 1 0 /dev/sda(0)
.fi
Then convert it to a 2-way raid1.
.nf
-# lvconvert -m1 vg/lv
+# lvconvert --mirrors 1 vg/lv
Logical volume vg/lv successfully converted.
-# lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg
- LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices
- lv rwi-a-r--- 128.00m raid1 100.00 2 0 lv_rimage_0(0),lv_rimage_1(0)
- [lv_rimage_0] iwi-aor--- 128.00m linear 1 0 /dev/sda(0)
- [lv_rimage_1] iwi-aor--- 128.00m linear 1 0 /dev/sdhx(1)
- [lv_rmeta_0] ewi-aor--- 4.00m linear 1 0 /dev/sda(32)
- [lv_rmeta_1] ewi-aor--- 4.00m linear 1 0 /dev/sdhx(0)
+# lvs -a -o name,size,segtype,datastripes,\\
+ stripesize,reshapelenle,devices vg
+ LV LSize Type #DStr Stripe RSize Devices
+ lv 128.00m raid1 2 0 lv_rimage_0(0),\\
+ lv_rimage_1(0)
+ [lv_rimage_0] 128.00m linear 1 0 /dev/sda(0)
+ [lv_rimage_1] 128.00m linear 1 0 /dev/sdhx(1)
+ [lv_rmeta_0] 4.00m linear 1 0 /dev/sda(32)
+ [lv_rmeta_1] 4.00m linear 1 0 /dev/sdhx(0)
.fi
Once the raid1 LV is fully synchronized we convert it to raid5_n (only 2-way raid1
@@ -1413,17 +1439,19 @@ SubLVs at the end and can be converted to striped directly without any additiona
conversion.
.nf
-# lvconvert -y --ty raid5_n vg/lv
+# lvconvert --type raid5_n vg/lv
Using default stripesize 64.00 KiB.
Logical volume vg/lv successfully converted.
-# lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg
- LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices
- lv rwi-a-r--- 128.00m raid5_n 100.00 1 64.00k 0 lv_rimage_0(0),lv_rimage_1(0)
- [lv_rimage_0] iwi-aor--- 128.00m linear 1 0 0 /dev/sda(0)
- [lv_rimage_1] iwi-aor--- 128.00m linear 1 0 0 /dev/sdhx(1)
- [lv_rmeta_0] ewi-aor--- 4.00m linear 1 0 /dev/sda(32)
- [lv_rmeta_1] ewi-aor--- 4.00m linear 1 0 /dev/sdhx(0)
+# lvs -a -o name,size,segtype,syncpercent,datastripes,\\
+ stripesize,reshapelenle,devices vg
+ LV LSize Type #DStr Stripe RSize Devices
+ lv 128.00m raid5_n 1 64.00k 0 lv_rimage_0(0),\\
+ lv_rimage_1(0)
+ [lv_rimage_0] 128.00m linear 1 0 0 /dev/sda(0)
+ [lv_rimage_1] 128.00m linear 1 0 0 /dev/sdhx(1)
+ [lv_rmeta_0] 4.00m linear 1 0 /dev/sda(32)
+ [lv_rmeta_1] 4.00m linear 1 0 /dev/sdhx(0)
.fi
Now we'll change the number of data stripes from 1 to 5 and request 128K stripe size
@@ -1432,45 +1460,61 @@ to the one given). That additonal space can be used by e.g. growing any contain
or the LV can be reduced in size after the reshaping conversion has finished.
.nf
-# lvconvert --yes --stripesize 128k --stripes 5 vg/lv
+# lvconvert --stripesize 128k --stripes 5 vg/lv
Converting stripesize 64.00 KiB of raid5_n LV vg/lv to 128.00 KiB.
- WARNING: Adding stripes to active logical volume vg/lv will grow it from 32 to 160 extents!
+ WARNING: Adding stripes to active logical volume vg/lv will grow \\
+ it from 32 to 160 extents!
Run "lvresize -l32 vg/lv" to shrink it or use the additional capacity.
Logical volume vg/lv successfully converted.
-# lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg
- LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices
- lv rwi-a-r--- 640.00m raid5_n 100.00 5 128.00k 6 lv_rimage_0(0),lv_rimage_1(0),lv_rimage_2(0),lv_rimage_3(0),lv_rimage_4(0),lv_rimage_5(0)
- [lv_rimage_0] iwi-aor--- 132.00m linear 1 0 1 /dev/sda(33)
- [lv_rimage_0] iwi-aor--- 132.00m linear 1 0 /dev/sda(0)
- [lv_rimage_1] iwi-aor--- 132.00m linear 1 0 1 /dev/sdhx(33)
- [lv_rimage_1] iwi-aor--- 132.00m linear 1 0 /dev/sdhx(1)
- [lv_rimage_2] iwi-aor--- 132.00m linear 1 0 1 /dev/sdhw(33)
- [lv_rimage_2] iwi-aor--- 132.00m linear 1 0 /dev/sdhw(1)
- [lv_rimage_3] iwi-aor--- 132.00m linear 1 0 1 /dev/sdhv(33)
- [lv_rimage_3] iwi-aor--- 132.00m linear 1 0 /dev/sdhv(1)
- [lv_rimage_4] iwi-aor--- 132.00m linear 1 0 1 /dev/sdhu(33)
- [lv_rimage_4] iwi-aor--- 132.00m linear 1 0 /dev/sdhu(1)
- [lv_rimage_5] iwi-aor--- 132.00m linear 1 0 1 /dev/sdht(33)
- [lv_rimage_5] iwi-aor--- 132.00m linear 1 0 /dev/sdht(1)
- [lv_rmeta_0] ewi-aor--- 4.00m linear 1 0 /dev/sda(32)
- [lv_rmeta_1] ewi-aor--- 4.00m linear 1 0 /dev/sdhx(0)
- [lv_rmeta_2] ewi-aor--- 4.00m linear 1 0 /dev/sdhw(0)
- [lv_rmeta_3] ewi-aor--- 4.00m linear 1 0 /dev/sdhv(0)
- [lv_rmeta_4] ewi-aor--- 4.00m linear 1 0 /dev/sdhu(0)
- [lv_rmeta_5] ewi-aor--- 4.00m linear 1 0 /dev/sdht(0)
+# lvs -a -o name,size,segtype,datastripes,\\
+ stripesize,reshapelenle,devices
+ LV LSize Type #DStr Stripe RSize Devices
+ lv 640.00m raid5_n 5 128.00k 6 lv_rimage_0(0),\\
+ lv_rimage_1(0),\\
+ lv_rimage_2(0),\\
+ lv_rimage_3(0),\\
+ lv_rimage_4(0),\\
+ lv_rimage_5(0)
+ [lv_rimage_0] 132.00m linear 1 0 1 /dev/sda(33)
+ [lv_rimage_0] 132.00m linear 1 0 /dev/sda(0)
+ [lv_rimage_1] 132.00m linear 1 0 1 /dev/sdhx(33)
+ [lv_rimage_1] 132.00m linear 1 0 /dev/sdhx(1)
+ [lv_rimage_2] 132.00m linear 1 0 1 /dev/sdhw(33)
+ [lv_rimage_2] 132.00m linear 1 0 /dev/sdhw(1)
+ [lv_rimage_3] 132.00m linear 1 0 1 /dev/sdhv(33)
+ [lv_rimage_3] 132.00m linear 1 0 /dev/sdhv(1)
+ [lv_rimage_4] 132.00m linear 1 0 1 /dev/sdhu(33)
+ [lv_rimage_4] 132.00m linear 1 0 /dev/sdhu(1)
+ [lv_rimage_5] 132.00m linear 1 0 1 /dev/sdht(33)
+ [lv_rimage_5] 132.00m linear 1 0 /dev/sdht(1)
+ [lv_rmeta_0] 4.00m linear 1 0 /dev/sda(32)
+ [lv_rmeta_1] 4.00m linear 1 0 /dev/sdhx(0)
+ [lv_rmeta_2] 4.00m linear 1 0 /dev/sdhw(0)
+ [lv_rmeta_3] 4.00m linear 1 0 /dev/sdhv(0)
+ [lv_rmeta_4] 4.00m linear 1 0 /dev/sdhu(0)
+ [lv_rmeta_5] 4.00m linear 1 0 /dev/sdht(0)
.fi
Once the conversion has finished we can can convert to striped.
.nf
-[root@vm46 ~]# lvconvert -y --ty striped vg/lv
+# lvconvert --type striped vg/lv
Logical volume vg/lv successfully converted.
-[root@vm46 ~]# lvs -aoname,attr,size,segtype,syncpercent,datastripes,stripesize,reshapelenle,devices vg|sed 's/ *$//'
- LV Attr LSize Type Cpy%Sync #DStr Stripe RSize Devices
- lv -wi-a----- 640.00m striped 5 128.00k /dev/sda(33),/dev/sdhx(33),/dev/sdhw(33),/dev/sdhv(33),/dev/sdhu(33)
- lv -wi-a----- 640.00m striped 5 128.00k /dev/sda(0),/dev/sdhx(1),/dev/sdhw(1),/dev/sdhv(1),/dev/sdhu(1)
+# lvs -a -o name,size,segtype,datastripes,\\
+ stripesize,reshapelenle,devices vg
+ LV LSize Type #DStr Stripe RSize Devices
+ lv 640.00m striped 5 128.00k /dev/sda(33),\\
+ /dev/sdhx(33),\\
+ /dev/sdhw(33),\\
+ /dev/sdhv(33),\\
+ /dev/sdhu(33)
+ lv 640.00m striped 5 128.00k /dev/sda(0),\\
+ /dev/sdhx(1),\\
+ /dev/sdhw(1),\\
+ /dev/sdhv(1),\\
+ /dev/sdhu(1)
.fi
Reversing these steps will convert a given striped LV to linear.
@@ -1527,6 +1571,7 @@ RAID5 parity n
.br
\[bu]
Dedicated parity device n used for striped/raid0 conversions
+.br
\[bu]
Used for RAID Takeover
@@ -1575,6 +1620,7 @@ RAID6 last parity devices
\[bu]
Fixed dedicated last devices (P-Syndrome N-1 and Q-Syndrome N)
with striped data used for striped/raid0 conversions
+.br
\[bu]
Used for RAID Takeover
7 years, 1 month
master - raid_manip: fix typo warning message
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=69c3543855a98fcbb64...
Commit: 69c3543855a98fcbb644bec0c7816913369c3892
Parent: 1dfb4a2dae05679d0e5f1de1f2f7ded53606b7ec
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 11 14:18:57 2017 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 11 14:18:57 2017 -0500
raid_manip: fix typo warning message
---
lib/metadata/raid_manip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 93c3c30..06a92b3 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1891,7 +1891,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
log_print_unless_silent("If that leaves the logical volume larger than %llu extents due to stripe rounding,",
(unsigned long long) extend_le_count);
log_print_unless_silent("you may want to grow the content afterwards (filesystem etc.)");
- log_warn("WARNING: too remove freed stripes after the conversion has finished, you have to run \"lvconvert --stripes %u %s\"",
+ log_warn("WARNING: to remove freed stripes after the conversion has finished, you have to run \"lvconvert --stripes %u %s\"",
new_stripes, display_lvname(lv));
if (!force) {
7 years, 1 month
master - man lvmraid: fix line wrapping in examples
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1dfb4a2dae05679d0e5...
Commit: 1dfb4a2dae05679d0e5f1de1f2f7ded53606b7ec
Parent: c448dcb3491cbb54e9382b2b40a719ad87974079
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 11 14:17:08 2017 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 11 14:17:08 2017 -0500
man lvmraid: fix line wrapping in examples
---
man/lvmraid.7_main | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/man/lvmraid.7_main b/man/lvmraid.7_main
index 4d117c4..995115d 100644
--- a/man/lvmraid.7_main
+++ b/man/lvmraid.7_main
@@ -1127,9 +1127,9 @@ Convert it from 3-way striped to 5-way-striped.
.nf
# lvconvert --stripes 5 vg/lv
Using default stripesize 64.00 KiB.
- WARNING: Adding stripes to active logical volume vg/lv will \
+ WARNING: Adding stripes to active logical volume vg/lv will \\
grow it from 99 to 165 extents!
- Run "lvresize -l99 vg/lv" to shrink it or use the additional \
+ Run "lvresize -l99 vg/lv" to shrink it or use the additional \\
capacity.
Logical volume vg/lv successfully converted.
@@ -1141,10 +1141,10 @@ Convert it from 3-way striped to 5-way-striped.
# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
LV Attr Type PE Ranges DOff
- lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 \
- lv_rimage_1:0-33 \
- lv_rimage_2:0-33 ... \
- lv_rimage_5:0-33 \
+ lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 \\
lv_rimage_6:0-33 0
[lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 0
[lv_rimage_0] iwi-aor--- linear /dev/sda:34-34
@@ -1173,22 +1173,22 @@ The force option needs to be used, because removing stripes
.nf
# lvconvert --stripes 4 vg/lv
Using default stripesize 64.00 KiB.
- WARNING: Removing stripes from active logical volume vg/lv will \
+ WARNING: Removing stripes from active logical volume vg/lv will \\
shrink it from 660.00 MiB to 528.00 MiB!
THIS MAY DESTROY (PARTS OF) YOUR DATA!
- If that leaves the logical volume larger than 206 extents due \
+ If that leaves the logical volume larger than 206 extents due \\
to stripe rounding,
you may want to grow the content afterwards (filesystem etc.)
- WARNING: too remove freed stripes after the conversion has finished,\
+ WARNING: to remove freed stripes after the conversion has finished,\\
you have to run "lvconvert --stripes 4 vg/lv"
Logical volume vg/lv successfully converted.
# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
LV Attr Type PE Ranges DOff
- lv rwi-a-r-s- raid6_nr lv_rimage_0:0-33 \
- lv_rimage_1:0-33 \
- lv_rimage_2:0-33 ... \
- lv_rimage_5:0-33
+ lv rwi-a-r-s- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 \\
lv_rimage_6:0-33 0
[lv_rimage_0] Iwi-aor--- linear /dev/sda:0-32 0
[lv_rimage_0] Iwi-aor--- linear /dev/sda:34-34
@@ -1215,10 +1215,10 @@ The 'R' in the same column of the attribute field shows the freed image Sub LVs
.nf
# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
LV Attr Type PE Ranges DOff
- lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 \
- lv_rimage_1:0-33 \
- lv_rimage_2:0-33 ... \
- lv_rimage_5:0-33
+ lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 \\
lv_rimage_6:0-33 8192
.fi
7 years, 1 month
master - man lvmraid: use same style as generated pages
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c448dcb3491cbb54e93...
Commit: c448dcb3491cbb54e9382b2b40a719ad87974079
Parent: 04d7444afa88f1f4e56065888124fff775a5638f
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 11 13:13:49 2017 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 11 13:20:54 2017 -0500
man lvmraid: use same style as generated pages
---
man/lvmraid.7_main | 51 ++++++++++++++++++++++++++-------------------------
1 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/man/lvmraid.7_main b/man/lvmraid.7_main
index 99218a5..4d117c4 100644
--- a/man/lvmraid.7_main
+++ b/man/lvmraid.7_main
@@ -45,7 +45,7 @@ The basic RAID levels that can be used are:
To display the LV type of an existing LV, run:
.B lvs -o name,segtype
-\fIVG\fP/\fILV\fP
+\fILV\fP
(The LV type is also referred to as "segment type" or "segtype".)
@@ -306,7 +306,7 @@ The command to scrub a RAID LV can operate in two different modes:
.B lvchange --syncaction
.BR check | repair
-.IR VG / LV
+.I LV
.HP
.B check
@@ -325,20 +325,20 @@ the RAID LV. To control the I/O rate used for scrubbing, use:
.HP
.B --maxrecoveryrate
-.BR \fIRate [ b | B | s | S | k | K | m | M | g | G ]
+\fISize\fP[k|UNIT]
.br
-Sets the maximum recovery rate for a RAID LV. \fIRate\fP is specified as
+Sets the maximum recovery rate for a RAID LV. \fISize\fP is specified as
an amount per second for each device in the array. If no suffix is given,
-then KiB/sec/device is assumed. Setting the recovery rate to \fB0\fP
+then KiB/sec/device is used. Setting the recovery rate to \fB0\fP
means it will be unbounded.
.HP
.BR --minrecoveryrate
-.BR \fIRate [ b | B | s | S | k | K | m | M | g | G ]
+\fISize\fP[k|UNIT]
.br
-Sets the minimum recovery rate for a RAID LV. \fIRate\fP is specified as
+Sets the minimum recovery rate for a RAID LV. \fISize\fP is specified as
an amount per second for each device in the array. If no suffix is given,
-then KiB/sec/device is assumed. Setting the recovery rate to \fB0\fP
+then KiB/sec/device is used. Setting the recovery rate to \fB0\fP
means it will be unbounded.
.P
@@ -616,8 +616,8 @@ A RAID LV that is missing devices may be activated or not, depending on
the "activation mode" used in lvchange:
.B lvchange -ay --activationmode
-.RB { complete | degraded | partial }
-.IR VG / LV
+.BR complete | degraded | partial
+.I LV
.B complete
.br
@@ -655,12 +655,12 @@ repeated to replace multiple PVs. Replacement devices can be optionally
listed with either option.
.B lvconvert --repair
-.IR VG / LV
+.I LV
[\fINewPVs\fP]
.B lvconvert --replace
\fIOldPV\fP
-.IR VG / LV
+.I LV
[\fINewPV\fP]
.B lvconvert
@@ -669,7 +669,7 @@ listed with either option.
.B --replace
\fIOldPV2\fP
...
-.IR VG / LV
+.I LV
[\fINewPVs\fP]
New devices require synchronization with existing devices, see
@@ -685,7 +685,7 @@ in the RAID LV operating in degraded mode until it is reactivated. Use
the lvchange command to refresh an LV:
.B lvchange --refresh
-.IR VG / LV
+.I LV
.nf
# lvs -o name,vgname,segtype,attr,size vg
@@ -727,7 +727,7 @@ synchronization is started.
The specific command run by dmeventd to warn or repair is:
.br
.B lvconvert --repair --use-policies
-.IR VG / LV
+.I LV
.SS Corrupted Data
@@ -742,8 +742,9 @@ This should be rare, and can be detected (see \fBScrubbing\fP).
If specific PVs in a RAID LV are known to have corrupt data, the data on
those PVs can be reconstructed with:
-.B lvchange --rebuild PV
-.IR VG / LV
+.B lvchange --rebuild
+.I PV
+.I LV
The rebuild option can be repeated with different PVs to replace the data
on multiple PVs.
@@ -789,8 +790,8 @@ while all devices are still written to.
.B lvchange
.BR -- [ raid ] writemostly
-.BR \fIPhysicalVolume [ : { y | n | t }]
-.IR VG / LV
+\fIPV\fP[\fB:y\fP|\fBn\fP|\fBt\fP]
+.I LV
The specified device will be marked as "write mostly", which means that
reading from this device will be avoided, and other devices will be
@@ -816,8 +817,8 @@ will not complete until writes to all the mirror images are complete.
.B lvchange
.BR -- [ raid ] writebehind
-.IR IOCount
-.IR VG / LV
+.I Number
+.I LV
To report the current write behind setting, run:
@@ -836,7 +837,7 @@ using lvconvert and specifying the new RAID level as the LV type:
.B lvconvert --type
.I RaidLevel
-\fIVG\fP/\fILV\fP
+.I LV
[\fIPVs\fP]
The most common and recommended RAID takeover conversions are:
@@ -1657,7 +1658,7 @@ The command to start duplication is:
[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP]
.RS
.B --duplicate
-.IR VG / LV
+.I LV
[\fIPVs\fP]
.RE
@@ -1707,7 +1708,7 @@ the new devices, specify the name of SubLV 0 (suffix _dup_0):
.B lvconvert --unduplicate
.BI --name
.IB LV _dup_0
-.IR VG / LV
+.I LV
To make the RAID LV use the data copy on the new devices, and drop the old
devices, specify the name of SubLV 1 (suffix _dup_1):
@@ -1715,7 +1716,7 @@ devices, specify the name of SubLV 1 (suffix _dup_1):
.B lvconvert --unduplicate
.BI --name
.IB LV _dup_1
-.IR VG / LV
+.I LV
FIXME: To make the LV use the data on the original devices, but keep the
data copy as a new LV, ...
7 years, 1 month