Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=91198ac13e61c66b…
Commit: 91198ac13e61c66b65884660410311ffc8b8c24e
Parent: 17ab39f7431fdad4c8a445bd1e78a288eeb64bc1
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Aug 26 16:40:47 2014 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Oct 2 12:01:58 2014 -0500
man: lvmcache better cache mode info and other command variations
---
man/lvmcache.7.in | 49 ++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 42 insertions(+), 7 deletions(-)
diff --git a/man/lvmcache.7.in b/man/lvmcache.7.in
index 6d7109a..6339b91 100644
--- a/man/lvmcache.7.in
+++ b/man/lvmcache.7.in
@@ -214,16 +214,27 @@ pool sub-LVs redundant.
# lvconvert \-\-type cache \-\-cachepool vg/cache1 vg/lv1
.fi
-.SS Writethough caching
+.SS Cache mode
\&
-Writethrough caching ensures that any data written will be stored both in
-the cache pool LV and on the origin LV. The loss of a device associated
-with the cache pool LV in this case would not mean the loss of any data.
-When combining the cache data LV and the cache metadata LV to form the
-cache pool LV, properties of the cache can be specified - in this case,
-\fIwritethrough\fP vs. \fIwriteback\fP.
+The default cache mode is "writethrough". Writethrough ensures that any
+data written will be stored both in the cache pool LV and on the origin
+LV. The loss of a device associated with the cache pool LV in this case
+would not mean the loss of any data.
+
+A second cache mode is "writeback". Writeback delays writing data blocks
+from the cache pool back to the origin LV. This mode will increase
+performance, but the loss of a device associated with the cache pool LV
+can result in lost data.
+
+The cache mode can be specified with the --cachemode option when a cache
+pool LV is created.
+
+.BR lvm.conf (5)
+.B cache_pool_cachemode
+.br
+defines the default cache mode.
.nf
0. Create an origin LV we wish to cache (yours may already exist)
@@ -264,6 +275,30 @@ the same VG.
.br
.B lvconvert --type cache\-pool VG/CacheDataLV
+.SS Create a new cache LV without an existing origin LV
+
+\&
+
+A cache LV can be created using an existing cache pool without an existing
+origin LV. A new origin LV is created and linked to the cache pool in a
+single step.
+
+.B lvcreate \-\-type cache \-L LargeSize \-n CacheLV
+.RS
+.B \-\-cachepool VG/CachePoolLV SlowPVs
+.RE
+
+
+.SS Single step cache pool LV creation
+
+\&
+
+A cache pool LV can be created with a single lvcreate command, rather than
+using lvconvert on existing LVs. This one command creates a cache data
+LV, a cache metadata LV, and combines the two into a cache pool LV.
+
+.B lvcreate \-\-type cache\-pool \-L CacheSize \-n CachePoolLV VG FastPVs
+
.SH SEE ALSO
.BR lvm.conf (5),
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a976226e81c561d1…
Commit: a976226e81c561d1123087d1d3dac10ce12e073f
Parent: 5011cac9cfe2845c52f132feb78d72aaee60ff7b
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Oct 2 13:21:24 2014 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Oct 2 13:21:24 2014 +0200
cleanup: remove compiler warning about possible uninitialized variable use
filters/filter-usable.c:22: warning: "ucp.check_..." may be used uninitialized in this function
This can't actually be hit in real, but let's clean this up for the compiler
to be happy again.
---
lib/filters/filter-usable.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/filters/filter-usable.c b/lib/filters/filter-usable.c
index e91c3f3..2a7ef49 100644
--- a/lib/filters/filter-usable.c
+++ b/lib/filters/filter-usable.c
@@ -19,7 +19,7 @@
static int _passes_usable_filter(struct dev_filter *f, struct device *dev)
{
filter_mode_t mode = *((filter_mode_t *) f->private);
- struct dev_usable_check_params ucp;
+ struct dev_usable_check_params ucp = {0};
int r;
/* filter only device-mapper devices */
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1cdb8766a7cf500b…
Commit: 1cdb8766a7cf500b6657cf6f6baf2d785a3708f5
Parent: e6ab275aa00beb9192684f580fcbc52757f63856
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Oct 1 22:58:23 2014 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Oct 1 22:58:23 2014 +0100
tools: Add ENABLE_ALL_DEVS flag.
The ENABLE_ALL_DEVS flag is added to the command structure
for commands that should process all devs (pvs and non-pvs)
when they call process_each_pv and the command includes the
--all arg. This will be used in a later process_each_pv patch.
---
tools/commands.h | 6 +++---
tools/tools.h | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/commands.h b/tools/commands.h
index a3c05b8..afdf4c3 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -416,7 +416,7 @@ xx(lvmchange,
xx(lvmdiskscan,
"List devices that may be used as physical volumes",
- PERMITTED_READ_ONLY,
+ PERMITTED_READ_ONLY | ENABLE_ALL_DEVS,
"lvmdiskscan\n"
"\t[--commandprofile ProfileName]\n"
"\t[-d|--debug]\n"
@@ -700,7 +700,7 @@ xx(pvdata,
xx(pvdisplay,
"Display various attributes of physical volume(s)",
- CACHE_VGMETADATA | PERMITTED_READ_ONLY,
+ CACHE_VGMETADATA | PERMITTED_READ_ONLY | ENABLE_ALL_DEVS,
"pvdisplay\n"
"\t[-c|--colon]\n"
"\t[--commandprofile ProfileName]\n"
@@ -786,7 +786,7 @@ xx(pvremove,
xx(pvs,
"Display information about physical volumes",
- CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT,
+ CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | ENABLE_ALL_DEVS,
"pvs" "\n"
"\t[-a|--all]\n"
"\t[--aligned]\n"
diff --git a/tools/tools.h b/tools/tools.h
index b3dd799..134e584 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -104,7 +104,9 @@ struct arg_value_group_list {
#define PERMITTED_READ_ONLY 0x00000002
/* Process all vgs if none specified on the command line. */
#define ALL_VGS_IS_DEFAULT 0x00000004
-
+/* Process all devices with --all if none are specified on the command line. */
+#define ENABLE_ALL_DEVS 0x00000008
+
/* a register of the lvm commands */
struct command {
const char *name;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d66f2574529ccce5…
Commit: d66f2574529ccce5fab2c217805504f6a8fe1673
Parent: 33b96bef5bd8cfda3cf24007b84597f61a2cf0b6
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Oct 1 10:29:30 2014 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Oct 1 10:44:18 2014 -0500
man: lvmthin mention alternate syntax
Users will probably run across the alternate syntax,
so we should explain how it relates to what is used here.
---
man/lvmthin.7.in | 78 ++++++++++++++++++++++++++++++++++-------------------
1 files changed, 50 insertions(+), 28 deletions(-)
diff --git a/man/lvmthin.7.in b/man/lvmthin.7.in
index af9669d..8009a9e 100644
--- a/man/lvmthin.7.in
+++ b/man/lvmthin.7.in
@@ -152,7 +152,8 @@ Create a new thin LV from the thin pool LV.
The thin LV is created with a virtual size.
Multiple new thin LVs may be created in the thin pool.
Thin LV names must be unique in the VG.
-The thinpool argument specifies which thin pool will
+The '--type thin' option is inferred from the virtual size option.
+The --thinpool argument specifies which thin pool will
contain the ThinLV.
.fi
@@ -225,6 +226,10 @@ or vgchange to activate thin snapshots with the "k" attribute.
.SH Thin Topics
+.B Alternate syntax for specifying type thin\-pool
+.br
+.B Automatic pool metadata LV
+.br
.B Specify devices for data and metadata LVs
.br
.B Tolerate device failures using raid
@@ -233,8 +238,6 @@ or vgchange to activate thin snapshots with the "k" attribute.
.br
.B Metadata check and repair
.br
-.B Automatic pool metadata LV
-.br
.B Activation of thin snapshots
.br
.B Removing thin pool LVs, thin LVs and snapshots
@@ -273,6 +276,50 @@ or vgchange to activate thin snapshots with the "k" attribute.
\&
+.SS Alternate syntax for specifying type thin\-pool
+
+\&
+
+The fully specified syntax for creating a thin pool LV shown above is:
+
+.B lvconvert \-\-type thin-pool \-\-poolmetadata VG/ThinMetaLV VG/ThinDataLV
+
+An existing LV is converted to a thin pool by changing its type to
+thin-pool. An alternate syntax may be used for the same operation:
+
+.B lvconvert \-\-thinpool VG/ThinDataLV \-\-poolmetadata VG/ThinMetaLV
+
+The thin-pool type is inferred by lvm; the --thinpool option is not an
+alias for --type thin-pool. The use of the --thinpool option here is
+different from the use of the --thinpool option when creating a thin LV,
+where it specifies the pool in which the thin LV is created.
+
+
+.SS Automatic pool metadata LV
+
+\&
+
+A thin data LV can be converted to a thin pool LV without specifying a
+thin pool metadata LV. LVM automatically creates a metadata LV from the
+same VG.
+
+.B lvcreate \-n ThinDataLV \-L LargeSize VG
+.br
+.B lvconvert \-\-type thin\-pool VG/ThinDataLV
+
+.I Example
+.br
+.nf
+# lvcreate \-n pool0 \-L 10G vg
+# lvconvert \-\-type thin\-pool vg/pool0
+
+# lvs \-a
+ pool0 vg twi-a-tz-- 10.00g
+ [pool0_tdata] vg Twi-ao---- 10.00g
+ [pool0_tmeta] vg ewi-ao---- 16.00m
+.fi
+
+
.SS Specify devices for data and metadata LVs
\&
@@ -420,31 +467,6 @@ containing new metadata:
.B lvconvert \-\-thinpool VG/ThinPoolLV \-\-poolmetadata VG/NewThinMetaLV
-.SS Automatic pool metadata LV
-
-\&
-
-A thin data LV can be converted to a thin pool LV without
-specifying a thin pool metadata LV. LVM will automatically
-create a metadata LV from the same VG.
-
-.B lvcreate \-n ThinDataLV \-L LargeSize VG
-.br
-.B lvconvert \-\-type thin\-pool VG/ThinDataLV
-
-.I Example
-.br
-.nf
-# lvcreate \-n pool0 \-L 10G vg
-# lvconvert \-\-type thin\-pool vg/pool0
-
-# lvs \-a
- pool0 vg twi-a-tz-- 10.00g
- [pool0_tdata] vg Twi-ao---- 10.00g
- [pool0_tmeta] vg ewi-ao---- 16.00m
-.fi
-
-
.SS Activation of thin snapshots
\&