master - properties: only thin-pool provides discards
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4a271e7ee720402d304...
Commit: 4a271e7ee720402d3045cd16b04fd7296131bdf5
Parent: d211c98581ee0ce9d1a919d64fd4d0df157c3069
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Mar 17 14:01:18 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Mar 17 14:22:33 2017 +0100
properties: only thin-pool provides discards
Quering non-thin-pool segment for discard property may lead
to intenal error if the segment had set 'out-of-range' value,
so only thin-pool is allowed, for other it returns NULL.
---
lib/metadata/lv.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index e58de66..b24c4aa 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -220,7 +220,12 @@ char *lvseg_segtype_dup(struct dm_pool *mem, const struct lv_segment *seg)
char *lvseg_discards_dup(struct dm_pool *mem, const struct lv_segment *seg)
{
- return dm_pool_strdup(mem, get_pool_discards_name(seg->discards));
+ if (lv_is_thin_pool(seg->lv))
+ return dm_pool_strdup(mem, get_pool_discards_name(seg->discards));
+
+ log_error("Cannot query non thin-pool segment of LV %s for discards property.",
+ display_lvname(seg->lv));
+ return NULL;
}
char *lvseg_kernel_discards_dup_with_info_and_seg_status(struct dm_pool *mem, const struct lv_with_info_and_seg_status *lvdm)
7 years, 2 months
master - lvm2app: correct internal API changes
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d211c98581ee0ce9d1a...
Commit: d211c98581ee0ce9d1a919d64fd4d0df157c3069
Parent: e0ea56904515e4c1a75256f4327d414b0d2506cc
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Mar 17 14:00:18 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Mar 17 14:22:33 2017 +0100
lvm2app: correct internal API changes
Internal library gets more strict about setting discard and
zero_new_blocks parameter.
---
liblvm/lvm_lv.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/liblvm/lvm_lv.c b/liblvm/lvm_lv.c
index 05dd482..d5ca821 100644
--- a/liblvm/lvm_lv.c
+++ b/liblvm/lvm_lv.c
@@ -566,7 +566,21 @@ static lv_create_params_t _lvm_lv_params_create_thin_pool(vg_t vg,
if (lvcp) {
lvcp->vg = vg;
- lvcp->lvp.discards = (thin_discards_t) discard;
+ switch (discard) {
+ case LVM_THIN_DISCARDS_IGNORE:
+ lvcp->lvp.discards = THIN_DISCARDS_IGNORE;
+ break;
+ case LVM_THIN_DISCARDS_NO_PASSDOWN:
+ lvcp->lvp.discards = THIN_DISCARDS_NO_PASSDOWN;
+ break;
+ case LVM_THIN_DISCARDS_PASSDOWN:
+ lvcp->lvp.discards = THIN_DISCARDS_PASSDOWN;
+ break;
+ default:
+ log_error("Invalid discard argument %d for thin pool creation.", discard);
+ return NULL;
+ }
+ lvcp->lvp.zero_new_blocks = THIN_ZERO_YES;
if (chunk_size)
lvcp->lvp.chunk_size = chunk_size;
7 years, 2 months
master - raid: cleanup
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e0ea56904515e4c1a75...
Commit: e0ea56904515e4c1a75256f4327d414b0d2506cc
Parent: 1520fec3e81147a86f98713bfc8dd27848ce74ff
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Mar 17 14:14:42 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Mar 17 14:14:42 2017 +0100
raid: cleanup
Move function _raid45_to_raid54_wrapper() to avoid superfluous declaration.
---
lib/metadata/raid_manip.c | 147 ++++++++++++++++++++++-----------------------
1 files changed, 73 insertions(+), 74 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 3b3ef19..808e3e1 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -4843,8 +4843,80 @@ static int _shift_parity_dev(struct lv_segment *seg)
return 1;
}
+/*
+ * raid4 <-> raid5_n helper
+ *
+ * On conversions between raid4 and raid5_n, the parity SubLVs need
+ * to be switched between beginning and end of the segment areas.
+ *
+ * The metadata devices reflect the previous positions within the RaidLV,
+ * thus need to be cleared in order to allow the kernel to start the new
+ * mapping and recreate metadata with the proper new position stored.
+ */
+static int _raid45_to_raid54_wrapper(TAKEOVER_FN_ARGS)
+{
+ struct lv_segment *seg = first_seg(lv);
+ struct dm_list removal_lvs;
+ uint32_t region_size = seg->region_size;
+
+ dm_list_init(&removal_lvs);
+
+ if (!(seg_is_raid4(seg) && segtype_is_raid5_n(new_segtype)) &&
+ !(seg_is_raid5_n(seg) && segtype_is_raid4(new_segtype))) {
+ log_error("LV %s has to be of type raid4 or raid5_n to allow for this conversion.",
+ display_lvname(lv));
+ return 0;
+ }
+
+
+ /* Necessary when convering to raid0/striped w/o redundancy. */
+ if (!_raid_in_sync(lv)) {
+ log_error("Unable to convert %s while it is not in-sync.",
+ display_lvname(lv));
+ return 0;
+ }
+
+ log_debug_metadata("Converting LV %s from %s to %s.", display_lvname(lv),
+ (seg_is_raid4(seg) ? SEG_TYPE_NAME_RAID4 : SEG_TYPE_NAME_RAID5_N),
+ (seg_is_raid4(seg) ? SEG_TYPE_NAME_RAID5_N : SEG_TYPE_NAME_RAID4));
+
+ /* Archive metadata */
+ if (!archive(lv->vg))
+ return_0;
+
+ if (!_rename_area_lvs(lv, "_")) {
+ log_error("Failed to rename %s LV %s MetaLVs.", lvseg_name(seg), display_lvname(lv));
+ return 0;
+ }
+
+ if (!_clear_meta_lvs(lv))
+ return_0;
+
+ /* Shift parity SubLV pair "PDD..." <-> "DD...P" on raid4 <-> raid5_n conversion */
+ if( !_shift_parity_dev(seg))
+ return 0;
+
+ /* Don't resync */
+ init_mirror_in_sync(1);
+ seg->region_size = new_region_size ?: region_size;
+ seg->segtype = new_segtype;
+
+ if (!_lv_update_reload_fns_reset_eliminate_lvs(lv, 0, &removal_lvs, NULL))
+ return_0;
+
+ init_mirror_in_sync(0);
+
+ if (!_rename_area_lvs(lv, NULL)) {
+ log_error("Failed to rename %s LV %s MetaLVs.", lvseg_name(seg), display_lvname(lv));
+ return 0;
+ }
+ if (!lv_update_and_reload(lv))
+ return_0;
+
+ return 1;
+}
+
/* raid45610 -> raid0* / stripe, raid5_n -> raid4 */
-static int _raid45_to_raid54_wrapper(TAKEOVER_FN_ARGS);
static int _takeover_downconvert_wrapper(TAKEOVER_FN_ARGS)
{
int rename_sublvs = 0;
@@ -4990,79 +5062,6 @@ static int _takeover_downconvert_wrapper(TAKEOVER_FN_ARGS)
return 1;
}
-/*
- * raid4 <-> raid5_n helper
- *
- * On conversions between raid4 and raid5_n, the parity SubLVs need
- * to be switched between beginning and end of the segment areas.
- *
- * The metadata devices reflect the previous positions within the RaidLV,
- * thus need to be cleared in order to allow the kernel to start the new
- * mapping and recreate metadata with the proper new position stored.
- */
-static int _raid45_to_raid54_wrapper(TAKEOVER_FN_ARGS)
-{
- struct lv_segment *seg = first_seg(lv);
- struct dm_list removal_lvs;
- uint32_t region_size = seg->region_size;
-
- dm_list_init(&removal_lvs);
-
- if (!(seg_is_raid4(seg) && segtype_is_raid5_n(new_segtype)) &&
- !(seg_is_raid5_n(seg) && segtype_is_raid4(new_segtype))) {
- log_error("LV %s has to be of type raid4 or raid5_n to allow for this conversion.",
- display_lvname(lv));
- return 0;
- }
-
-
- /* Necessary when convering to raid0/striped w/o redundancy. */
- if (!_raid_in_sync(lv)) {
- log_error("Unable to convert %s while it is not in-sync.",
- display_lvname(lv));
- return 0;
- }
-
- log_debug_metadata("Converting LV %s from %s to %s.", display_lvname(lv),
- (seg_is_raid4(seg) ? SEG_TYPE_NAME_RAID4 : SEG_TYPE_NAME_RAID5_N),
- (seg_is_raid4(seg) ? SEG_TYPE_NAME_RAID5_N : SEG_TYPE_NAME_RAID4));
-
- /* Archive metadata */
- if (!archive(lv->vg))
- return_0;
-
- if (!_rename_area_lvs(lv, "_")) {
- log_error("Failed to rename %s LV %s MetaLVs.", lvseg_name(seg), display_lvname(lv));
- return 0;
- }
-
- if (!_clear_meta_lvs(lv))
- return_0;
-
- /* Shift parity SubLV pair "PDD..." <-> "DD...P" on raid4 <-> raid5_n conversion */
- if( !_shift_parity_dev(seg))
- return 0;
-
- /* Don't resync */
- init_mirror_in_sync(1);
- seg->region_size = new_region_size ?: region_size;
- seg->segtype = new_segtype;
-
- if (!_lv_update_reload_fns_reset_eliminate_lvs(lv, 0, &removal_lvs, NULL))
- return_0;
-
- init_mirror_in_sync(0);
-
- if (!_rename_area_lvs(lv, NULL)) {
- log_error("Failed to rename %s LV %s MetaLVs.", lvseg_name(seg), display_lvname(lv));
- return 0;
- }
- if (!lv_update_and_reload(lv))
- return_0;
-
- return 1;
-}
-
static int _striped_to_raid0_wrapper(struct logical_volume *lv,
const struct segment_type *new_segtype,
uint32_t new_stripes,
7 years, 2 months
master - raid: name variables consistently
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1520fec3e81147a86f9...
Commit: 1520fec3e81147a86f98713bfc8dd27848ce74ff
Parent: 17bee733d16e88d260b7de826c747c6ade9f797c
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Mar 17 14:04:03 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Mar 17 14:04:03 2017 +0100
raid: name variables consistently
Related: rhbz1191935
Related: rhbz1366296
---
lib/metadata/raid_manip.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index df48897..3b3ef19 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1848,7 +1848,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
const unsigned new_stripes, const unsigned new_stripe_size,
struct dm_list *allocate_pvs, struct dm_list *removal_lvs)
{
- uint32_t active_lvs, current_le_count, reduced_le_count, removed_lvs, s;
+ uint32_t available_slvs, current_le_count, reduced_le_count, removed_slvs, s;
uint64_t extend_le_count;
unsigned devs_health, devs_in_sync;
struct lv_segment *seg = first_seg(lv);
@@ -1943,7 +1943,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
* -> remove the freed up images and reduce LV size
*
*/
- if (!_get_available_removed_sublvs(lv, &active_lvs, &removed_lvs))
+ if (!_get_available_removed_sublvs(lv, &available_slvs, &removed_slvs))
return_0;
if (devs_in_sync != new_image_count) {
@@ -1951,7 +1951,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
return 0;
}
- if (active_lvs + removed_lvs != old_image_count) {
+ if (available_slvs + removed_slvs != old_image_count) {
log_error ("No correct kernel/lvm total LV count on %s.", display_lvname(lv));
return 0;
}
7 years, 2 months
master - raid: conditionally reject convert to striped/raid0*
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=17bee733d16e88d260b...
Commit: 17bee733d16e88d260b7de826c747c6ade9f797c
Parent: 5e7bc8d854bb6752e6987692791750a48e871442
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Mar 17 13:58:54 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Mar 17 13:58:54 2017 +0100
raid: conditionally reject convert to striped/raid0*
If SubLVs to be removed still exist after an image removing
conversion (i.e. "lvconvert --yes --force --stripes N "
with N < total stripes) any request to convert to a different
striped/raid* level has to be rejected until after those freed
SubLVs got removed by running the aforementioned lvconvert again.
Add tests to check conversion to striped/raid* gets rejected.
Enhance a test comment.
Related: rhbz1191935
Related: rhbz1366296
---
lib/metadata/raid_manip.c | 54 +++++++++++++++++++++++++--------
test/shell/lvconvert-raid-reshape.sh | 14 +++++++-
2 files changed, 53 insertions(+), 15 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index dbffc5a..df48897 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -171,6 +171,33 @@ char *top_level_lv_name(struct volume_group *vg, const char *lv_name)
return new_lv_name;
}
+/* Get available and removed SubLVs for @lv */
+static int _get_available_removed_sublvs(const struct logical_volume *lv, uint32_t *available_slvs, uint32_t *removed_slvs)
+{
+ uint32_t s;
+ struct lv_segment *seg = first_seg(lv);
+
+ *available_slvs = 0;
+ *removed_slvs = 0;
+
+ if (!lv_is_raid(lv))
+ return 1;
+
+ for (s = 0; s < seg->area_count; s++) {
+ struct logical_volume *slv;
+
+ if (seg_type(seg, s) != AREA_LV || !(slv = seg_lv(seg, s))) {
+ log_error(INTERNAL_ERROR "Missing image sub lv in area %" PRIu32 " of LV %s.",
+ s, display_lvname(lv));
+ return_0;
+ }
+
+ (slv->status & LV_REMOVE_AFTER_RESHAPE) ? (*removed_slvs)++ : (*available_slvs)++;
+ }
+
+ return 1;
+}
+
static int _lv_is_raid_with_tracking(const struct logical_volume *lv,
struct logical_volume **tracking)
{
@@ -1916,19 +1943,8 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
* -> remove the freed up images and reduce LV size
*
*/
- for (active_lvs = removed_lvs = s = 0; s < seg->area_count; s++) {
- struct logical_volume *slv;
-
- if (!seg_lv(seg, s) || !(slv = seg_lv(seg, s))) {
- log_error("Missing image sub lv off LV %s.", display_lvname(lv));
- return 0;
- }
-
- if (slv->status & LV_REMOVE_AFTER_RESHAPE)
- removed_lvs++;
- else
- active_lvs++;
- }
+ if (!_get_available_removed_sublvs(lv, &active_lvs, &removed_lvs))
+ return_0;
if (devs_in_sync != new_image_count) {
log_error("No correct kernel/lvm active LV count on %s.", display_lvname(lv));
@@ -5965,6 +5981,7 @@ int lv_raid_convert(struct logical_volume *lv,
uint32_t new_image_count = seg->area_count;
uint32_t region_size = new_region_size;
uint32_t data_copies = seg->data_copies;
+ uint32_t available_slvs, removed_slvs;
takeover_fn_t takeover_fn;
new_segtype = new_segtype ? : seg->segtype;
@@ -6016,6 +6033,17 @@ int lv_raid_convert(struct logical_volume *lv,
return 0;
}
+ /* Prohibit any takeover in case sub LVs to be removed still exist after a previous reshape */
+ if (_get_available_removed_sublvs(lv, &available_slvs, &removed_slvs))
+ return 0;
+ if (removed_slvs) {
+ log_error("Can't convert %s LV %s to %s containing sub LVs to remove after a reshape.",
+ lvseg_name(seg), display_lvname(lv), new_segtype->name);
+ log_error("Run \"lvconvert --stripes %" PRIu32 " %s\" first.",
+ seg->area_count - removed_slvs - 1, display_lvname(lv));
+ return 0;
+ }
+
/*
* Check acceptible options mirrors, region_size,
* stripes and/or stripe_size have been provided.
diff --git a/test/shell/lvconvert-raid-reshape.sh b/test/shell/lvconvert-raid-reshape.sh
index 05c4784..f9ff744 100644
--- a/test/shell/lvconvert-raid-reshape.sh
+++ b/test/shell/lvconvert-raid-reshape.sh
@@ -110,7 +110,7 @@ aux wait_for_sync $vg $lv1
_reshape_layout raid5_ls 3 4 $vg $lv1 --stripesize 256K
check lv_first_seg_field $vg/$lv1 stripesize "256.00k"
-# Convert raid5(_n) -> striped
+# Convert raid5(_n) -> striped testing raid5_ls gets rejected
not _lvconvert striped striped 3 3 $vg $lv1 512k
_reshape_layout raid5_n 3 4 $vg $lv1
_lvconvert striped striped 3 3 $vg $lv1
@@ -144,8 +144,18 @@ _reshape_layout raid5_ls 63 64 $vg $lv1 --stripes 63
_reshape_layout raid5_ls 27 64 $vg $lv1 --stripes 27 --force
_reshape_layout raid5_ls 27 28 $vg $lv1 --stripes 27
-# Convert raid5_ls back to 4 stripes
+# Convert raid5_ls back to 4 stripes checking
+# conversion to striped/raid* gets rejected
+# with existing LVs to be removed afer reshape
_reshape_layout raid5_ls 4 28 $vg $lv1 --stripes 4 --force
+
+# No we got the data reshaped and the freed SubLVs still present
+# -> check takeover request gets rejected
+not lvconvert --yes --type striped $vg/$lv1
+not lvconvert --yes --type raid0 $vg/$lv1
+not lvconvert --yes --type raid0_meta $vg/$lv1
+not lvconvert --yes --type raid6 $vg/$lv1
+# Remove the freed SubLVs
_reshape_layout raid5_ls 4 5 $vg $lv1 --stripes 4
# Convert raid5_ls back to 3 stripes
7 years, 2 months
master - man: Build man-generator in tools dir.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5e7bc8d854bb6752e69...
Commit: 5e7bc8d854bb6752e6987692791750a48e871442
Parent: 270ed9bc9038b1cd2ff4f4a7177292621c591ede
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Mar 16 23:10:40 2017 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Mar 16 23:10:40 2017 +0000
man: Build man-generator in tools dir.
Use ln to make a copy of command.c for compilation with different DEFS
then handle dependencies the normal way.
---
man/Makefile.in | 9 +++------
tools/Makefile.in | 16 +++++++++++++---
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/man/Makefile.in b/man/Makefile.in
index b3f287b..57d9627 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -117,13 +117,13 @@ MAN5DIR=$(mandir)/man5
MAN7DIR=$(mandir)/man7
MAN8DIR=$(mandir)/man8
-MANGENERATOR=./man-generator
+MANGENERATOR=$(top_builddir)/tools/man-generator
TESTMAN=test.gen
include $(top_builddir)/make.tmpl
CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8:%.8=%.8_gen) $(MAN8CLUSTER) \
- $(MAN8SYSTEMD_GENERATORS) $(MAN8DM) $(MANGENERATOR) $(TESTMAN)
+ $(MAN8SYSTEMD_GENERATORS) $(MAN8DM) $(TESTMAN)
DISTCLEAN_TARGETS+=$(FSADMMAN) $(BLKDEACTIVATEMAN) $(DMEVENTDMAN) \
$(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(CLVMDMAN) $(CMIRRORDMAN) \
$(LVMCACHEMAN) $(LVMTHINMAN) $(LVMDBUSDMAN) $(LVMRAIDMAN) \
@@ -141,11 +141,8 @@ all_man: man
$(MAN5) $(MAN7) $(MAN8) $(MAN8DM) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS): Makefile
-$(MANGENERATOR): Makefile
- $(CC) -DMAN_PAGE_GENERATOR -I$(top_builddir)/tools $(CFLAGS) $(top_srcdir)/tools/command.c -o $@
-
# Test whether or not the man page generator works
-$(TESTMAN): $(MANGENERATOR)
+$(TESTMAN): $(MANGENERATOR) Makefile
- $(MANGENERATOR) --primary lvmconfig > $@
SEE_ALSO=$(srcdir)/see_also.end
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 6312c9e..8ea6801 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -72,12 +72,14 @@ SOURCES2 =\
lvm.c \
lvm2cmd-static.c \
lvm2cmd.c \
- lvmcmdlib.c
+ lvmcmdlib.c \
+ man-generator.c
TARGETS =\
.commands \
liblvm2cmd.a \
- lvm
+ lvm \
+ man-generator
TARGETS_DM = dmsetup
@@ -100,7 +102,7 @@ CLEAN_TARGETS = liblvm2cmd.$(LIB_SUFFIX) $(TARGETS_DM) \
liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION) lvm-static.o \
liblvm2cmd-static.a dmsetup.static lvm.static \
$(LDDEPS) .exported_symbols_generated \
- cmds.h command-lines-input.h command-count.h
+ cmds.h command-lines-input.h command-count.h man-generator.c
ifeq ("@CMDLIB@", "yes")
TARGETS += liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION)
@@ -145,6 +147,14 @@ lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a
$(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $(OBJECTS) lvm.o \
$(LVMLIBS) $(READLINE_LIBS) $(LIBS) -rdynamic
+DEFS_man-generator.o += -DMAN_PAGE_GENERATOR
+
+man-generator.c: command.c
+ $(LN_S) -f $< $@
+
+man-generator: man-generator.o
+ $(CC) $(CFLAGS) -o $@ $<
+
ifeq ("@BUILD_LVMETAD@", "yes")
lvm: $(top_builddir)/libdaemon/client/libdaemonclient.a
endif
7 years, 2 months
master - man: Preserve template variables in pre-generated pages.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=270ed9bc9038b1cd2ff...
Commit: 270ed9bc9038b1cd2ff4f4a7177292621c591ede
Parent: 0c74afa1c613537e5aed33ed230755cfe8b0ab03
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Mar 16 23:08:59 2017 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Mar 16 23:08:59 2017 +0000
man: Preserve template variables in pre-generated pages.
---
man/Makefile.in | 10 ++++++----
man/lvchange.8_pregen | 2 +-
man/lvconvert.8_pregen | 2 +-
man/lvcreate.8_pregen | 2 +-
man/lvdisplay.8_pregen | 2 +-
man/lvextend.8_pregen | 2 +-
man/lvm-config.8_pregen | 2 +-
man/lvm-dumpconfig.8_pregen | 2 +-
man/lvm-fullreport.8_pregen | 2 +-
man/lvm-lvpoll.8_pregen | 2 +-
man/lvmconfig.8_pregen | 2 +-
man/lvmdiskscan.8_pregen | 2 +-
man/lvreduce.8_pregen | 2 +-
man/lvremove.8_pregen | 2 +-
man/lvrename.8_pregen | 2 +-
man/lvresize.8_pregen | 2 +-
man/lvs.8_pregen | 2 +-
man/lvscan.8_pregen | 2 +-
man/pvchange.8_pregen | 2 +-
man/pvck.8_pregen | 2 +-
man/pvcreate.8_pregen | 2 +-
man/pvdisplay.8_pregen | 2 +-
man/pvmove.8_pregen | 2 +-
man/pvremove.8_pregen | 2 +-
man/pvresize.8_pregen | 2 +-
man/pvs.8_pregen | 2 +-
man/pvscan.8_pregen | 2 +-
man/vgcfgbackup.8_pregen | 6 +++---
man/vgcfgrestore.8_pregen | 2 +-
man/vgchange.8_pregen | 2 +-
man/vgck.8_pregen | 2 +-
man/vgconvert.8_pregen | 2 +-
man/vgcreate.8_pregen | 2 +-
man/vgdisplay.8_pregen | 2 +-
man/vgexport.8_pregen | 2 +-
man/vgextend.8_pregen | 2 +-
man/vgimport.8_pregen | 2 +-
man/vgimportclone.8_pregen | 2 +-
man/vgmerge.8_pregen | 2 +-
man/vgmknodes.8_pregen | 2 +-
man/vgreduce.8_pregen | 2 +-
man/vgremove.8_pregen | 2 +-
man/vgrename.8_pregen | 2 +-
man/vgs.8_pregen | 2 +-
man/vgscan.8_pregen | 2 +-
man/vgsplit.8_pregen | 2 +-
46 files changed, 53 insertions(+), 51 deletions(-)
diff --git a/man/Makefile.in b/man/Makefile.in
index e9c7d3d..b3f287b 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -122,7 +122,7 @@ TESTMAN=test.gen
include $(top_builddir)/make.tmpl
-CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8:%.8_gen=%.8) $(MAN8CLUSTER) \
+CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8:%.8=%.8_gen) $(MAN8CLUSTER) \
$(MAN8SYSTEMD_GENERATORS) $(MAN8DM) $(MANGENERATOR) $(TESTMAN)
DISTCLEAN_TARGETS+=$(FSADMMAN) $(BLKDEACTIVATEMAN) $(DMEVENTDMAN) \
$(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(CLVMDMAN) $(CMIRRORDMAN) \
@@ -150,12 +150,14 @@ $(TESTMAN): $(MANGENERATOR)
SEE_ALSO=$(srcdir)/see_also.end
+.PRECIOUS: %.8_gen
+
%.8_gen: $(srcdir)/%.8_des $(srcdir)/%.8_end $(MANGENERATOR) $(TESTMAN)
( \
if [ ! -s $(TESTMAN) ] ; then \
- echo "Copying pre-generated $@" ; \
+ echo "Copying pre-generated template $@" ; \
else \
- echo "Generating $@" ; \
+ echo "Generating template $@" ; \
fi \
)
( \
@@ -222,7 +224,7 @@ install_all_man: install install_systemd_generators
pregenerated_man: all
for i in $(srcdir)/*.8_des; do \
CMD=`basename $$i .8_des`; \
- cat $${CMD}.8 > $(srcdir)/$$CMD.8_pregen ; \
+ cat $${CMD}.8_gen > $(srcdir)/$$CMD.8_pregen ; \
done
generate: pregenerated_man
diff --git a/man/lvchange.8_pregen b/man/lvchange.8_pregen
index f0e2c92..5d63f47 100644
--- a/man/lvchange.8_pregen
+++ b/man/lvchange.8_pregen
@@ -1,4 +1,4 @@
-.TH LVCHANGE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvchange \- Change the attributes of logical volume(s)
.
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index da29009..97c01bc 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -1,4 +1,4 @@
-.TH LVCONVERT 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVCONVERT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvconvert \- Change logical volume layout
.
diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
index 9b64c53..ce1c154 100644
--- a/man/lvcreate.8_pregen
+++ b/man/lvcreate.8_pregen
@@ -1,4 +1,4 @@
-.TH LVCREATE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvcreate \- Create a logical volume
.
diff --git a/man/lvdisplay.8_pregen b/man/lvdisplay.8_pregen
index 5670db4..ff15df0 100644
--- a/man/lvdisplay.8_pregen
+++ b/man/lvdisplay.8_pregen
@@ -1,4 +1,4 @@
-.TH LVDISPLAY 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVDISPLAY 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvdisplay \- Display information about a logical volume
.
diff --git a/man/lvextend.8_pregen b/man/lvextend.8_pregen
index d23b719..b81cad3 100644
--- a/man/lvextend.8_pregen
+++ b/man/lvextend.8_pregen
@@ -1,4 +1,4 @@
-.TH LVEXTEND 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVEXTEND 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvextend \- Add space to a logical volume
.
diff --git a/man/lvm-config.8_pregen b/man/lvm-config.8_pregen
index 3eb34a5..6c02ed8 100644
--- a/man/lvm-config.8_pregen
+++ b/man/lvm-config.8_pregen
@@ -1,4 +1,4 @@
-.TH LVM CONFIG 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVM CONFIG 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvm config \- Display and manipulate configuration information
.
diff --git a/man/lvm-dumpconfig.8_pregen b/man/lvm-dumpconfig.8_pregen
index 1b47fd5..34c329c 100644
--- a/man/lvm-dumpconfig.8_pregen
+++ b/man/lvm-dumpconfig.8_pregen
@@ -1,4 +1,4 @@
-.TH LVM DUMPCONFIG 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVM DUMPCONFIG 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvm dumpconfig \- Display and manipulate configuration information
.
diff --git a/man/lvm-fullreport.8_pregen b/man/lvm-fullreport.8_pregen
index c62b449..25d780e 100644
--- a/man/lvm-fullreport.8_pregen
+++ b/man/lvm-fullreport.8_pregen
@@ -1,4 +1,4 @@
-.TH LVM FULLREPORT 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVM FULLREPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvm fullreport \- Display full report
.
diff --git a/man/lvm-lvpoll.8_pregen b/man/lvm-lvpoll.8_pregen
index 5f2b225..fde6d93 100644
--- a/man/lvm-lvpoll.8_pregen
+++ b/man/lvm-lvpoll.8_pregen
@@ -1,4 +1,4 @@
-.TH LVM LVPOLL 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVM LVPOLL 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvm lvpoll \- Continue already initiated poll operation on a logical volume
.
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
index cfa03fe..3ed8137 100644
--- a/man/lvmconfig.8_pregen
+++ b/man/lvmconfig.8_pregen
@@ -1,4 +1,4 @@
-.TH LVMCONFIG 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVMCONFIG 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvmconfig \- Display and manipulate configuration information
.
diff --git a/man/lvmdiskscan.8_pregen b/man/lvmdiskscan.8_pregen
index 67e923b..b8c5025 100644
--- a/man/lvmdiskscan.8_pregen
+++ b/man/lvmdiskscan.8_pregen
@@ -1,4 +1,4 @@
-.TH LVMDISKSCAN 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVMDISKSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvmdiskscan \- List devices that may be used as physical volumes
.
diff --git a/man/lvreduce.8_pregen b/man/lvreduce.8_pregen
index 931b754..98c0414 100644
--- a/man/lvreduce.8_pregen
+++ b/man/lvreduce.8_pregen
@@ -1,4 +1,4 @@
-.TH LVREDUCE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVREDUCE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvreduce \- Reduce the size of a logical volume
.
diff --git a/man/lvremove.8_pregen b/man/lvremove.8_pregen
index a502397..83d733e 100644
--- a/man/lvremove.8_pregen
+++ b/man/lvremove.8_pregen
@@ -1,4 +1,4 @@
-.TH LVREMOVE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvremove \- Remove logical volume(s) from the system
.
diff --git a/man/lvrename.8_pregen b/man/lvrename.8_pregen
index 3eafe3d..67a9b84 100644
--- a/man/lvrename.8_pregen
+++ b/man/lvrename.8_pregen
@@ -1,4 +1,4 @@
-.TH LVRENAME 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVRENAME 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvrename \- Rename a logical volume
.
diff --git a/man/lvresize.8_pregen b/man/lvresize.8_pregen
index ca8c2bf..0f04b40 100644
--- a/man/lvresize.8_pregen
+++ b/man/lvresize.8_pregen
@@ -1,4 +1,4 @@
-.TH LVRESIZE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVRESIZE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvresize \- Resize a logical volume
.
diff --git a/man/lvs.8_pregen b/man/lvs.8_pregen
index bd7bd3e..76c25a5 100644
--- a/man/lvs.8_pregen
+++ b/man/lvs.8_pregen
@@ -1,4 +1,4 @@
-.TH LVS 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvs \- Display information about logical volumes
.
diff --git a/man/lvscan.8_pregen b/man/lvscan.8_pregen
index f386352..f01631b 100644
--- a/man/lvscan.8_pregen
+++ b/man/lvscan.8_pregen
@@ -1,4 +1,4 @@
-.TH LVSCAN 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH LVSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvscan \- List all logical volumes in all volume groups
.
diff --git a/man/pvchange.8_pregen b/man/pvchange.8_pregen
index ccfce11..db9cc95 100644
--- a/man/pvchange.8_pregen
+++ b/man/pvchange.8_pregen
@@ -1,4 +1,4 @@
-.TH PVCHANGE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvchange \- Change attributes of physical volume(s)
.
diff --git a/man/pvck.8_pregen b/man/pvck.8_pregen
index 194e41a..ff08c45 100644
--- a/man/pvck.8_pregen
+++ b/man/pvck.8_pregen
@@ -1,4 +1,4 @@
-.TH PVCK 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVCK 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvck \- Check the consistency of physical volume(s)
.
diff --git a/man/pvcreate.8_pregen b/man/pvcreate.8_pregen
index deb9cd1..3a37bfa 100644
--- a/man/pvcreate.8_pregen
+++ b/man/pvcreate.8_pregen
@@ -1,4 +1,4 @@
-.TH PVCREATE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvcreate \- Initialize physical volume(s) for use by LVM
.
diff --git a/man/pvdisplay.8_pregen b/man/pvdisplay.8_pregen
index 4e2b85e..2be292a 100644
--- a/man/pvdisplay.8_pregen
+++ b/man/pvdisplay.8_pregen
@@ -1,4 +1,4 @@
-.TH PVDISPLAY 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVDISPLAY 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvdisplay \- Display various attributes of physical volume(s)
.
diff --git a/man/pvmove.8_pregen b/man/pvmove.8_pregen
index 814773d..e7bc556 100644
--- a/man/pvmove.8_pregen
+++ b/man/pvmove.8_pregen
@@ -1,4 +1,4 @@
-.TH PVMOVE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvmove \- Move extents from one physical volume to another
.
diff --git a/man/pvremove.8_pregen b/man/pvremove.8_pregen
index 0a9dd4c..0cc9302 100644
--- a/man/pvremove.8_pregen
+++ b/man/pvremove.8_pregen
@@ -1,4 +1,4 @@
-.TH PVREMOVE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvremove \- Remove LVM label(s) from physical volume(s)
.
diff --git a/man/pvresize.8_pregen b/man/pvresize.8_pregen
index c5acfe3..76f3453 100644
--- a/man/pvresize.8_pregen
+++ b/man/pvresize.8_pregen
@@ -1,4 +1,4 @@
-.TH PVRESIZE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVRESIZE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvresize \- Resize physical volume(s)
.
diff --git a/man/pvs.8_pregen b/man/pvs.8_pregen
index 3e8b909..905ccce 100644
--- a/man/pvs.8_pregen
+++ b/man/pvs.8_pregen
@@ -1,4 +1,4 @@
-.TH PVS 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvs \- Display information about physical volumes
.
diff --git a/man/pvscan.8_pregen b/man/pvscan.8_pregen
index ae2a6a4..d7c35dd 100644
--- a/man/pvscan.8_pregen
+++ b/man/pvscan.8_pregen
@@ -1,4 +1,4 @@
-.TH PVSCAN 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH PVSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvscan \- List all physical volumes
.
diff --git a/man/vgcfgbackup.8_pregen b/man/vgcfgbackup.8_pregen
index a0a4b07..f4b6f38 100644
--- a/man/vgcfgbackup.8_pregen
+++ b/man/vgcfgbackup.8_pregen
@@ -1,4 +1,4 @@
-.TH VGCFGBACKUP 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGCFGBACKUP 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgcfgbackup \- Backup volume group configuration(s)
.
@@ -16,7 +16,7 @@ See \fBvgcfgrestore\fP for information on using the back up
files.
In a default installation, each VG is backed up into a separate file
-bearing the name of the VG in the directory \fI/etc/lvm/backup\fP.
+bearing the name of the VG in the directory \fI#DEFAULT_BACKUP_DIR#\fP.
To use an alternative back up file, use \fB\-f\fP. In this case, when
backing up multiple VGs, the file name is treated as a template, with %s
@@ -25,7 +25,7 @@ replaced by the VG name.
NB. This DOES NOT back up the data content of LVs.
It may also be useful to regularly back up the files in
-\fI/etc/lvm\fP.
+\fI#DEFAULT_SYS_DIR#\fP.
.SH USAGE
\fBvgcfgbackup\fP
.br
diff --git a/man/vgcfgrestore.8_pregen b/man/vgcfgrestore.8_pregen
index 74b6e05..07cc1ed 100644
--- a/man/vgcfgrestore.8_pregen
+++ b/man/vgcfgrestore.8_pregen
@@ -1,4 +1,4 @@
-.TH VGCFGRESTORE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGCFGRESTORE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgcfgrestore \- Restore volume group configuration
.
diff --git a/man/vgchange.8_pregen b/man/vgchange.8_pregen
index 9e4b818..cd5cc30 100644
--- a/man/vgchange.8_pregen
+++ b/man/vgchange.8_pregen
@@ -1,4 +1,4 @@
-.TH VGCHANGE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgchange \- Change volume group attributes
.
diff --git a/man/vgck.8_pregen b/man/vgck.8_pregen
index 01adbfc..9612367 100644
--- a/man/vgck.8_pregen
+++ b/man/vgck.8_pregen
@@ -1,4 +1,4 @@
-.TH VGCK 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGCK 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgck \- Check the consistency of volume group(s)
.
diff --git a/man/vgconvert.8_pregen b/man/vgconvert.8_pregen
index 795b436..b322b8f 100644
--- a/man/vgconvert.8_pregen
+++ b/man/vgconvert.8_pregen
@@ -1,4 +1,4 @@
-.TH VGCONVERT 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGCONVERT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgconvert \- Change volume group metadata format
.
diff --git a/man/vgcreate.8_pregen b/man/vgcreate.8_pregen
index 8279e33..6bd4b02 100644
--- a/man/vgcreate.8_pregen
+++ b/man/vgcreate.8_pregen
@@ -1,4 +1,4 @@
-.TH VGCREATE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgcreate \- Create a volume group
.
diff --git a/man/vgdisplay.8_pregen b/man/vgdisplay.8_pregen
index cddac7a..6fe90a5 100644
--- a/man/vgdisplay.8_pregen
+++ b/man/vgdisplay.8_pregen
@@ -1,4 +1,4 @@
-.TH VGDISPLAY 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGDISPLAY 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgdisplay \- Display volume group information
.
diff --git a/man/vgexport.8_pregen b/man/vgexport.8_pregen
index 6138c0f..b714404 100644
--- a/man/vgexport.8_pregen
+++ b/man/vgexport.8_pregen
@@ -1,4 +1,4 @@
-.TH VGEXPORT 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGEXPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgexport \- Unregister volume group(s) from the system
.
diff --git a/man/vgextend.8_pregen b/man/vgextend.8_pregen
index 6d8d6f8..5b65c99 100644
--- a/man/vgextend.8_pregen
+++ b/man/vgextend.8_pregen
@@ -1,4 +1,4 @@
-.TH VGEXTEND 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGEXTEND 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgextend \- Add physical volumes to a volume group
.
diff --git a/man/vgimport.8_pregen b/man/vgimport.8_pregen
index c31d9f4..84359e5 100644
--- a/man/vgimport.8_pregen
+++ b/man/vgimport.8_pregen
@@ -1,4 +1,4 @@
-.TH VGIMPORT 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGIMPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgimport \- Register exported volume group with system
.
diff --git a/man/vgimportclone.8_pregen b/man/vgimportclone.8_pregen
index f68a384..24afbf6 100644
--- a/man/vgimportclone.8_pregen
+++ b/man/vgimportclone.8_pregen
@@ -1,4 +1,4 @@
-.TH VGIMPORTCLONE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGIMPORTCLONE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgimportclone \- Import a VG from cloned PVs
.
diff --git a/man/vgmerge.8_pregen b/man/vgmerge.8_pregen
index 52c7f56..23c4285 100644
--- a/man/vgmerge.8_pregen
+++ b/man/vgmerge.8_pregen
@@ -1,4 +1,4 @@
-.TH VGMERGE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGMERGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgmerge \- Merge volume groups
.
diff --git a/man/vgmknodes.8_pregen b/man/vgmknodes.8_pregen
index 501d6e1..6cb68f3 100644
--- a/man/vgmknodes.8_pregen
+++ b/man/vgmknodes.8_pregen
@@ -1,4 +1,4 @@
-.TH VGMKNODES 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGMKNODES 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgmknodes \- Create the special files for volume group devices in /dev
.
diff --git a/man/vgreduce.8_pregen b/man/vgreduce.8_pregen
index e4f1575..bf4e354 100644
--- a/man/vgreduce.8_pregen
+++ b/man/vgreduce.8_pregen
@@ -1,4 +1,4 @@
-.TH VGREDUCE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGREDUCE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgreduce \- Remove physical volume(s) from a volume group
.
diff --git a/man/vgremove.8_pregen b/man/vgremove.8_pregen
index e9b2db9..c175188 100644
--- a/man/vgremove.8_pregen
+++ b/man/vgremove.8_pregen
@@ -1,4 +1,4 @@
-.TH VGREMOVE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgremove \- Remove volume group(s)
.
diff --git a/man/vgrename.8_pregen b/man/vgrename.8_pregen
index 1e35c4f..4e8d609 100644
--- a/man/vgrename.8_pregen
+++ b/man/vgrename.8_pregen
@@ -1,4 +1,4 @@
-.TH VGRENAME 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGRENAME 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgrename \- Rename a volume group
.
diff --git a/man/vgs.8_pregen b/man/vgs.8_pregen
index aa6e2f9..4313624 100644
--- a/man/vgs.8_pregen
+++ b/man/vgs.8_pregen
@@ -1,4 +1,4 @@
-.TH VGS 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgs \- Display information about volume groups
.
diff --git a/man/vgscan.8_pregen b/man/vgscan.8_pregen
index 1e1547a..1e13df2 100644
--- a/man/vgscan.8_pregen
+++ b/man/vgscan.8_pregen
@@ -1,4 +1,4 @@
-.TH VGSCAN 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgscan \- Search for all volume groups
.
diff --git a/man/vgsplit.8_pregen b/man/vgsplit.8_pregen
index a013c12..bb9e784 100644
--- a/man/vgsplit.8_pregen
+++ b/man/vgsplit.8_pregen
@@ -1,4 +1,4 @@
-.TH VGSPLIT 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
+.TH VGSPLIT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
vgsplit \- Move physical volumes into a new or existing volume group
.
7 years, 2 months
master - make.tmpl: Support per-object DEFS.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0c74afa1c613537e5ae...
Commit: 0c74afa1c613537e5aed33ed230755cfe8b0ab03
Parent: 2d007673947b26bd0807cb637abb2fb9563c5e41
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Mar 16 23:03:03 2017 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Mar 16 23:03:03 2017 +0000
make.tmpl: Support per-object DEFS.
Same as CFLAGS.
---
make.tmpl.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/make.tmpl.in b/make.tmpl.in
index 2af1b1c..41f23e6 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -416,7 +416,7 @@ endif
.LIBPATTERNS = lib%.so lib%.a
%.o: %.c
- $(CC) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
+ $(CC) -c $(INCLUDES) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
%.o: %.cpp
$(CXX) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
7 years, 2 months
master - tools: Avoid man-generator compilation warnings.
by Alasdair Kergon
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2d007673947b26bd080...
Commit: 2d007673947b26bd0807cb637abb2fb9563c5e41
Parent: ad4158bac72418ddd044110ab3663757cea6a649
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Mar 16 22:39:04 2017 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Mar 16 22:39:04 2017 +0000
tools: Avoid man-generator compilation warnings.
Unused variables and make fns with missing prototypes static.
---
tools/command.c | 57 +++++++++++++++++++++++++++----------------------------
1 files changed, 28 insertions(+), 29 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 6335d06..e14291d 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -2174,7 +2174,6 @@ static void print_val_man(struct command_name *cname, int opt_enum, int val_enum
}
if (strchr(str, '|')) {
- int len = strlen(str);
line = dm_strdup(str);
split_line(line, &line_argc, line_argv, '|');
for (i = 0; i < line_argc; i++) {
@@ -2294,7 +2293,7 @@ static char *man_long_opt_name(const char *cmdname, int opt_enum)
return long_opt_name;
}
-void print_man_usage(char *lvmname, struct command *cmd)
+static void _print_man_usage(char *lvmname, struct command *cmd)
{
struct command_name *cname;
int onereq = (cmd->cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT) ? 1 : 0;
@@ -2602,10 +2601,10 @@ void print_man_usage(char *lvmname, struct command *cmd)
* then options with only long names, alphabetically
*/
-void print_man_usage_common_lvm(struct command *cmd)
+static void _print_man_usage_common_lvm(struct command *cmd)
{
struct command_name *cname;
- int i, sep, rp, oo, op, opt_enum;
+ int i, sep, oo, opt_enum;
if (!(cname = find_command_name(cmd->name)))
return;
@@ -2689,10 +2688,10 @@ void print_man_usage_common_lvm(struct command *cmd)
return;
}
-void print_man_usage_common_cmd(struct command *cmd)
+static void _print_man_usage_common_cmd(struct command *cmd)
{
struct command_name *cname;
- int i, sep, rp, oo, op, opt_enum;
+ int i, sep, oo, opt_enum;
if (!(cname = find_command_name(cmd->name)))
return;
@@ -2811,7 +2810,7 @@ void print_man_usage_common_cmd(struct command *cmd)
* "another line of text."
*/
-static void print_man_option_desc(struct command_name *cname, int opt_enum)
+static void _print_man_option_desc(struct command_name *cname, int opt_enum)
{
const char *desc = opt_names[opt_enum].desc;
char buf[DESC_LINE];
@@ -2878,7 +2877,7 @@ static void print_man_option_desc(struct command_name *cname, int opt_enum)
* Print a list of all options names for a given command name.
*/
-void print_man_all_options_list(struct command_name *cname)
+static void _print_man_all_options_list(struct command_name *cname)
{
int opt_enum, val_enum;
int sep = 0;
@@ -2927,7 +2926,7 @@ void print_man_all_options_list(struct command_name *cname)
* All options used for a given command name, along with descriptions.
*/
-void print_man_all_options_desc(struct command_name *cname)
+static void _print_man_all_options_desc(struct command_name *cname)
{
int opt_enum, val_enum;
int sep = 0;
@@ -2971,7 +2970,7 @@ void print_man_all_options_desc(struct command_name *cname)
if (opt_names[opt_enum].desc) {
printf("\n");
printf(".br\n");
- print_man_option_desc(cname, opt_enum);
+ _print_man_option_desc(cname, opt_enum);
}
printf(".ad b\n");
@@ -2980,7 +2979,7 @@ void print_man_all_options_desc(struct command_name *cname)
}
}
-void print_man_all_positions_desc(struct command_name *cname)
+static void _print_man_all_positions_desc(struct command_name *cname)
{
struct command *cmd;
int ci, rp, op;
@@ -3136,7 +3135,7 @@ void print_man_all_positions_desc(struct command_name *cname)
"For example, LVM_VG_NAME can generally be substituted for a required VG parameter.\n");
}
-void print_desc_man(const char *desc)
+static void _print_desc_man(const char *desc)
{
char buf[DESC_LINE] = {0};
int di = 0;
@@ -3211,7 +3210,7 @@ static void include_description_file(char *name, char *des_file)
close(fd);
}
-void print_man(char *name, char *des_file, int secondary)
+static void _print_man(char *name, char *des_file, int secondary)
{
struct command_name *cname;
struct command *cmd, *prev_cmd = NULL;
@@ -3233,13 +3232,13 @@ void print_man(char *name, char *des_file, int secondary)
cmd = &commands[i];
if (prev_cmd && strcmp(prev_cmd->name, cmd->name)) {
- print_man_usage_common_cmd(prev_cmd);
- print_man_usage_common_lvm(prev_cmd);
+ _print_man_usage_common_cmd(prev_cmd);
+ _print_man_usage_common_lvm(prev_cmd);
printf(".SH OPTIONS\n");
- print_man_all_options_desc(cname);
+ _print_man_all_options_desc(cname);
printf(".SH VARIABLES\n");
- print_man_all_positions_desc(cname);
+ _print_man_all_positions_desc(cname);
prev_cmd = NULL;
}
@@ -3291,7 +3290,7 @@ void print_man(char *name, char *des_file, int secondary)
/* listing them all when there's only 1 or 2 is just repetative */
if (cname->variants > 2) {
printf(".P\n");
- print_man_all_options_list(cname);
+ _print_man_all_options_list(cname);
}
if (des_file) {
@@ -3302,21 +3301,21 @@ void print_man(char *name, char *des_file, int secondary)
}
if (cmd->desc) {
- print_desc_man(cmd->desc);
+ _print_desc_man(cmd->desc);
printf(".P\n");
}
- print_man_usage(lvmname, cmd);
+ _print_man_usage(lvmname, cmd);
if (i == (COMMAND_COUNT - 1)) {
- print_man_usage_common_cmd(cmd);
- print_man_usage_common_lvm(cmd);
+ _print_man_usage_common_cmd(cmd);
+ _print_man_usage_common_lvm(cmd);
printf("\n");
printf(".SH OPTIONS\n");
- print_man_all_options_desc(cname);
+ _print_man_all_options_desc(cname);
printf(".SH VARIABLES\n");
- print_man_all_positions_desc(cname);
+ _print_man_all_positions_desc(cname);
} else {
if (cname->variants > 2)
printf("-\n");
@@ -3327,7 +3326,7 @@ void print_man(char *name, char *des_file, int secondary)
}
}
-void print_man_secondary(char *name)
+static void _print_man_secondary(char *name)
{
struct command *cmd;
char *lvmname = name;
@@ -3360,11 +3359,11 @@ void print_man_secondary(char *name)
}
if (cmd->desc) {
- print_desc_man(cmd->desc);
+ _print_desc_man(cmd->desc);
printf(".P\n");
}
- print_man_usage(lvmname, cmd);
+ _print_man_usage(lvmname, cmd);
printf("-\n");
printf("\n");
@@ -3424,9 +3423,9 @@ int main(int argc, char *argv[])
factor_common_options();
if (primary)
- print_man(cmdname, desfile, secondary);
+ _print_man(cmdname, desfile, secondary);
else if (secondary)
- print_man_secondary(cmdname);
+ _print_man_secondary(cmdname);
return 0;
}
7 years, 2 months
master - man: lvmraid(7) clarifications
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ad4158bac72418ddd04...
Commit: ad4158bac72418ddd044110ab3663757cea6a649
Parent: 4a3e30d1026d9bde85cda325b1c0a704e980b7db
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Thu Mar 16 23:10:57 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Thu Mar 16 23:10:57 2017 +0100
man: lvmraid(7) clarifications
---
man/lvmraid.7_main | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/man/lvmraid.7_main b/man/lvmraid.7_main
index d738cf8..8ac59c6 100644
--- a/man/lvmraid.7_main
+++ b/man/lvmraid.7_main
@@ -273,16 +273,16 @@ written.
The RAID implementation keeps track of which parts of a RAID LV are
synchronized. This uses a bitmap saved in the RAID metadata. The bitmap
can exclude large parts of the LV from synchronization to reduce the
-amount of work. Without this, the entire LV would need to be synchronized
-every time it was activated. When a RAID LV is first created and
-activated the first synchronization is called initialization.
+amount of work after a crash. Without this, the entire LV would need
+to be synchronized every time it was activated. When a RAID LV is
+first created and activated the first synchronization is called initialization.
Automatic synchronization happens when a RAID LV is activated, but it is
usually partial because the bitmaps reduce the areas that are checked.
-A full sync may become necessary when devices in the RAID LV are changed.
+A full sync becomes necessary when devices in the RAID LV are replaced.
The synchronization status of a RAID LV is reported by the
-following command, where "image synced" means sync is complete:
+following command, where "Cpy%Sync" = "100%" means sync is complete:
.B lvs -a -o name,sync_percent
@@ -824,8 +824,8 @@ synchronous.
RAID takeover is converting a RAID LV from one RAID level to another, e.g.
raid5 to raid6. Changing the RAID level is usually done to increase or
-decrease resilience to device failures. This is done using lvconvert and
-specifying the new RAID level as the LV type:
+decrease resilience to device failures or to restripe LVs. This is done
+using lvconvert and specifying the new RAID level as the LV type:
.B lvconvert --type
.I RaidLevel
7 years, 2 months