master - lvconvert: add missing option for repair
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=04acf7a8d0713c...
Commit: 04acf7a8d0713c858df893584401e96100f9d9d5
Parent: 3e4f24115a9b5dc8f60436195bffc60100d02620
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jul 17 11:28:21 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jul 17 16:14:18 2014 +0200
lvconvert: add missing option for repair
Few more option needs to be allowed with --repair.
(in-release fix).
---
tools/lvconvert.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 2ad1603..8370b49 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -392,8 +392,9 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
if (arg_count(cmd, repair_ARG) &&
!arg_is_only_set(cmd, "cannot be used with --repair",
repair_ARG,
- use_policies_ARG,
+ alloc_ARG, use_policies_ARG,
stripes_long_ARG, stripesize_ARG,
+ force_ARG, noudevsync_ARG, test_ARG,
-1))
return_0;
8 years, 8 months
master - man: lvmthin fix line breaks
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3e4f24115a9b5d...
Commit: 3e4f24115a9b5dc8f60436195bffc60100d02620
Parent: 65a3f50556c3544f1145d86b1b2ddd517838a950
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jul 11 15:15:03 2014 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Jul 11 15:15:03 2014 -0500
man: lvmthin fix line breaks
The html rendering inserted some unpleasant line breaks,
so insert better breaks explicitly.
---
man/lvmthin.7.in | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/man/lvmthin.7.in b/man/lvmthin.7.in
index fbd7a91..d534b42 100644
--- a/man/lvmthin.7.in
+++ b/man/lvmthin.7.in
@@ -662,7 +662,10 @@ of an existing thin pool LV:
.B lvchange \-\-monitor {y|n} VG/ThinPoolLV
.BR lvm.conf (5)
-.B thin_pool_autoextend_threshold thin_pool_autoextend_percent
+.B thin_pool_autoextend_threshold
+.br
+.BR lvm.conf (5)
+.B thin_pool_autoextend_percent
.br
control the default autoextend behavior.
@@ -769,7 +772,10 @@ indicated by the "z" attribute displayed by lvs. The option \-Z
Command to set the zeroing mode when creating a thin pool LV:
.br
-.B lvconvert \-Z{y|n} \-\-thinpool VG/ThinDataLV \-\-poolmetadata VG/ThinMetaLV
+.B lvconvert \-Z{y|n} \-\-thinpool VG/ThinDataLV
+.br
+.B " " \-\-poolmetadata VG/ThinMetaLV
+
Command to change the zeroing mode of an existing thin pool LV:
.br
@@ -987,7 +993,9 @@ and creates a thin LV in the new pool.
.br
\-V VirtualSize specifies the virtual size of the thin LV.
-.B lvcreate \-L LargeSize \-V VirtualSize \-n ThinLV \-\-thinpool VG/ThinPoolLV
+.B lvcreate \-L LargeSize \-V VirtualSize \-n ThinLV
+.br
+.B " " \-\-thinpool VG/ThinPoolLV
Equivalent to:
.br
8 years, 8 months
master - lvconvert: fix missing repair option
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=65a3f50556c354...
Commit: 65a3f50556c3544f1145d86b1b2ddd517838a950
Parent: af219fbc042db96cc588c03557614b00097ccf6c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jul 11 14:40:51 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jul 11 14:42:21 2014 +0200
lvconvert: fix missing repair option
Support --repair and --use-policies with mirrors.
(fixes another regression from lvconvert change for thin and cache).
TODO: the code path for mirror needs update.
---
tools/lvconvert.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index ba592a2..2ad1603 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -391,9 +391,10 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
if (arg_count(cmd, repair_ARG) &&
!arg_is_only_set(cmd, "cannot be used with --repair",
- repair_ARG,
- stripes_long_ARG, stripesize_ARG,
- -1))
+ repair_ARG,
+ use_policies_ARG,
+ stripes_long_ARG, stripesize_ARG,
+ -1))
return_0;
if (arg_is_set(cmd, mirrorlog_ARG) && arg_is_set(cmd, corelog_ARG)) {
@@ -617,6 +618,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
return_0;
}
} else if (_mirror_or_raid_type_requested(cmd, type_str) ||
+ arg_is_set(cmd, repair_ARG) ||
arg_is_set(cmd, mirrorlog_ARG) ||
arg_is_set(cmd, corelog_ARG)) { /* Mirrors (and some RAID functions) */
if (arg_count(cmd, chunksize_ARG)) {
8 years, 8 months
master - cleanup: lets make it really obvious for gcc
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=af219fbc042db9...
Commit: af219fbc042db96cc588c03557614b00097ccf6c
Parent: c0ebe78ef89e2a29d2dacc40184e41970ffc5564
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jul 11 14:19:22 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jul 11 14:19:22 2014 +0200
cleanup: lets make it really obvious for gcc
---
tools/lvconvert.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index c51158b..ba592a2 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2958,7 +2958,8 @@ static int _lvconvert_pool(struct cmd_context *cmd,
/* Swap normal LV with pool's metadata LV ? */
if (lv_is_pool(pool_lv)) {
/* Swap names between old and new metadata LV */
- if (!detach_pool_metadata_lv(first_seg(pool_lv), &pool_metadata_lv))
+ seg = first_seg(pool_lv);
+ if (!detach_pool_metadata_lv(seg, &pool_metadata_lv))
return_0;
old_name = metadata_lv->name;
if (!lv_rename_update(cmd, metadata_lv, "pvmove_tmeta", 0))
8 years, 8 months
master - lvconvert: fix mirror path
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c0ebe78ef89e2a...
Commit: c0ebe78ef89e2a29d2dacc40184e41970ffc5564
Parent: 17b92001ea4093e01d93ebd3645aa935896b9940
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jul 11 14:09:32 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jul 11 14:12:35 2014 +0200
lvconvert: fix mirror path
lvconvert rewrite commit missed proper handling
of mirror path for --corelog and --mirrorlog options.
Document this even in man page.
---
man/lvconvert.8.in | 2 ++
tools/lvconvert.c | 4 +++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
index e038371..032fbff 100644
--- a/man/lvconvert.8.in
+++ b/man/lvconvert.8.in
@@ -169,7 +169,9 @@ See \fBlvm\fP(8) for common options.
.br
Exactly one of
.BR \-\-cache ,
+.BR \-\-corelog ,
.BR \-\-merge ,
+.BR \-\-mirrorlog ,
.BR \-\-mirrors ,
.BR \-\-repair ,
.BR \-\-replace ,
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 04bb202..c51158b 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -616,7 +616,9 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
tmp_str)))
return_0;
}
- } else if (_mirror_or_raid_type_requested(cmd, type_str)) { /* Mirrors (and some RAID functions) */
+ } else if (_mirror_or_raid_type_requested(cmd, type_str) ||
+ arg_is_set(cmd, mirrorlog_ARG) ||
+ arg_is_set(cmd, corelog_ARG)) { /* Mirrors (and some RAID functions) */
if (arg_count(cmd, chunksize_ARG)) {
log_error("--chunksize is only available with snapshots or pools.");
return 0;
8 years, 8 months
master - WHATS_NEW: recent commits
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=17b92001ea4093...
Commit: 17b92001ea4093e01d93ebd3645aa935896b9940
Parent: 7913f64a020db49cf2715d64982571d035ced893
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Jul 11 14:09:05 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Jul 11 14:09:05 2014 +0200
WHATS_NEW: recent commits
Commits:
d169ff1e039ecdfb1efac0a6464ca149d71d8767
bccc2bef33af081264bbc356e37efe89ef78b796
f76879ba440aa93f2e237335fe2cca6951a636bf
---
WHATS_NEW | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index a81fddb..db78347 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,8 @@
Version 2.02.108 -
=================================
+ Add report/list_item_separator lvm.conf option.
+ Add lv_active_{locally,remotely,exclusively} LV reporting fields.
+ Comment out devices/{preferred_names,filter} in default lvm.conf file.
Enhance lvconvert thin, thinpool, cache and cachepool command line support.
Display 'C' only for cache and cache-pool target types in lvs.
Prompt for confirmation before change LV into a snapshot exception store.
8 years, 8 months
master - cleanup: drop unintend debug error line
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7913f64a020db4...
Commit: 7913f64a020db49cf2715d64982571d035ced893
Parent: a62cea3371cfac10f74a135b1969120e10f48f60
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jul 11 13:54:54 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jul 11 13:54:54 2014 +0200
cleanup: drop unintend debug error line
---
tools/lvconvert.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 3a5f129..04bb202 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -165,7 +165,7 @@ static int _lvconvert_name_params(struct lvconvert_params *lp,
if ((ptr = strrchr(lp->lv_name_full, '/')))
lp->lv_name = ptr + 1;
else
- lp->lv_name = lp->lv_name_full;
+ lp->lv_name = lp->lv_name_full;
if (!lp->merge_mirror &&
!strstr(lp->lv_name, "_tdata") &&
@@ -173,8 +173,6 @@ static int _lvconvert_name_params(struct lvconvert_params *lp,
!apply_lvname_restrictions(lp->lv_name))
return_0;
- log_error("PAR %d t:%d c:%d m:%s d:%s l:%s", *pargc, lp->thin,lp->cache,
- lp->pool_metadata_lv_name, lp->pool_data_lv_name, lp->lv_name);
if (*pargc) {
if (lp->snapshot) {
log_error("Too many arguments provided for snapshots.");
8 years, 8 months
master - cleanup: older gcc is not smart enough
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a62cea3371cfac...
Commit: a62cea3371cfac10f74a135b1969120e10f48f60
Parent: d7065f154e497ffe26006bf47b533b23383a8810
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jul 11 13:47:50 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jul 11 13:52:30 2014 +0200
cleanup: older gcc is not smart enough
Avoid gcc warning about uninitialized 'seg' variable.
It's not easy for older gcc compiler to deduce it's been set.
---
tools/lvconvert.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index ff32f76..3a5f129 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2958,7 +2958,7 @@ static int _lvconvert_pool(struct cmd_context *cmd,
/* Swap normal LV with pool's metadata LV ? */
if (lv_is_pool(pool_lv)) {
/* Swap names between old and new metadata LV */
- if (!detach_pool_metadata_lv(seg, &pool_metadata_lv))
+ if (!detach_pool_metadata_lv(first_seg(pool_lv), &pool_metadata_lv))
return_0;
old_name = metadata_lv->name;
if (!lv_rename_update(cmd, metadata_lv, "pvmove_tmeta", 0))
8 years, 8 months
master - tests: updates for new lvconvert
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d7065f154e497f...
Commit: d7065f154e497ffe26006bf47b533b23383a8810
Parent: 9f703d35a0ac4f74934ff8c7dc9e5610986caff6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Jul 11 13:13:56 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jul 11 13:32:52 2014 +0200
tests: updates for new lvconvert
---
test/shell/lvconvert-thin-raid.sh | 4 ++--
test/shell/lvconvert-thin.sh | 4 ++--
test/shell/pvmove-cache-segtypes.sh | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/shell/lvconvert-thin-raid.sh b/test/shell/lvconvert-thin-raid.sh
index 7e5efbd..d7a353b 100644
--- a/test/shell/lvconvert-thin-raid.sh
+++ b/test/shell/lvconvert-thin-raid.sh
@@ -23,8 +23,8 @@ lvcreate -aey --nosync -L8M --type raid1 -m1 -n $lv2 $vg
lvchange -an $vg/$lv1
# conversion fails for internal volumes
-fail lvconvert --thinpool $vg/${lv1}_rimage_0
-fail lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/${lv2}_rimage_0
+invalid lvconvert --thinpool $vg/${lv1}_rimage_0
+invalid lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/${lv2}_rimage_0
lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
diff --git a/test/shell/lvconvert-thin.sh b/test/shell/lvconvert-thin.sh
index 4a200bb..80f55dd 100644
--- a/test/shell/lvconvert-thin.sh
+++ b/test/shell/lvconvert-thin.sh
@@ -80,7 +80,7 @@ fail lvconvert -c 4 --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
# too big chunk size fails
fail lvconvert -c 2G --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
# negative chunk size fails
-fail lvconvert -c -256 --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
+invalid lvconvert -c -256 --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
# non power of 2 fails
fail lvconvert -c 88 --thinpool $vg/$lv1 --poolmetadata $vg/$lv2
@@ -93,7 +93,7 @@ lvcreate -L1T -n $lv1 $vg
lvcreate -L32G -n $lv2 $vg
# Warning about bigger then needed
lvconvert --yes --thinpool $vg/$lv1 --poolmetadata $vg/$lv2 |& tee err
-grep "WARNING: Maximum size" err
+grep "WARNING: Maximum" err
lvremove -f $vg
diff --git a/test/shell/pvmove-cache-segtypes.sh b/test/shell/pvmove-cache-segtypes.sh
index 94a3848..1f5c6d9 100644
--- a/test/shell/pvmove-cache-segtypes.sh
+++ b/test/shell/pvmove-cache-segtypes.sh
@@ -110,7 +110,7 @@ lvremove -ff $vg
# Testing pvmove of a RAID cachepool (metadata and data)
########################################################
lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
-lvcreate --type raid1 -L 2M -n meta $vg "$dev1" "$dev2"
+lvcreate --type raid1 -L 6M -n meta $vg "$dev1" "$dev2"
lvcreate --type raid1 -L 4M -n ${lv1}_pool $vg "$dev1" "$dev2"
lvconvert --yes --type cache-pool $vg/${lv1}_pool --poolmetadata $vg/meta
lvcreate --type cache -n $lv1 -L 8M $vg/${lv1}_pool "$dev5"
@@ -142,7 +142,7 @@ lvremove -ff $vg
#################################################
lvcreate -l 2 -n ${lv1}_foo $vg "$dev1"
# RAID for cachepool
-lvcreate --type raid1 -m 1 -L 2M -n meta $vg "$dev1" "$dev2"
+lvcreate --type raid1 -m 1 -L 4M -n meta $vg "$dev1" "$dev2"
lvcreate --type raid1 -m 1 -L 4M -n cachepool $vg "$dev1" "$dev2"
lvconvert --yes --type cache-pool $vg/cachepool --poolmetadata $vg/meta
# RAID for thin pool data LV
8 years, 8 months
master - cleanup: lvconvert reoder repair check
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9f703d35a0ac4f...
Commit: 9f703d35a0ac4f74934ff8c7dc9e5610986caff6
Parent: 4bbfac359c5e7e82a0600fa3d41bf7ea308e485f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jul 10 20:59:39 2014 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Jul 11 13:32:23 2014 +0200
cleanup: lvconvert reoder repair check
---
tools/lvconvert.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 9710134..ff32f76 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -3163,20 +3163,20 @@ static int _lvconvert_single(struct cmd_context *cmd, struct logical_volume *lv,
if (lp->splitsnapshot)
return _lvconvert_splitsnapshot(cmd, lv, lp);
- if (arg_count(cmd, repair_ARG) && lv_is_pool(lv)) {
- if (!_lvconvert_pool_repair(cmd, lv, lp))
- return_ECMD_FAILED;
- return ECMD_PROCESSED;
- }
-
- if (arg_count(cmd, repair_ARG) &&
- !(lv->status & MIRRORED) && !(lv->status & RAID)) {
- if (arg_count(cmd, use_policies_ARG))
- return ECMD_PROCESSED; /* nothing to be done here */
- log_error("Can't repair LV \"%s\" of segtype %s.",
- lv->name,
- first_seg(lv)->segtype->ops->name(first_seg(lv)));
- return ECMD_FAILED;
+ if (arg_count(cmd, repair_ARG)) {
+ if (lv_is_pool(lv)) {
+ if (!_lvconvert_pool_repair(cmd, lv, lp))
+ return_ECMD_FAILED;
+ return ECMD_PROCESSED;
+ }
+ if (!lv_is_mirrored(lv) && !lv_is_raid(lv)) {
+ if (arg_count(cmd, use_policies_ARG))
+ return ECMD_PROCESSED; /* nothing to be done here */
+ log_error("Can't repair LV \"%s\" of segtype %s.",
+ lv->name,
+ first_seg(lv)->segtype->ops->name(first_seg(lv)));
+ return ECMD_FAILED;
+ }
}
if (!lp->segtype) {
8 years, 8 months