master - writecache: correct usage of const struct
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=03f9cd95b4bad1e055c...
Commit: 03f9cd95b4bad1e055ce932742426b0724f607c3
Parent: fb7a3fe8d652592c41e149702efd101cc2954fed
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Aug 28 18:26:40 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 28 21:43:02 2020 +0200
writecache: correct usage of const struct
---
lib/metadata/writecache_manip.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/metadata/writecache_manip.c b/lib/metadata/writecache_manip.c
index fade82ef5..0230d6160 100644
--- a/lib/metadata/writecache_manip.c
+++ b/lib/metadata/writecache_manip.c
@@ -59,7 +59,7 @@ int lv_is_writecache_cachevol(const struct logical_volume *lv)
}
static int _get_writecache_kernel_error(struct cmd_context *cmd,
- struct logical_volume *lv,
+ const struct logical_volume *lv,
uint32_t *kernel_error)
{
struct lv_with_info_and_seg_status status;
@@ -241,7 +241,7 @@ static int _lv_detach_writecache_cachevol_active(struct logical_volume *lv, int
struct volume_group *vg = lv->vg;
struct logical_volume *lv_fast;
struct logical_volume *lv_wcorig;
- struct logical_volume *lv_old;
+ const struct logical_volume *lv_old;
struct lv_segment *seg = first_seg(lv);
uint32_t kernel_error = 0;
@@ -299,7 +299,7 @@ static int _lv_detach_writecache_cachevol_active(struct logical_volume *lv, int
* check for kernel errors based on the old version of LV which
* is still present in the kernel.
*/
- if (!(lv_old = (struct logical_volume *)lv_committed(lv))) {
+ if (!(lv_old = lv_committed(lv))) {
log_error("Failed to get lv_committed in writecache detach.");
return 0;
}
3 years, 8 months
master - container_of: drop needless const converion
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=fb7a3fe8d652592c41e...
Commit: fb7a3fe8d652592c41e149702efd101cc2954fed
Parent: ca54afd70166b1aece6e3893e6649e67731336aa
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Aug 28 18:26:07 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 28 21:43:02 2020 +0200
container_of: drop needless const converion
---
base/memory/container_of.h | 2 +-
libdm/libdevmapper.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/base/memory/container_of.h b/base/memory/container_of.h
index ddb795935..faf167964 100644
--- a/base/memory/container_of.h
+++ b/base/memory/container_of.h
@@ -18,7 +18,7 @@
//----------------------------------------------------------------
#define container_of(v, t, head) \
- ((t *)((const char *)(v) - offsetof(t, head)))
+ ((t *)((char *)(v) - offsetof(t, head)))
//----------------------------------------------------------------
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 03a43eb45..e9b140563 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -2471,7 +2471,7 @@ struct dm_list *dm_list_next(const struct dm_list *head, const struct dm_list *e
* contained in a structure of type t, return the containing structure.
*/
#define dm_list_struct_base(v, t, head) \
- ((t *)((const char *)(v) - offsetof(t, head)))
+ ((t *)((char *)(v) - offsetof(t, head)))
/*
* Given the address v of an instance of 'struct dm_list list' contained in
3 years, 8 months
master - tests: check we detect lvm.conf read failure
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ca54afd70166b1aece6...
Commit: ca54afd70166b1aece6e3893e6649e67731336aa
Parent: e3e04b99f21428d6392d5a430c7b7a321dbd4ed1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Aug 27 12:55:22 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 28 21:43:02 2020 +0200
tests: check we detect lvm.conf read failure
No coredumps with unreadable lvm.conf.
---
test/shell/lvm-conf-error.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/test/shell/lvm-conf-error.sh b/test/shell/lvm-conf-error.sh
new file mode 100644
index 000000000..17b7dad97
--- /dev/null
+++ b/test/shell/lvm-conf-error.sh
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2020 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# Check what happens when reading of lvm.conf fails
+
+. lib/inittest
+
+MKFS=mkfs.ext3
+which $MKFS || skip
+which filefrag || skip
+
+aux prepare_vg 1
+
+mkdir mnt
+
+lvcreate -L5M -n $lv1 $vg
+
+$MKFS "$DM_DEV_DIR/$vg/$lv1"
+mount "$DM_DEV_DIR/$vg/$lv1" mnt
+cp etc/lvm.conf mnt
+
+# Figure where the file is placed in filesystem
+filefrag -e mnt/lvm.conf | tee frags
+umount mnt
+
+# 1st. sector for filesystem
+first_extent_sector=$(get first_extent_sector "$dev1")
+
+# find 1st. 1k block of file and trim '..' from printed number
+file_block=$(awk '/0:/ { gsub(/\.\.$/, "", $4); print $4}' frags)
+
+# figure sector position on DM device
+file_sector=$(( file_block * 2 + first_extent_sector ))
+
+aux error_dev "$dev1" $file_sector:2
+
+mount "$DM_DEV_DIR/$vg/$lv1" mnt
+
+# force lvm to read lvm.conf from mnt path
+LVM_SYSTEM_DIR=mnt lvs 2>&1 | tee out || true
+
+# shell give nice error message
+grep "Failed to load config file mnt/lvm.conf" out
+
+aux enable_dev "$dev1"
+
+umount mnt
+
+vgremove -ff $vg
3 years, 8 months
master - config: drop reading file with mmap
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e3e04b99f21428d6392...
Commit: e3e04b99f21428d6392d5a430c7b7a321dbd4ed1
Parent: 9a88a9c4ce8fc930328e8d7d56fae8e964f8df02
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Aug 27 12:49:03 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Aug 28 21:43:02 2020 +0200
config: drop reading file with mmap
While normally the 'mmap' file reading is better utilizing resources,
it has also its odd side with handling errors - so while we normally
use the mmap only for reading regular files from root filesystem
(i.e. lvm.conf) we can't prevent error to happen during the read
of these file - and such error unfortunately ends with SIGBUS error.
Maintaing signal handler would be compilated - so switch to slightly
less effiecient but more error resistant read() functinality.
---
lib/config/config.c | 54 ++++++++++++++++++++++++-----------------------------
1 file changed, 24 insertions(+), 30 deletions(-)
diff --git a/lib/config/config.c b/lib/config/config.c
index b3e230d19..a25b7db6e 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -503,10 +503,10 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r
{
char *fb, *fe;
int r = 0;
- int use_mmap = 1;
- off_t mmap_offset = 0;
+ int sz, use_plain_read = 1;
char *buf = NULL;
struct config_source *cs = dm_config_get_custom(cft);
+ size_t rsize;
if (!_is_file_based_config_source(cs->type)) {
log_error(INTERNAL_ERROR "config_file_read_fd: expected file, special file "
@@ -515,26 +515,28 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r
return 0;
}
- /* Only use mmap with regular files */
+ /* Only use plain read with regular files */
if (!(dev->flags & DEV_REGULAR) || size2)
- use_mmap = 0;
-
- if (use_mmap) {
- mmap_offset = offset % lvm_getpagesize();
- /* memory map the file */
- fb = mmap((caddr_t) 0, size + mmap_offset, PROT_READ,
- MAP_PRIVATE, dev_fd(dev), offset - mmap_offset);
- if (fb == (caddr_t) (-1)) {
- log_sys_error("mmap", dev_name(dev));
- goto out;
+ use_plain_read = 0;
+
+ if (!(buf = malloc(size + size2))) {
+ log_error("Failed to allocate circular buffer.");
+ return 0;
+ }
+
+ if (use_plain_read) {
+ /* Note: also used for lvm.conf to read all settings */
+ for (rsize = 0; rsize < size; rsize += sz) {
+ do {
+ sz = read(dev_fd(dev), buf + rsize, size - rsize);
+ } while ((sz < 0) && ((errno == EINTR) || (errno == EAGAIN)));
+
+ if (sz < 0) {
+ log_sys_error("read", dev_name(dev));
+ goto out;
+ }
}
- fb = fb + mmap_offset;
} else {
- if (!(buf = malloc(size + size2))) {
- log_error("Failed to allocate circular buffer.");
- return 0;
- }
-
if (!dev_read_bytes(dev, offset, size, buf))
goto out;
@@ -542,10 +544,10 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r
if (!dev_read_bytes(dev, offset2, size2, buf + size))
goto out;
}
-
- fb = buf;
}
+ fb = buf;
+
/*
* The checksum passed in is the checksum from the mda_header
* preceding this metadata. They should always match.
@@ -573,15 +575,7 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r
r = 1;
out:
- if (!use_mmap)
- free(buf);
- else {
- /* unmap the file */
- if (munmap(fb - mmap_offset, size + mmap_offset)) {
- log_sys_error("munmap", dev_name(dev));
- r = 0;
- }
- }
+ free(buf);
return r;
}
3 years, 8 months
master - Revert "lvdisplay: dispaly correct status when underlying devs missing"
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9a88a9c4ce8fc930328...
Commit: 9a88a9c4ce8fc930328e8d7d56fae8e964f8df02
Parent: 1d0dc74f9147e3c1f3681efa4166cbe2edcb6571
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Aug 28 13:26:50 2020 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Aug 28 13:28:15 2020 -0500
Revert "lvdisplay: dispaly correct status when underlying devs missing"
This reverts commit 1d0dc74f9147e3c1f3681efa4166cbe2edcb6571.
We should avoid adding anything new to lvdisplay and report
new information via lvs reporting fields.
---
lib/display/display.c | 13 +++---------
lib/metadata/segtype.h | 1 -
lib/raid/raid.c | 54 --------------------------------------------------
3 files changed, 3 insertions(+), 65 deletions(-)
diff --git a/lib/display/display.c b/lib/display/display.c
index 3bb570f03..36c9879b3 100644
--- a/lib/display/display.c
+++ b/lib/display/display.c
@@ -399,7 +399,7 @@ int lvdisplay_full(struct cmd_context *cmd,
void *handle __attribute__((unused)))
{
struct lvinfo info;
- int inkernel, snap_active = 0, partial = 0, raid_is_avail = 1;
+ int inkernel, snap_active = 0;
char uuid[64] __attribute__((aligned(8)));
const char *access_str;
struct lv_segment *snap_seg = NULL, *mirror_seg = NULL;
@@ -553,18 +553,11 @@ int lvdisplay_full(struct cmd_context *cmd,
log_print("LV VDO Pool name %s", seg_lv(seg, 0)->name);
}
- if (lv_is_partial(lv)) {
- partial = 1;
- if (lv_is_raid(lv))
- raid_is_avail = raid_is_available(lv) ? 1 : 0;
- }
-
if (inkernel && info.suspended)
log_print("LV Status suspended");
else if (activation())
- log_print("LV Status %savailable %s",
- (inkernel && raid_is_avail) ? "" : "NOT ",
- partial ? "(partial)" : "");
+ log_print("LV Status %savailable",
+ inkernel ? "" : "NOT ");
/********* FIXME lv_number
log_print("LV # %u", lv->lv_number + 1);
diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h
index 1a840707d..08ddc3565 100644
--- a/lib/metadata/segtype.h
+++ b/lib/metadata/segtype.h
@@ -326,7 +326,6 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd,
#ifdef RAID_INTERNAL
int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
-bool raid_is_available(const struct logical_volume *lv);
#endif
#define THIN_FEATURE_DISCARDS (1U << 0)
diff --git a/lib/raid/raid.c b/lib/raid/raid.c
index 4ed77e9a8..e88a15408 100644
--- a/lib/raid/raid.c
+++ b/lib/raid/raid.c
@@ -25,60 +25,6 @@
#include "lib/metadata/metadata.h"
#include "lib/metadata/lv_alloc.h"
-/*
- * below case think as available, return true:
- * - raid 1: at least 1 disk live
- * - raid 10: loose 1 disk
- * - raid 4/5: loose 1 disk
- * - raid 6: loose 2 disk
- *
- * raid 0: if there is any disk loose, return false
- * */
-bool raid_is_available(const struct logical_volume *lv)
-{
- int s, missing_pv = 0, exist_pv = 0;
- bool ret = true;
- struct lv_segment *seg = NULL;
-
- dm_list_iterate_items(seg, &lv->segments) {
- for (s = 0; s < seg->area_count; ++s) {
- if (seg_type(seg, s) == AREA_LV) {
- if (seg_lv(seg, s)->status & PARTIAL_LV)
- missing_pv++;
- else
- exist_pv++;
- }
- }
- }
- if (seg_is_any_raid0(first_seg(lv))){
- ret = missing_pv ? false : true;
- goto out;
- }
- if (seg_is_raid1(first_seg(lv))){
- ret = exist_pv ? true : false;
- goto out;
- }
- if (seg_is_any_raid10(first_seg(lv))) {
- ret = (missing_pv > 1) ? false : true;
- goto out;
- }
- if (seg_is_raid4(first_seg(lv))) {
- ret = (missing_pv > 1) ? false : true;
- goto out;
- }
- if (seg_is_any_raid5(first_seg(lv))) {
- ret = (missing_pv > 1) ? false : true;
- goto out;
- }
- if (seg_is_any_raid6(first_seg(lv))) {
- ret = (missing_pv > 2) ? false : true;
- goto out;
- }
-
-out:
- return ret;
-}
-
static int _raid_target_present(struct cmd_context *cmd,
const struct lv_segment *seg __attribute__((unused)),
unsigned *attributes);
3 years, 8 months
master - lvdisplay: dispaly correct status when underlying devs missing
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1d0dc74f9147e3c1f36...
Commit: 1d0dc74f9147e3c1f3681efa4166cbe2edcb6571
Parent: 46d15b5e4d2830fce313d7a58a1498d61b7a8f86
Author: Zhao Heming <heming.zhao(a)suse.com>
AuthorDate: Mon Aug 24 09:47:04 2020 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Aug 24 09:47:04 2020 -0500
lvdisplay: dispaly correct status when underlying devs missing
reproducible steps:
1. vgcreate vg1 /dev/sda /dev/sdb
2. lvcreate --type raid0 -l 100%FREE -n raid0lv vg1
3. do remove the /dev/sdb action
4. lvdisplay show wrong 'LV Status'
After removing raid0 type LV underlying dev, lvdisplay still display
'available'. This is wrong status for raid0.
This patch add a new function raid_is_available(), which will handle
all raid case.
With this patch, lvdisplay will show
from:
LV Status available
to:
LV Status NOT available (partial)
Reviewed-by: Enzo Matsumiya <ematsumiya(a)suse.com>
Signed-off-by: Zhao Heming <heming.zhao(a)suse.com>
---
lib/display/display.c | 13 +++++++++---
lib/metadata/segtype.h | 1 +
lib/raid/raid.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+), 3 deletions(-)
diff --git a/lib/display/display.c b/lib/display/display.c
index 36c9879b3..3bb570f03 100644
--- a/lib/display/display.c
+++ b/lib/display/display.c
@@ -399,7 +399,7 @@ int lvdisplay_full(struct cmd_context *cmd,
void *handle __attribute__((unused)))
{
struct lvinfo info;
- int inkernel, snap_active = 0;
+ int inkernel, snap_active = 0, partial = 0, raid_is_avail = 1;
char uuid[64] __attribute__((aligned(8)));
const char *access_str;
struct lv_segment *snap_seg = NULL, *mirror_seg = NULL;
@@ -553,11 +553,18 @@ int lvdisplay_full(struct cmd_context *cmd,
log_print("LV VDO Pool name %s", seg_lv(seg, 0)->name);
}
+ if (lv_is_partial(lv)) {
+ partial = 1;
+ if (lv_is_raid(lv))
+ raid_is_avail = raid_is_available(lv) ? 1 : 0;
+ }
+
if (inkernel && info.suspended)
log_print("LV Status suspended");
else if (activation())
- log_print("LV Status %savailable",
- inkernel ? "" : "NOT ");
+ log_print("LV Status %savailable %s",
+ (inkernel && raid_is_avail) ? "" : "NOT ",
+ partial ? "(partial)" : "");
/********* FIXME lv_number
log_print("LV # %u", lv->lv_number + 1);
diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h
index 08ddc3565..1a840707d 100644
--- a/lib/metadata/segtype.h
+++ b/lib/metadata/segtype.h
@@ -326,6 +326,7 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd,
#ifdef RAID_INTERNAL
int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);
+bool raid_is_available(const struct logical_volume *lv);
#endif
#define THIN_FEATURE_DISCARDS (1U << 0)
diff --git a/lib/raid/raid.c b/lib/raid/raid.c
index e88a15408..4ed77e9a8 100644
--- a/lib/raid/raid.c
+++ b/lib/raid/raid.c
@@ -25,6 +25,60 @@
#include "lib/metadata/metadata.h"
#include "lib/metadata/lv_alloc.h"
+/*
+ * below case think as available, return true:
+ * - raid 1: at least 1 disk live
+ * - raid 10: loose 1 disk
+ * - raid 4/5: loose 1 disk
+ * - raid 6: loose 2 disk
+ *
+ * raid 0: if there is any disk loose, return false
+ * */
+bool raid_is_available(const struct logical_volume *lv)
+{
+ int s, missing_pv = 0, exist_pv = 0;
+ bool ret = true;
+ struct lv_segment *seg = NULL;
+
+ dm_list_iterate_items(seg, &lv->segments) {
+ for (s = 0; s < seg->area_count; ++s) {
+ if (seg_type(seg, s) == AREA_LV) {
+ if (seg_lv(seg, s)->status & PARTIAL_LV)
+ missing_pv++;
+ else
+ exist_pv++;
+ }
+ }
+ }
+ if (seg_is_any_raid0(first_seg(lv))){
+ ret = missing_pv ? false : true;
+ goto out;
+ }
+ if (seg_is_raid1(first_seg(lv))){
+ ret = exist_pv ? true : false;
+ goto out;
+ }
+ if (seg_is_any_raid10(first_seg(lv))) {
+ ret = (missing_pv > 1) ? false : true;
+ goto out;
+ }
+ if (seg_is_raid4(first_seg(lv))) {
+ ret = (missing_pv > 1) ? false : true;
+ goto out;
+ }
+ if (seg_is_any_raid5(first_seg(lv))) {
+ ret = (missing_pv > 1) ? false : true;
+ goto out;
+ }
+ if (seg_is_any_raid6(first_seg(lv))) {
+ ret = (missing_pv > 2) ? false : true;
+ goto out;
+ }
+
+out:
+ return ret;
+}
+
static int _raid_target_present(struct cmd_context *cmd,
const struct lv_segment *seg __attribute__((unused)),
unsigned *attributes);
3 years, 8 months
master - wipe_lv: close devices on error path
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=46d15b5e4d2830fce31...
Commit: 46d15b5e4d2830fce313d7a58a1498d61b7a8f86
Parent: 3e9664bacad3b31f074d58ff5ae8e2403a7ba9d0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Aug 19 14:40:08 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Aug 19 15:09:09 2020 +0200
wipe_lv: close devices on error path
Device was kept open preventing its deactivated and removed
on error path.
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/WHATS_NEW b/WHATS_NEW
index f3cb50692..cdc491c83 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.11 -
==================================
+ Fix missing device closing on wiping error path.
Update lvmvdo man page and better explain DISCARD usage.
Version 2.03.10 - 09th August 2020
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index f0ba3f0db..bb2ad5beb 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -7625,6 +7625,7 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
if (!wipe_known_signatures(lv->vg->cmd, dev, name, 0,
TYPE_DM_SNAPSHOT_COW,
wp.yes, wp.force, NULL)) {
+ label_scan_invalidate(dev);
log_error("Filed to wipe signatures of logical volume %s.",
display_lvname(lv));
return 0;
@@ -7659,6 +7660,7 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
(size_t) zero_sectors << SECTOR_SHIFT,
(uint8_t)wp.zero_value)) ||
!dev_write_zeros(dev, UINT64_C(0), (size_t) zero_sectors << SECTOR_SHIFT)) {
+ label_scan_invalidate(dev);
log_error("Failed to initialize %s of logical volume %s with value %d.",
display_size(lv->vg->cmd, zero_sectors),
display_lvname(lv), wp.zero_value);
3 years, 8 months
master - man: vdo improvals
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3e9664bacad3b31f074...
Commit: 3e9664bacad3b31f074d58ff5ae8e2403a7ba9d0
Parent: 7b41ea61b2e33dbfad754fd4c6e7851faf7ca5ef
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jul 22 00:41:35 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Aug 19 15:09:09 2020 +0200
man: vdo improvals
Add some more notes about discard.
Correct enumeration.
---
WHATS_NEW | 1 +
man/lvmvdo.7_main | 54 +++++++++++++++++++++++++++++++++++++++---------------
2 files changed, 40 insertions(+), 15 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 05d9c0ac9..f3cb50692 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.11 -
==================================
+ Update lvmvdo man page and better explain DISCARD usage.
Version 2.03.10 - 09th August 2020
==================================
diff --git a/man/lvmvdo.7_main b/man/lvmvdo.7_main
index 582f7a879..ab9a27811 100644
--- a/man/lvmvdo.7_main
+++ b/man/lvmvdo.7_main
@@ -1,7 +1,7 @@
.TH "LVMVDO" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.SH NAME
-lvmvdo \(em EXPERIMENTAL LVM Virtual Data Optimizer support
+lvmvdo \(em LVM Virtual Data Optimizer support
.SH DESCRIPTION
@@ -86,14 +86,14 @@ The primary methods for using VDO with lvm2:
.SS 1. Create VDOPoolLV with VDOLV
-Create an VDOPoolLV that will holds VDO data together with
+Create a VDOPoolLV that will hold VDO data together with
virtual size VDOLV, that user can use. When the virtual size
is not specified, then such LV is created with maximum size that
always fits into data volume even if there cannot happen any
deduplication and compression
(i.e. it can hold uncompressible content of /dev/urandom).
-When the name of VDOPoolLV is not specified, it tales name from
-sequence of vpool0, vpool1 ...
+When the name of VDOPoolLV is not specified, it is taken from
+the sequence of vpool0, vpool1 ...
Note: As the performance of TRIM/Discard operation is slow for large
volumes of VDO type, please try to avoid sending discard requests unless
@@ -112,7 +112,7 @@ operation.
# mkfs.ext4 -E nodiscard /dev/vg/vdo0
.fi
-.SS 2. Create VDOPoolLV and convert existing LV into VDODataLV
+.SS 2. Create VDOPoolLV from conversion of an existing LV into VDODataLV
Convert an already created/existing LV into a volume that can hold
VDO data and metadata (a volume reference by VDOPoolLV).
@@ -120,7 +120,7 @@ User will be prompted to confirm such conversion as it is \fBIRREVERSIBLY
DESTROYING\fP content of such volume, as it's being immediately
formatted by \fBvdoformat\fP(8) as VDO pool data volume. User can
specify virtual size of associated VDOLV with this VDOPoolLV.
-When the virtual size is not specified, it will set to the maximum size
+When the virtual size is not specified, it will be set to the maximum size
that can keep 100% uncompressible data there.
.nf
@@ -134,9 +134,9 @@ that can keep 100% uncompressible data there.
# lvconvert --type vdo-pool -n vdo0 -V10G vg/existinglv
.fi
-.SS 3. Change default setting used for creating VDOPoolLV
+.SS 3. Change default settings used for creating VDOPoolLV
-VDO allows to set large variety of option. Lots of these setting
+VDO allows to set large variety of options. Lots of these settings
can be specified by lvm.conf or profile settings. User can prepare
number of different profiles and just specify profile file name.
Check output of \fBlvmconfig --type full\fP for detailed description
@@ -189,7 +189,7 @@ Disable or enable compression and deduplication for VDO pool LV
# lvchange --deduplication y vg/vdpool1
.fi
-.SS 4. Checking usage of VDOPoolLV
+.SS 5. Checking usage of VDOPoolLV
To quickly check how much data of VDOPoolLV are already consumed
use \fBlvs\fP(8). Field Data% will report how much data occupies
@@ -219,7 +219,7 @@ Note: \fBvdostats\fP(8) currently understands only /dev/mapper device names.
...
.fi
-.SS 4. Extending VDOPoolLV size
+.SS 6. Extending VDOPoolLV size
Adding more space to hold VDO data and metadata can be made via
extension of VDODataLV with commands
@@ -227,6 +227,8 @@ extension of VDODataLV with commands
Note: Size of VDOPoolLV cannot be reduced.
+Note: Size of cached VDOPoolLV cannot be changed.
+
.nf
.B lvextend -L+AddingSize VG/VDOPoolLV
.fi
@@ -238,7 +240,7 @@ Note: Size of VDOPoolLV cannot be reduced.
# lvresize -L300G vg/vdopool1
.fi
-.SS 4. Extending or reducing VDOLV size
+.SS 7. Extending or reducing VDOLV size
VDO LV can be extended or reduced as standard LV with commands
\fBlvresize\fP(8), \fBlvextend\fP(8), \fBlvreduce\fP(8).
@@ -260,7 +262,7 @@ a long time.
# lvresize -L200G vg/vdo2
.fi
-.SS 5. Component activation of VDODataLV
+.SS 8. Component activation of VDODataLV
VDODataLV can be activated separately as component LV for examination
purposes. It activates data LV in read-only mode and cannot be modified.
@@ -294,7 +296,12 @@ Using Raid type LV for VDO Data LV.
.SS 3. Caching VDODataLV, VDOPoolLV
-Cache VDO Data LV (accepts also VDOPoolLV.
+VDO Pool LV (accepts also VDOPoolLV) caching provides mechanism
+to accelerate read and write of already compressed and deduplicated
+blocks together with vdo metadata.
+
+Cached VDO Data LV cannot be currently resized (also automatic
+resize will not work).
.I Example
.br
@@ -305,9 +312,10 @@ Cache VDO Data LV (accepts also VDOPoolLV.
# lvconvert --uncache vg/vpool
.fi
-.SS 3. Caching VDOLV
+.SS 4. Caching VDOLV
-Cache VDO LV.
+VDO LV cache allow users to 'cache' device for better perfomance before
+it hits processing of VDO Pool LV layer.
.I Example
.br
@@ -318,6 +326,22 @@ Cache VDO LV.
# lvconvert --uncache vg/vdo1
.fi
+.SS 5. Usage of Discard/TRIM with VDOLV
+
+User can discard data in VDO LV and reduce used blocks in VDOPoolLV.
+However present performance of discard operation is still not optimal
+and takes considerable amount of time and CPU.
+So unless it's really needed users should avoid usage of discard.
+
+When block device is going to be rewritten,
+block will be automatically reused for new data.
+Discard is useful in situation, when it is known the given portion of a VDO LV
+is not going to be used and the discarded space can be used for block
+provisioning in other regions of VDO LV.
+For the same reason, user should avoid using mkfs with discard for
+freshly created VDO LV to save a lot of time this operation would
+take otherwise as device after create empty.
+
.br
\&
3 years, 8 months
master - config: move some config setting into commented part
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7b41ea61b2e33dbfad7...
Commit: 7b41ea61b2e33dbfad754fd4c6e7851faf7ca5ef
Parent: 135d16fbb808da1d37d33258812f2eca4466c5bc
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Jul 9 23:22:52 2020 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Aug 19 15:07:09 2020 +0200
config: move some config setting into commented part
It's better to set most of option as 'commented' with some
documented defaults instead of providing strict values.
This has the advantage we can eventually 'change' defualts
and get them working in future. Otherwise once the setting
is stored in lvm.conf in /etc, such setting has strictly
defined value and that can be only change with file update.
---
conf/example.conf.in | 51 +++++++++++++++++++++++++++++---------------
lib/config/config_settings.h | 34 ++++++++++++++---------------
2 files changed, 51 insertions(+), 34 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index a3d8ca380..6b0622ab9 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -429,7 +429,8 @@ allocation {
# Configuration option allocation/cache_pool_metadata_require_separate_pvs.
# Cache pool metadata and data will always use different PVs.
- cache_pool_metadata_require_separate_pvs = 0
+ # This configuration option has an automatic default value.
+ # cache_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/cache_metadata_format.
# Sets default metadata format for new cache.
@@ -489,7 +490,8 @@ allocation {
# Configuration option allocation/thin_pool_metadata_require_separate_pvs.
# Thin pool metadata and data will always use different PVs.
- thin_pool_metadata_require_separate_pvs = 0
+ # This configuration option has an automatic default value.
+ # thin_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/thin_pool_zero.
# Thin pool data chunks are zeroed before they are first used.
@@ -528,7 +530,8 @@ allocation {
# Configuration option allocation/zero_metadata.
# Zero whole metadata area before use with thin or cache pool.
- zero_metadata = 1
+ # This configuration option has an automatic default value.
+ # zero_metadata = 1
# Configuration option allocation/thin_pool_chunk_size.
# The minimal chunk size in KiB for thin pool volumes.
@@ -990,7 +993,8 @@ global {
# logs and conversion to disk/core works.
#
# Not supported for regular operation!
- support_mirrored_mirror_log = 0
+ # This configuration option has an automatic default value.
+ # support_mirrored_mirror_log = 0
# Configuration option global/raid10_segtype_default.
# The segment type used by the -i -m combination.
@@ -1048,7 +1052,8 @@ global {
# activated from these events (the default is all.)
# When event_activation is disabled, the system will generally run
# a direct activation command to activate LVs in complete VGs.
- event_activation = 1
+ # This configuration option has an automatic default value.
+ # event_activation = 1
# Configuration option global/use_aio.
# Use async I/O when reading and writing devices.
@@ -1292,7 +1297,8 @@ activation {
# This enables additional checks (and if necessary, repairs) on entries
# in the device directory after udev has completed processing its
# events. Useful for diagnosing problems with LVM/udev interactions.
- verify_udev_operations = 0
+ # This configuration option has an automatic default value.
+ # verify_udev_operations = 0
# Configuration option activation/retry_deactivation.
# Retry failed LV deactivation.
@@ -1317,23 +1323,27 @@ activation {
# When disabled, the striped target is used. The linear target is an
# optimised version of the striped target that only handles a single
# stripe.
- use_linear_target = 1
+ # This configuration option has an automatic default value.
+ # use_linear_target = 1
# Configuration option activation/reserved_stack.
# Stack size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
- reserved_stack = 64
+ # This configuration option has an automatic default value.
+ # reserved_stack = 64
# Configuration option activation/reserved_memory.
# Memory size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
- reserved_memory = 8192
+ # This configuration option has an automatic default value.
+ # reserved_memory = 8192
# Configuration option activation/process_priority.
# Nice value used while devices are suspended.
# Use a high priority so that LVs are suspended
# for the shortest possible time.
- process_priority = -18
+ # This configuration option has an automatic default value.
+ # process_priority = -18
# Configuration option activation/volume_list.
# Only LVs selected by this list are activated.
@@ -1450,7 +1460,8 @@ activation {
# auto
# Use default value chosen by kernel.
#
- readahead = "auto"
+ # This configuration option has an automatic default value.
+ # readahead = "auto"
# Configuration option activation/raid_fault_policy.
# Defines how a device failure in a RAID LV is handled.
@@ -1586,7 +1597,8 @@ activation {
# 8.4G, it is extended to 14.4G:
# vdo_pool_autoextend_threshold = 70
#
- vdo_pool_autoextend_threshold = 100
+ # This configuration option has an automatic default value.
+ # vdo_pool_autoextend_threshold = 100
# Configuration option activation/vdo_pool_autoextend_percent.
# Auto-extending a VDO pool adds this percent extra space.
@@ -1622,7 +1634,8 @@ activation {
# Use the old behavior of mlockall to pin all memory.
# Prior to version 2.02.62, LVM used mlockall() to pin the whole
# process's memory while activating devices.
- use_mlockall = 0
+ # This configuration option has an automatic default value.
+ # use_mlockall = 0
# Configuration option activation/monitoring.
# Monitor LVs that are activated.
@@ -1637,7 +1650,8 @@ activation {
# intervals of this number of seconds. If this is set to 0 and there
# is only one thing to wait for, there are no progress reports, but
# the process is awoken immediately once the operation is complete.
- polling_interval = 15
+ # This configuration option has an automatic default value.
+ # polling_interval = 15
# Configuration option activation/auto_set_activation_skip.
# Set the activation skip flag on new thin snapshot LVs.
@@ -2193,7 +2207,8 @@ dmeventd {
# failures. It removes failed devices from a volume group and
# reconfigures a mirror as necessary. If no mirror library is
# provided, mirrors are not monitored through dmeventd.
- mirror_library = "libdevmapper-event-lvm2mirror.so"
+ # This configuration option has an automatic default value.
+ # mirror_library = "libdevmapper-event-lvm2mirror.so"
# Configuration option dmeventd/raid_library.
# This configuration option has an automatic default value.
@@ -2204,14 +2219,16 @@ dmeventd {
# libdevmapper-event-lvm2snapshot.so monitors the filling of snapshots
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the snapshot is filled.
- snapshot_library = "libdevmapper-event-lvm2snapshot.so"
+ # This configuration option has an automatic default value.
+ # snapshot_library = "libdevmapper-event-lvm2snapshot.so"
# Configuration option dmeventd/thin_library.
# The library dmeventd uses when monitoring a thin device.
# libdevmapper-event-lvm2thin.so monitors the filling of a pool
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the pool is filled.
- thin_library = "libdevmapper-event-lvm2thin.so"
+ # This configuration option has an automatic default value.
+ # thin_library = "libdevmapper-event-lvm2thin.so"
# Configuration option dmeventd/thin_command.
# The plugin runs command with each 5% increment when thin-pool data volume
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 531fb139d..e4e3dcdde 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -568,7 +568,7 @@ cfg(allocation_raid_stripe_all_devices_CFG, "raid_stripe_all_devices", allocatio
"stripes to use.\n"
"This was the default behaviour until release 2.02.162.\n")
-cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL, 0, NULL,
+cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL, 0, NULL,
"Cache pool metadata and data will always use different PVs.\n")
cfg(allocation_cache_pool_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_CACHE_MODE, vsn(2, 2, 113), NULL, vsn(2, 2, 128),
@@ -625,7 +625,7 @@ cfg(allocation_cache_pool_max_chunks_CFG, "cache_pool_max_chunks", allocation_CF
"For cache target v1.9 the recommended maximumm is 1000000 chunks.\n"
"Using cache pool with more chunks may degrade cache performance.\n")
-cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL, 0, NULL,
+cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL, 0, NULL,
"Thin pool metadata and data will always use different PVs.\n")
cfg(allocation_thin_pool_zero_CFG, "thin_pool_zero", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_ZERO, vsn(2, 2, 99), NULL, 0, NULL,
@@ -657,7 +657,7 @@ cfg(allocation_thin_pool_chunk_size_policy_CFG, "thin_pool_chunk_size_policy", a
" 512KiB.\n"
"#\n")
-cfg(allocation_zero_metadata_CFG, "zero_metadata", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ZERO_METADATA, vsn(2, 3, 10), NULL, 0, NULL,
+cfg(allocation_zero_metadata_CFG, "zero_metadata", allocation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_ZERO_METADATA, vsn(2, 3, 10), NULL, 0, NULL,
"Zero whole metadata area before use with thin or cache pool.\n")
cfg_runtime(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(2, 2, 99), 0, NULL,
@@ -1031,7 +1031,7 @@ cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECT
" fashion in a cluster.\n"
"#\n")
-cfg(global_support_mirrored_mirror_log_CFG, "support_mirrored_mirror_log", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 3, 2), NULL, 0, NULL,
+cfg(global_support_mirrored_mirror_log_CFG, "support_mirrored_mirror_log", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, 0, vsn(2, 3, 2), NULL, 0, NULL,
"Enable mirrored 'mirror' log type for testing.\n"
"#\n"
"This type is deprecated to create or convert to but can\n"
@@ -1085,7 +1085,7 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa
"Previously this was always shown as /dev/vgname/lvname even when that\n"
"was never a valid path in the /dev filesystem.\n")
-cfg(global_event_activation_CFG, "event_activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 3, 1), 0, 0, NULL,
+cfg(global_event_activation_CFG, "event_activation", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, 1, vsn(2, 3, 1), 0, 0, NULL,
"Activate LVs based on system-generated device events.\n"
"When a device appears on the system, a system-generated event runs\n"
"the pvscan command to activate LVs if the new PV completes the VG.\n"
@@ -1289,7 +1289,7 @@ cfg(activation_udev_rules_CFG, "udev_rules", activation_CFG_SECTION, 0, CFG_TYPE
"active LVs itself. Manual intervention may be required if this\n"
"setting is changed while LVs are active.\n")
-cfg(activation_verify_udev_operations_CFG, "verify_udev_operations", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERIFY_UDEV_OPERATIONS, vsn(2, 2, 86), NULL, 0, NULL,
+cfg(activation_verify_udev_operations_CFG, "verify_udev_operations", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_VERIFY_UDEV_OPERATIONS, vsn(2, 2, 86), NULL, 0, NULL,
"Use extra checks in LVM to verify udev operations.\n"
"This enables additional checks (and if necessary, repairs) on entries\n"
"in the device directory after udev has completed processing its\n"
@@ -1310,21 +1310,21 @@ cfg(activation_missing_stripe_filler_CFG, "missing_stripe_filler", activation_CF
"other than 'error' with mirrored or snapshotted volumes is likely to\n"
"result in data corruption.\n")
-cfg(activation_use_linear_target_CFG, "use_linear_target", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LINEAR_TARGET, vsn(2, 2, 89), NULL, 0, NULL,
+cfg(activation_use_linear_target_CFG, "use_linear_target", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_USE_LINEAR_TARGET, vsn(2, 2, 89), NULL, 0, NULL,
"Use the linear target to optimize single stripe LVs.\n"
"When disabled, the striped target is used. The linear target is an\n"
"optimised version of the striped target that only handles a single\n"
"stripe.\n")
-cfg(activation_reserved_stack_CFG, "reserved_stack", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_STACK, vsn(1, 0, 0), NULL, 0, NULL,
+cfg(activation_reserved_stack_CFG, "reserved_stack", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_RESERVED_STACK, vsn(1, 0, 0), NULL, 0, NULL,
"Stack size in KiB to reserve for use while devices are suspended.\n"
"Insufficent reserve risks I/O deadlock during device suspension.\n")
-cfg(activation_reserved_memory_CFG, "reserved_memory", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, vsn(1, 0, 0), NULL, 0, NULL,
+cfg(activation_reserved_memory_CFG, "reserved_memory", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, vsn(1, 0, 0), NULL, 0, NULL,
"Memory size in KiB to reserve for use while devices are suspended.\n"
"Insufficent reserve risks I/O deadlock during device suspension.\n")
-cfg(activation_process_priority_CFG, "process_priority", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PROCESS_PRIORITY, vsn(1, 0, 0), NULL, 0, NULL,
+cfg(activation_process_priority_CFG, "process_priority", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_PROCESS_PRIORITY, vsn(1, 0, 0), NULL, 0, NULL,
"Nice value used while devices are suspended.\n"
"Use a high priority so that LVs are suspended\n"
"for the shortest possible time.\n")
@@ -1433,7 +1433,7 @@ cfg(activation_error_when_full_CFG, "error_when_full", activation_CFG_SECTION, C
"thin pool data space is extended. New thin pools are assigned the\n"
"behavior defined here.\n")
-cfg(activation_readahead_CFG, "readahead", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_READ_AHEAD, vsn(1, 0, 23), NULL, 0, NULL,
+cfg(activation_readahead_CFG, "readahead", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_READ_AHEAD, vsn(1, 0, 23), NULL, 0, NULL,
"Setting to use when there is no readahead setting in metadata.\n"
"#\n"
"Accepted values:\n"
@@ -1561,7 +1561,7 @@ cfg(activation_thin_pool_autoextend_percent_CFG, "thin_pool_autoextend_percent",
"thin_pool_autoextend_percent = 20\n"
"#\n")
-cfg(activation_vdo_pool_autoextend_threshold_CFG, "vdo_pool_autoextend_threshold", activation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_INT, DEFAULT_VDO_POOL_AUTOEXTEND_THRESHOLD, VDO_1ST_VSN, NULL, 0, NULL,
+cfg(activation_vdo_pool_autoextend_threshold_CFG, "vdo_pool_autoextend_threshold", activation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_VDO_POOL_AUTOEXTEND_THRESHOLD, VDO_1ST_VSN, NULL, 0, NULL,
"Auto-extend a VDO pool when its usage exceeds this percent.\n"
"Setting this to 100 disables automatic extension.\n"
"The minimum value is 50 (a smaller value is treated as 50.)\n"
@@ -1601,7 +1601,7 @@ cfg_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, C
"mlock_filter = [ \"locale/locale-archive\", \"gconv/gconv-modules.cache\" ]\n"
"#\n")
-cfg(activation_use_mlockall_CFG, "use_mlockall", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_MLOCKALL, vsn(2, 2, 62), NULL, 0, NULL,
+cfg(activation_use_mlockall_CFG, "use_mlockall", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_USE_MLOCKALL, vsn(2, 2, 62), NULL, 0, NULL,
"Use the old behavior of mlockall to pin all memory.\n"
"Prior to version 2.02.62, LVM used mlockall() to pin the whole\n"
"process's memory while activating devices.\n")
@@ -1611,7 +1611,7 @@ cfg(activation_monitoring_CFG, "monitoring", activation_CFG_SECTION, 0, CFG_TYPE
"The --ignoremonitoring option overrides this setting.\n"
"When enabled, LVM will ask dmeventd to monitor activated LVs.\n")
-cfg(activation_polling_interval_CFG, "polling_interval", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_INTERVAL, vsn(2, 2, 63), NULL, 0, NULL,
+cfg(activation_polling_interval_CFG, "polling_interval", activation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_INTERVAL, vsn(2, 2, 63), NULL, 0, NULL,
"Check pvmove or lvconvert progress at this interval (seconds).\n"
"When pvmove or lvconvert must wait for the kernel to finish\n"
"synchronising or merging data, they check and report progress at\n"
@@ -2050,7 +2050,7 @@ cfg(report_two_word_unknown_device_CFG, "two_word_unknown_device", report_CFG_SE
"Use the two words 'unknown device' in place of '[unknown]'.\n"
"This is displayed when the device for a PV is not known.\n")
-cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_MIRROR_LIB, vsn(1, 2, 3), NULL, 0, NULL,
+cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_DMEVENTD_MIRROR_LIB, vsn(1, 2, 3), NULL, 0, NULL,
"The library dmeventd uses when monitoring a mirror device.\n"
"libdevmapper-event-lvm2mirror.so attempts to recover from\n"
"failures. It removes failed devices from a volume group and\n"
@@ -2059,13 +2059,13 @@ cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_
cfg(dmeventd_raid_library_CFG, "raid_library", dmeventd_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_DMEVENTD_RAID_LIB, vsn(2, 2, 87), NULL, 0, NULL, NULL)
-cfg(dmeventd_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26), NULL, 0, NULL,
+cfg(dmeventd_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26), NULL, 0, NULL,
"The library dmeventd uses when monitoring a snapshot device.\n"
"libdevmapper-event-lvm2snapshot.so monitors the filling of snapshots\n"
"and emits a warning through syslog when the usage exceeds 80%. The\n"
"warning is repeated when 85%, 90% and 95% of the snapshot is filled.\n")
-cfg(dmeventd_thin_library_CFG, "thin_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_THIN_LIB, vsn(2, 2, 89), NULL, 0, NULL,
+cfg(dmeventd_thin_library_CFG, "thin_library", dmeventd_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_DMEVENTD_THIN_LIB, vsn(2, 2, 89), NULL, 0, NULL,
"The library dmeventd uses when monitoring a thin device.\n"
"libdevmapper-event-lvm2thin.so monitors the filling of a pool\n"
"and emits a warning through syslog when the usage exceeds 80%. The\n"
3 years, 8 months
master - Update README
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=135d16fbb808da1d37d...
Commit: 135d16fbb808da1d37d33258812f2eca4466c5bc
Parent: 231cdd0efbe73c7a2a4c69969df7e0f5b63f7f2c
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Wed Aug 12 12:05:36 2020 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Wed Aug 12 12:05:36 2020 +0200
Update README
---
README | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/README b/README
index 38a9778fd..3e4508c8b 100644
--- a/README
+++ b/README
@@ -1,7 +1,6 @@
This tree contains the LVM2 and device-mapper tools and libraries.
-This is development branch, for stable 2.02 release see 2018-06-01-stable
-branch.
+This is development branch, for stable 2.02 release see stable-2.02 branch.
For more information about LVM2 read the changelog in the WHATS_NEW file.
Installation instructions are in INSTALL.
@@ -10,7 +9,6 @@ There is no warranty - see COPYING and COPYING.LIB.
Tarballs are available from:
ftp://sourceware.org/pub/lvm2/
- ftp://sources.redhat.com/pub/lvm2/
https://github.com/lvmteam/lvm2/releases
The source code is stored in git:
@@ -45,6 +43,9 @@ Report upstream bugs at:
or open issues at:
https://github.com/lvmteam/lvm2/issues
-The source code repository used until 7th June 2012 is accessible here:
- http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.
+The source code repository used until 7th June 2012 is accessible using CVS:
+ cvs -d :pserver:cvs@sourceware.org:/cvs/lvm2 login cvs
+ cvs -d :pserver:cvs@sourceware.org:/cvs/lvm2 checkout LVM2
+
+The password is cvs.
3 years, 8 months