master - cache: add pool deps for preload
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c3bb6d77dd6193...
Commit: c3bb6d77dd6193755070c62c6f3adb93c1976f19
Parent: 4f1309080a462988e10c11a328356a6c5c22dd6e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jan 28 16:29:35 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 28 16:29:35 2015 +0100
cache: add pool deps for preload
for_each_sub_lv() normally does not put pool_lv into deps.
So for now go around it in 'lv_preload()' and add explicit
call with pool.
TODO: think about a better way, we want pool_lv deps only in certain
moments, so maybe for_each_sub_lv() needs new arg for this.
---
lib/activate/activate.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 151e714..00d3a10 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1879,6 +1879,11 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s,
if (!for_each_sub_lv((struct logical_volume *)ondisk_lv, &_preload_detached_lv, &detached))
goto_out;
+ /* ATM cache/thin pool is not scanned in 'for_each_sub_lv()', TODO explore better way */
+ if (lv_is_cache(ondisk_lv) &&
+ !for_each_sub_lv(first_seg(ondisk_lv)->pool_lv, &_preload_detached_lv, &detached))
+ goto_out;
+
/*
* Preload any snapshots that are being removed.
*/
9 years, 3 months
master - thin: preserve chunksize with lvconvert
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4f1309080a4629...
Commit: 4f1309080a462988e10c11a328356a6c5c22dd6e
Parent: d2d3f0d747a509178a46f85b6384febde063c633
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jan 28 15:12:38 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 28 15:15:52 2015 +0100
thin: preserve chunksize with lvconvert
When repairing thin pool or swapping thin pool metadata,
preserve chunk_size property and avoid to be automatically changed
later in the code to better match thin pool metadata size.
---
WHATS_NEW | 1 +
test/shell/lvconvert-repair-thin.sh | 9 ++++++++-
tools/lvconvert.c | 1 +
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 45a02d6..92b62a6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.116 -
====================================
+ Preserve chunk size with repair and metadata swap of a thin pool.
Fix raid --splitmirror 1 functionality (2.02.112).
Fix tree preload to handle splitting raid images.
Do not support unpartitioned DASD devices.
diff --git a/test/shell/lvconvert-repair-thin.sh b/test/shell/lvconvert-repair-thin.sh
index 0e9534b..73f061c 100644
--- a/test/shell/lvconvert-repair-thin.sh
+++ b/test/shell/lvconvert-repair-thin.sh
@@ -24,7 +24,9 @@ aux have_thin 1 0 0 || skip
aux prepare_vg 4
# Create LV
-lvcreate -T -L20 -V10 -n $lv1 $vg/pool "$dev1" "$dev2"
+# TODO: investigate problem with --zero n and my repairable damage trick
+#lvcreate -T -L20 -V10 -n $lv1 $vg/pool --discards ignore --zero n --chunksize 128 "$dev1" "$dev2"
+lvcreate -T -L20 -V10 -n $lv1 $vg/pool --chunksize 128 --discards ignore "$dev1" "$dev2"
lvcreate -T -V10 -n $lv2 $vg/pool
mkfs.ext2 "$DM_DEV_DIR/$vg/$lv1"
@@ -71,6 +73,11 @@ lvchange -an $vg
# Swap repaired metadata back
lvconvert -y -f --poolmetadata $vg/fixed --thinpool $vg/pool
+# Check pool still preserves its original settings
+check lv_field $vg/pool chunksize "128.00k"
+check lv_field $vg/pool discards "ignore"
+check lv_field $vg/pool zero "zero"
+
# Activate pool - this should now work
vgchange -ay $vg
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index c7acd5d..20f017a 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2956,6 +2956,7 @@ static int _lvconvert_pool(struct cmd_context *cmd,
return 0;
}
+ lp->passed_args |= PASS_ARG_CHUNK_SIZE | PASS_ARG_DISCARDS | PASS_ARG_ZERO;
seg = first_seg(pool_lv);
/* Normally do NOT change chunk size when swapping */
9 years, 3 months
master - cleanup: use macro lv_is_visible()
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d2d3f0d747a509...
Commit: d2d3f0d747a509178a46f85b6384febde063c633
Parent: 553f37da71fecd167fd97b26a33c341b8cba485a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jan 28 13:34:12 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 28 13:45:27 2015 +0100
cleanup: use macro lv_is_visible()
---
lib/activate/dev_manager.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 015af5b..dcb2c5d 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -2295,7 +2295,7 @@ int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
* is used in the CTR table.
*/
if ((seg_type(seg, s) == AREA_UNASSIGNED) ||
- ((seg_lv(seg, s)->status & VISIBLE_LV) &&
+ (lv_is_visible(seg_lv(seg, s)) &&
!(seg_lv(seg, s)->status & LVM_WRITE))) {
/* One each for metadata area and data area */
if (!dm_tree_node_add_null_area(node, 0) ||
9 years, 3 months
master - raid: lock holder will skip visible raid LVs
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=553f37da71fecd...
Commit: 553f37da71fecd167fd97b26a33c341b8cba485a
Parent: 93b90157605f557cd4b0e48c38e6f290eaa871b1
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jan 28 13:34:41 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 28 13:45:27 2015 +0100
raid: lock holder will skip visible raid LVs
RAID marks legs as VISIBLE with notion it's not longer
true raid leg - so skip tree scannig and take this LV
as top-level LV.
---
lib/metadata/lv.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
index 683ec47..9052e63 100644
--- a/lib/metadata/lv.c
+++ b/lib/metadata/lv.c
@@ -1018,6 +1018,10 @@ const struct logical_volume *lv_lock_holder(const struct logical_volume *lv)
return sl->seg->lv;
}
+ /* RAID changes visibility of splitted LVs but references them still as leg/meta */
+ if ((lv_is_raid_image(lv) || lv_is_raid_metadata(lv)) && lv_is_visible(lv))
+ return lv;
+
/* For other types, by default look for the first user */
dm_list_iterate_items(sl, &lv->segs_using_this_lv) {
/* FIXME: complete this exception list */
9 years, 3 months
master - raid: fix raid image splitting
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=93b90157605f55...
Commit: 93b90157605f557cd4b0e48c38e6f290eaa871b1
Parent: b254d330e4410e3eb10ab65fbe892ba56f95e2e9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jan 28 13:39:41 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 28 13:45:18 2015 +0100
raid: fix raid image splitting
When raid leg is extracted, now the preload code handles this state
correctly and put proper new table entry into dm tree,
so the activation of extracted leg and removed metadata works
after commit.
---
WHATS_NEW | 1 +
lib/metadata/raid_manip.c | 30 ++++++++++--------------------
test/shell/lvconvert-raid.sh | 6 ++++++
3 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 1424fab..45a02d6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.116 -
====================================
+ Fix raid --splitmirror 1 functionality (2.02.112).
Fix tree preload to handle splitting raid images.
Do not support unpartitioned DASD devices.
Improve config validation to check if setting with string value can be empty.
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 5c2ca95..4ce84a0 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1149,12 +1149,6 @@ int lv_raid_split(struct logical_volume *lv, const char *split_name,
return 0;
}
- if (!resume_lv(lv->vg->cmd, lv_lock_holder(lv))) {
- log_error("Failed to resume %s/%s after committing changes",
- lv->vg->name, lv->name);
- return 0;
- }
-
/*
* First activate the newly split LV and LVs on the removal list.
* This is necessary so that there are no name collisions due to
@@ -1164,26 +1158,22 @@ int lv_raid_split(struct logical_volume *lv, const char *split_name,
if (!activate_lv_excl_local(cmd, lvl->lv))
return_0;
+ dm_list_iterate_items(lvl, &removal_list)
+ if (!activate_lv_excl_local(cmd, lvl->lv))
+ return_0;
+
+ if (!resume_lv(cmd, lv_lock_holder(lv))) {
+ log_error("Failed to resume %s/%s after committing changes",
+ lv->vg->name, lv->name);
+ return 0;
+ }
+
/*
* Since newly split LV is typically already active - we need to call
* suspend() and resume() to also rename it.
*
* TODO: activate should recognize it and avoid these 2 calls
*/
- if (!suspend_lv(cmd, lvl->lv)) {
- log_error("Failed to suspend %s.", lvl->lv->name);
- return 0;
- }
-
- if (!resume_lv(cmd, lvl->lv)) {
- log_error("Failed to reactivate %s.", lvl->lv->name);
- return 0;
- }
-
- dm_list_iterate_items(lvl, &removal_list)
- if (!activate_lv_excl_local(cmd, lvl->lv))
- return_0;
-
/*
* Eliminate the residual LVs
diff --git a/test/shell/lvconvert-raid.sh b/test/shell/lvconvert-raid.sh
index 8621311..12e0420 100644
--- a/test/shell/lvconvert-raid.sh
+++ b/test/shell/lvconvert-raid.sh
@@ -121,6 +121,12 @@ check active $vg $lv2
# FIXME: ensure no residual devices
lvremove -ff $vg
+# 4-way
+lvcreate --type raid1 -m 4 -l 2 -n $lv1 $vg
+aux wait_for_sync $vg $lv1
+lvconvert --yes --splitmirrors 1 --name $lv2 $vg/$lv1 "$dev2"
+lvremove -ff $vg
+
###########################################
# RAID1 split + trackchanges / merge
###########################################
9 years, 3 months
master - raid: fix tree preload for splitting raid images
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b254d330e4410e...
Commit: b254d330e4410e3eb10ab65fbe892ba56f95e2e9
Parent: 3e11d85c774084783520b5cc77e059cfa5e1b254
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jan 28 13:36:25 2015 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jan 28 13:44:06 2015 +0100
raid: fix tree preload for splitting raid images
When raid is being splitted, extracted leg & metadata
is still floating in the table - and thus we need to
detect this case and properly preload their matching
table so consequent activation of extracted LVs properly
renames (and FREES) existing raid images, so ongoing
image name shifting will work.
---
WHATS_NEW | 1 +
lib/activate/activate.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 666c51e..1424fab 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.116 -
====================================
+ Fix tree preload to handle splitting raid images.
Do not support unpartitioned DASD devices.
Improve config validation to check if setting with string value can be empty.
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index 424786c..151e714 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -1760,6 +1760,22 @@ static int _preload_detached_lv(struct logical_volume *lv, void *data)
struct detached_lv_data *detached = data;
struct lv_list *lvl_pre;
+ /* Check and preload removed raid image leg */
+ if (lv_is_raid_image(lv)) {
+ if ((lvl_pre = find_lv_in_vg_by_lvid(detached->lv_pre->vg, &lv->lvid)) &&
+ !lv_is_raid_image(lvl_pre->lv) &&
+ !_lv_preload(lvl_pre->lv, detached->laopts, detached->flush_required))
+ return_0;
+ }
+
+ /* Check and preload removed of raid metadata */
+ if (lv_is_raid_metadata(lv)) {
+ if ((lvl_pre = find_lv_in_vg_by_lvid(detached->lv_pre->vg, &lv->lvid)) &&
+ !lv_is_raid_metadata(lvl_pre->lv) &&
+ !_lv_preload(lvl_pre->lv, detached->laopts, detached->flush_required))
+ return_0;
+ }
+
if ((lvl_pre = find_lv_in_vg(detached->lv_pre->vg, lv->name))) {
if (lv_is_visible(lvl_pre->lv) && lv_is_active(lv) &&
(!lv_is_cow(lv) || !lv_is_cow(lvl_pre->lv)) &&
9 years, 3 months
master - devices: DASD doesn't need to be stackable.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3e11d85c774084...
Commit: 3e11d85c774084783520b5cc77e059cfa5e1b254
Parent: dab3ebce4c75e931345159dfcf906cc32a066541
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Jan 23 20:32:31 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Jan 23 20:32:31 2015 +0000
devices: DASD doesn't need to be stackable.
---
lib/device/dev-type.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index 389b0c8..dc8b61d 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -207,9 +207,6 @@ int dev_subsystem_part_major(struct dev_types *dt, struct device *dev)
if (MAJOR(dev->dev) == dt->emcpower_major)
return 1;
- if (MAJOR(dev->dev) == dt->dasd_major)
- return 1;
-
if (MAJOR(dev->dev) == dt->power2_major)
return 1;
9 years, 3 months
master - devices: Do not support unpartitioned DASD.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=dab3ebce4c75e9...
Commit: dab3ebce4c75e931345159dfcf906cc32a066541
Parent: 4f5ce1fa430004f853b9aee1ac28fdd3cd5014ba
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Jan 23 20:01:34 2015 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Jan 23 20:01:34 2015 +0000
devices: Do not support unpartitioned DASD.
---
WHATS_NEW | 1 +
lib/device/dev-type.c | 14 ++++++++++++++
lib/device/dev-type.h | 1 +
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 02f76be..666c51e 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.116 -
====================================
+ Do not support unpartitioned DASD devices.
Improve config validation to check if setting with string value can be empty.
Version 2.02.115 - 21st January 2015
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index a84f7e9..389b0c8 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -112,6 +112,10 @@ struct dev_types *create_dev_types(const char *proc_dir,
if (!strncmp("drbd", line + i, 4) && isspace(*(line + i + 4)))
dt->drbd_major = line_maj;
+ /* Look for DASD */
+ if (!strncmp("dasd", line + i, 4) && isspace(*(line + i + 4)))
+ dt->dasd_major = line_maj;
+
/* Look for EMC powerpath */
if (!strncmp("emcpower", line + i, 8) && isspace(*(line + i + 8)))
dt->emcpower_major = line_maj;
@@ -203,6 +207,9 @@ int dev_subsystem_part_major(struct dev_types *dt, struct device *dev)
if (MAJOR(dev->dev) == dt->emcpower_major)
return 1;
+ if (MAJOR(dev->dev) == dt->dasd_major)
+ return 1;
+
if (MAJOR(dev->dev) == dt->power2_major)
return 1;
@@ -222,6 +229,9 @@ const char *dev_subsystem_name(struct dev_types *dt, struct device *dev)
if (MAJOR(dev->dev) == dt->drbd_major)
return "DRBD";
+ if (MAJOR(dev->dev) == dt->dasd_major)
+ return "DASD";
+
if (MAJOR(dev->dev) == dt->emcpower_major)
return "EMCPOWER";
@@ -322,6 +332,10 @@ int dev_is_partitioned(struct dev_types *dt, struct device *dev)
if (!_is_partitionable(dt, dev))
return 0;
+ /* Unpartitioned DASD devices are not supported. */
+ if (MAJOR(dev->dev) == dt->dasd_major)
+ return 1;
+
return _has_partition_table(dev);
}
diff --git a/lib/device/dev-type.h b/lib/device/dev-type.h
index 8dcd4c8..10f82ba 100644
--- a/lib/device/dev-type.h
+++ b/lib/device/dev-type.h
@@ -44,6 +44,7 @@ struct dev_types {
int device_mapper_major;
int emcpower_major;
int power2_major;
+ int dasd_major;
struct dev_type_def dev_type_array[NUMBER_OF_MAJORS];
};
9 years, 3 months
master - lvm.conf: update error_when_full description
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4f5ce1fa430004...
Commit: 4f5ce1fa430004f853b9aee1ac28fdd3cd5014ba
Parent: 4b099d06b119013bbf27ffb8a0f056fe725ce603
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 22 13:01:02 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Jan 22 13:01:02 2015 -0600
lvm.conf: update error_when_full description
Relate it to the --errorwhenfull option.
---
conf/example.conf.in | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 21b963b..0ba9ccb 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -938,8 +938,11 @@ activation {
# enables or disables this automatic setting of the flag while LVs are created.
# auto_set_activation_skip = 1
- # Control error behavior when provisioned device becomes full.
- # Set to 1 to instant error when there is missing free space in device.
+ # Control error behavior when provisioned device becomes full. This
+ # determines the default --errorwhenfull setting of new thin pools.
+ # The command line option --errorwhenfull takes precedence over this
+ # setting. error_when_full 0 means --errorwhenfull n.
+ #
# error_when_full = 0
# For RAID or 'mirror' segment types, 'raid_region_size' is the
9 years, 3 months
master - lvmthin: update monitor and autoextend
by David Teigland
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4b099d06b11901...
Commit: 4b099d06b119013bbf27ffb8a0f056fe725ce603
Parent: 0fddc5ab5c892d02fd097828de36ee033dc1e7b3
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 22 12:52:39 2015 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Jan 22 12:53:25 2015 -0600
lvmthin: update monitor and autoextend
and some more in data exhaustion
---
man/lvmthin.7.in | 101 +++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 73 insertions(+), 28 deletions(-)
diff --git a/man/lvmthin.7.in b/man/lvmthin.7.in
index 908701a..e342a2d 100644
--- a/man/lvmthin.7.in
+++ b/man/lvmthin.7.in
@@ -673,35 +673,67 @@ space in a thin pool.
\&
-An lvm daemon (dmeventd) will by default monitor the data usage of
-thin pool LVs and extend them when the usage reaches a certain level.
-The necessary free space must exist in the VG to extend the thin pool
-LVs.
+The lvm daemon dmeventd (lvm2-monitor) monitors the data usage of thin
+pool LVs and extends them when the usage reaches a certain level. The
+necessary free space must exist in the VG to extend thin pool LVs.
+Monitoring and extension of thin pool LVs are controlled independently.
-Command to enable or disable the monitoring and automatic extension
-of an existing thin pool LV:
+.I monitoring
+When a thin pool LV is activated, dmeventd will begin monitoring it by
+default.
+
+Command to start or stop dmeventd monitoring a thin pool LV:
+.br
.B lvchange \-\-monitor {y|n} VG/ThinPoolLV
+The current dmeventd monitoring status of a thin pool LV can be displayed
+with the command lvs -o+seg_monitor.
+
+.I autoextend
+
+dmeventd should be configured to extend thin pool LVs before all data
+space is used. Warnings are emitted through syslog when the use of a thin
+pool reaches 80%, 85%, 90% and 95%. (See the section "Data space
+exhaustion" for the effects of not extending a thin pool LV.) The point
+at which dmeventd extends thin pool LVs, and the amount are controlled
+with two configuration settings:
+
.BR lvm.conf (5)
.B thin_pool_autoextend_threshold
.br
+is a percentage full value that defines when the thin pool LV should be
+extended. Setting this to 100 disables automatic extention. The minimum
+value is 50.
+
.BR lvm.conf (5)
.B thin_pool_autoextend_percent
.br
-control the default autoextend behavior.
+defines how much extra data space should be added to the thin pool LV from
+the VG, in percent of its current size.
+
+.I disabling
+
+There are multiple ways that extension of thin pools could be prevented:
+
+.IP \[bu] 2
+If the dmeventd daemon is not running, no monitoring or automatic
+extension will occur.
-thin_pool_autoextend_threshold
-is a percentage value that defines when
-the thin pool LV should be extended. Setting this to 100 disables
-automatic extention. The minimum value is 50.
+.IP \[bu]
+Even when dmeventd is running, all monitoring can be disabled with the
+lvm.conf monitoring setting.
-thin_pool_autoextend_percent
-defines how much extra data space should
-be added to the thin pool, in percent of its current size.
+.IP \[bu]
+To activate or create a thin pool LV without interacting with dmeventd,
+the --ignoremonitoring option can be used. With this option, the command
+will not ask dmeventd to monitor the thin pool LV.
-Warnings are emitted through syslog when the use of a pool reaches 80%,
-85%, 90% and 95%.
+.IP \[bu]
+Setting thin_pool_autoextend_threshould to 100 disables automatic
+extension of thin pool LVs, even if they are being monitored by dmeventd.
+
+.P
.I Example
.br
@@ -716,22 +748,34 @@ For a 1G pool, using 700M will trigger a resize to 1.2G. When the usage exceeds
\&
When properly managed, thin pool data space should be extended before it
-is exhausted (see the section "Automatically extend thin pool LV"). If
+is all used (see the section "Automatically extend thin pool LV"). If
thin pool data space is already exhausted, it can still be extended (see
the section "Manually manage free data space of thin pool LV".)
-The behavior of a full thin pool with no remaining data space is
-configurable with the --errorwhenfull y|n option to lvcreate or lvchange.
-The errorwhenfull setting applies only to writes; reading thin LVs can
-continue even when data space is exhausted.
-
-Command to change the handling of no data space of a thin pool:
+The behavior of a full thin pool is configurable with the --errorwhenfull
+y|n option to lvcreate or lvchange. The errorwhenfull setting applies
+only to writes; reading thin LVs can continue even when data space is
+exhausted.
+Command to change the handling of a full thin pool:
+.br
.B lvchange --errorwhenfull {y|n} VG/ThinPoolLV
-The current setting can be displayed with the lvs -o+lv_when_full command.
+.BR lvm.conf (5)
+.B error_when_full
+.br
+controls the default error when full behavior.
+
+The current setting of a thin pool LV can be displayed with the command:
+lvs -o+lv_when_full.
+
+The errorwhenfull setting does not effect the monitoring and autoextend
+settings, and the monitoring/autoextend settings do not effect the
+errorwhenfull setting. It is only when monitoring/autoextend are not
+effective that the thin pool becomes full and the errorwhenfull setting is
+applied.
-.B errorwhenfull n
+.I errorwhenfull n
This is the default. Writes to thin LVs are accepted and queued, with the
expectation that pool data space will be extended soon. Once data space
@@ -751,13 +795,13 @@ If set to 0, writes will not time out. Disabling timeouts can result in
the system running out of resources, memory exhaustion, hung tasks, and
deadlocks. (The timeout applies to all thin pools on the system.)
-.B errorwhenfull y
+.I errorwhenfull y
Writes to thin LVs immediately return an error, and no writes are queued.
In the case of a file system, this can result in corruption that may
require fsck (the specific consequences depend on the thin LV user.)
-.B display data percent
+.I data percent
When data space is exhausted, the lvs command displays 100 under Data% for
the thin pool LV:
@@ -768,7 +812,7 @@ the thin pool LV:
pool0 vg twi-a-tz-- 512.00m 100.00
.fi
-.B causes
+.I causes
A thin pool may run out of data space for any of the following reasons:
@@ -788,6 +832,7 @@ thin_pool_autoextend_threshold and thin_pool_autoextend_percent.)
.IP \[bu]
The VG does not have enough free blocks to extend the thin pool.
+.P
.SS Metadata space exhaustion
9 years, 3 months