Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5ef6ca00b99e0a2e…
Commit: 5ef6ca00b99e0a2ed83a00c4ddcb577dd3b52a7b
Parent: 999952c5b9a21451d1b76c53a7dca615cd815113
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Mon Nov 19 22:29:23 2012 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Mon Nov 19 22:29:23 2012 +0000
docs: host tags has a default volume_list
Document that lvm.conf activation/volume_list defaults to @* when
there's a host tag.
---
doc/example.conf.in | 11 +++++++++--
man/lvm.conf.5.in | 2 ++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/doc/example.conf.in b/doc/example.conf.in
index f7344bb..7f94223 100644
--- a/doc/example.conf.in
+++ b/doc/example.conf.in
@@ -569,15 +569,21 @@ activation {
# If volume_list is defined, each LV is only activated if there is a
# match against the list.
+ #
# "vgname" and "vgname/lvname" are matched exactly.
# "@tag" matches any tag set in the LV or VG.
# "@*" matches if any tag defined on the host is also set in the LV or VG
#
+ # If any host tags exist but volume_list is not defined, a default
+ # single-entry list containing "@*" is assumed.
+ #
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# If auto_activation_volume_list is defined, each LV that is to be
- # activated is checked against the list while using the autoactivation
- # option (--activate ay/-a ay), and if it matches, it is activated.
+ # activated with the autoactivation option (--activate ay/-a ay)
+ # is first checked against the list. If it does not match, the LV
+ # is not activated. This list is checked as well as volume_list.
+ #
# "vgname" and "vgname/lvname" are matched exactly.
# "@tag" matches any tag set in the LV or VG.
# "@*" matches if any tag defined on the host is also set in the LV or VG
@@ -588,6 +594,7 @@ activation {
# is checked against the list, and if it matches, it as activated
# in read-only mode. (This overrides '--permission rw' stored in the
# metadata.)
+ #
# "vgname" and "vgname/lvname" are matched exactly.
# "@tag" matches any tag set in the LV or VG.
# "@*" matches if any tag defined on the host is also set in the LV or VG
diff --git a/man/lvm.conf.5.in b/man/lvm.conf.5.in
index 718cf4d..5592f34 100644
--- a/man/lvm.conf.5.in
+++ b/man/lvm.conf.5.in
@@ -447,6 +447,8 @@ metadata for a match.
\fBtags\fP above).
Logical volume and volume groups can also be included in the list
by name e.g. vg00, vg00/lvol1.
+If this setting is not present but at least one host tag is defined
+then a default single-entry list containing @* is assumed.
.IP
\fBauto_activation_volume_list\fP \(em This acts as a filter through
which all requests to autoactivate a logical volume on this machine
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c907ee0351b226eb…
Commit: c907ee0351b226eb9e89929afcfc008985f32f97
Parent: a7893ae8580d344f3f55ddb08892991edf17408f
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Mon Nov 19 16:19:58 2012 +0100
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Mon Nov 19 16:20:54 2012 +0100
Document use_lvmetad and global_filter in lvm.conf.5.
---
man/lvm.conf.5.in | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/man/lvm.conf.5.in b/man/lvm.conf.5.in
index 79044fc..718cf4d 100644
--- a/man/lvm.conf.5.in
+++ b/man/lvm.conf.5.in
@@ -104,6 +104,12 @@ otherwise it is accepted. As an example, to ignore /dev/cdrom you could use:
.br
\fBdevices { filter=["r|cdrom|"] }\fP
.IP
+\fBglobal_filter\fP \(em Since "filter" is often overriden from command line, it
+is not suitable for system-wide device filtering (udev rules, lvmetad). To hide
+devices from LVM-specific udev processing and/or from lvmetad, you need to set
+global_filter. The syntax is the same as for normal "filter" above. Devices that
+fail the global_filter are not even opened by LVM.
+.IP
\fBcache_dir\fP \(em Persistent filter cache file directory.
Defaults to "#DEFAULT_CACHE_DIR#".
.IP
@@ -354,6 +360,18 @@ if \fBlocking_type\fP is set to 1. The default is \fB/var/lock/lvm\fP.
library to load if \fBlocking_type\fP is set to 2.
The default is \fBliblvm2clusterlock.so\fP. If you need to write
such a library, look at the lib/locking source code directory.
+.IP
+\fBuse_lvmetad\fP \(em Whether to use (trust) a running instance of lvmetad. If
+this is set to 0, all commands fall back to the usual scanning mechanisms. When
+set to 1 \fBand\fP when lvmetad is running (it is not auto-started), the volume
+group metadata and PV state flags are obtained from the lvmetad instance and no
+scanning is done by the individual commands. In a setup with lvmetad, lvmetad
+udev rules \fBmust\fP be set up for LVM to work correctly. Without proper udev
+rules, all changes in block device configuration will be \fBignored\fP until a
+manual 'pvscan --cache' is performed.
+.br
+If lvmetad has been running while use_lvmetad was 0, it \fBMUST\fP be stopped before
+changing use_lvmetad to 1 and started again afterwards.
.TP
\fBtags\fP \(em Host tag settings
.IP
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bf1cf1459f414eb1…
Commit: bf1cf1459f414eb1b397c21a0cdbd5acda7540f6
Parent: 1794f777f48be29184ef8030b6e11b3a8e61757b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Oct 30 17:11:59 2012 +0000
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Nov 19 14:38:17 2012 +0100
thin: man page updates
Cover latest extensions of lvconvert functionality.
Update also lvcreate page.
---
man/lvconvert.8.in | 103 ++++++++++++++++++++++++++++++++++++++++++++--------
man/lvcreate.8.in | 18 +++++-----
2 files changed, 96 insertions(+), 25 deletions(-)
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
index 2659719..48345a9 100644
--- a/man/lvconvert.8.in
+++ b/man/lvconvert.8.in
@@ -40,7 +40,7 @@ lvconvert \- convert a logical volume from linear to mirror or snapshot
.B lvconvert
.BR \-s | \-\-snapshot
.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
+.IR ChunkSize [ bBsSkK ]]
.RB [ \-h | \-? | \-\-help ]
.RB [ \-\-noudevsync ]
.RB [ \-v | \-\-verbose ]
@@ -59,17 +59,6 @@ lvconvert \- convert a logical volume from linear to mirror or snapshot
.RB [ \-\-version ]
.IR LogicalVolume [ Path ]...
.sp
-.B lvconvert \-\-thinpool
-.IR ThinPoolLogicalVolume { Name | Path }
-.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-Z | \-\-zero
-.RI { y | n }]
-.IR ThinMetadataLogicalVolume { Name | Path }
-.sp
.B lvconvert \-\-repair
.RB [ \-h | \-? | \-\-help ]
.RB [ \-v | \-\-verbose ]
@@ -83,6 +72,31 @@ lvconvert \- convert a logical volume from linear to mirror or snapshot
.RB [ \-\-version ]
.IR LogicalVolume [ Path ]
.RI [ PhysicalVolume [ Path ]...]
+.sp
+.B lvconvert \-\-thinpool
+.IR ThinPoolLogicalVolume { Name | Path }
+.RB [ \-c | \-\-chunksize
+.IR ChunkSize [ bBsSkKmMgG ]]
+.RB [ \-\-discards
+.RI { ignore | nopassdown | passdown }]
+.RB [[ \-\-poolmetadata
+.IR ThinPoolMetadataLogicalVolume { Name | Path }]
+|
+.RB [ \-\-poolmetadatasize
+.IR ThinPoolMetadataSize [ bBsSkKmMgG ]]
+.RB [ \-r | \-\-readahead
+.RI { ReadAheadSectors | auto | none }]
+.RB [ \-\-stripes
+.I Stripes
+.RB [ \-I | \-\-stripesize
+.IR StripeSize ]]]
+.RB [ \-Z | \-\-zero
+.RI { y | n }]
+.RB [ \-h | \-? | \-\-help ]
+.RB [ \-v | \-\-verbose ]
+.RB [ \-\-version ]
+.RI [ PhysicalVolume [ Path ][ :PE [ -PE ]]...]
+.sp
.SH DESCRIPTION
lvconvert is used to change the segment type (i.e. linear, mirror, etc) or
@@ -102,8 +116,9 @@ the freed extents come first from the specified PhysicalVolumes.
See \fBlvm\fP(8) for common options.
.br
Exactly one of
-.BR \-\-splitmirrors ", " \-\-mirrors ", " \-\-repair ", " \-\-snapshot
-or \fB\-\-merge\fP arguments is required.
+.BR \-\-merge ", " \-\-mirrors ", " \-\-repair ", " \-\-replace
+.RB ", " \-\-snapshot ", " \-\-splitmirrors " or " \-\-thinpool
+arguments is required.
.TP
.BR \-m ", " \-\-mirrors " " \fIMirrors
Specifies the degree of the mirror you wish to create.
@@ -170,12 +185,28 @@ implementation and not with the original device-mapper mirror implementation.
Create a snapshot from existing logical volume using another
existing logical volume as its origin.
.TP
-.BR \-c ", " \-\-chunksize " " \fIChunkSize
-Power of 2 chunk size for the snapshot logical volume between 4KiB and 512KiB.
+.BR \-c ", " \-\-chunksize " " \fIChunkSize [ \fIbBsSkKmMgG ]
+Gives the size of chunk for snapshot and thin pool logical volumes.
+For snapshots the value must be power of 2 between 4KiB and 512KiB
+and the default value is 4.
+For thin pools the value must be between 64KiB and
+1GiB and the default value starts with 64 and scales
+up to fit the pool metadata size within 128MB,
+if the pool metadata size is not specified.
+Older dm thin pool target version (<1.4) requires the value to be power of 2.
+The newer version requires to be the multiple of 64KiB, however discard is
+not supported for non power of 2 values.
+Default unit is in kilobytes.
+.TP
+.BR \-\-discards " {" \fIignore | \fInopassdown | \fIpassdown }
+Sets discards behavior for thin pool.
+Default is \fIpassdown\fP.
.TP
.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
Controls zeroing of the first KB of data in the snapshot.
If the volume is read-only the snapshot will not be zeroed.
+For thin pool volumes it controls zeroing of provisioned blocks.
+Note: Provisioning of large zeroed chunks impacts performance.
.TP
.B \-\-merge
Merges a snapshot into its origin volume or merges a raid1 image that has
@@ -195,6 +226,28 @@ merge finishes, the merged snapshot is removed. Multiple snapshots may
be specified on the commandline or a @tag may be used to specify
multiple snapshots be merged to their respective origin.
.TP
+.BR \-\-poolmetadata " " \fIThinPoolMetadataLogicalVolume { \fIName | \fIPath }
+Specifies thin pool metadata logical volume.
+The size should be in between 2MiB and 16GiB.
+Thin pool is specified with the option
+\fB\-\-thinpool\fP.
+.TP
+.BR \-\-poolmetadatasize " " \fIThinPoolMetadataSize [ \fIbBsSkKmMgG ]
+Sets the size of thin pool's metadata logical volume,
+if the pool metadata volume is undefined.
+Thin pool is specified with the option
+\fB\-\-thinpool\fP.
+Supported value is in the range between 2MiB and 16GiB.
+The default value is estimated with this formula
+(Pool_LV_size / Pool_LV_chunk_size * 64b).
+Default unit is megabytes.
+.TP
+.IR \fB\-r ", " \fB\-\-readahead " {" ReadAheadSectors | auto | none }
+Sets read ahead sector count of thin pool metadata logical volume.
+The default value is "auto" which allows the kernel to choose
+a suitable value automatically.
+"None" is equivalent to specifying zero.
+.TP
.B \-\-repair
Repair a mirror after suffering a disk failure. The mirror will be brought back
into a consistent state. By default, the original number of mirrors will be
@@ -210,6 +263,24 @@ Remove the specified device (\fIPhysicalVolume\fP) and replace it with one
that is available in the volume group or from the specific list provided.
This option is only available to RAID segment types
(e.g. "raid1", "raid5", etc).
+.TP
+.BR \-\-stripes " " \fIStripes
+Gives the number of stripes.
+This is equal to the number of physical volumes to scatter
+the logical volume.
+.TP
+.BR \-I ", " \-\-stripesize " " \fIStripeSize
+Gives the number of kilobytes for the granularity of the stripes.
+.br
+StripeSize must be 2^n (n = 2 to 9) for metadata in LVM1 format.
+For metadata in LVM2 format, the stripe size may be a larger
+power of 2 but must not exceed the physical extent size.
+.TP
+.IR \fB\-\-thinpool " " ThinPoolLogicalVolume { Name | Path }
+Changes logical volume into a thin pool volume. The volume
+will store the pool's data.
+Thin pool metadata logical volume can be specified with the option
+\fB\-\-poolmetadata\fP or allocated with \fB\-\-poolmetadatasize\fP.
.SH Examples
Converts the linear logical volume "vg00/lvol1" to a two-way mirror
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
index f374950..705ebae 100644
--- a/man/lvcreate.8.in
+++ b/man/lvcreate.8.in
@@ -53,11 +53,11 @@ lvcreate \- create a logical volume in an existing volume group
.RB [ \-t | \-\-test ]
.RB [ \-T | \-\-thin
.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
+.IR ChunkSize [ bBsSkKmMgG ]]
.RB [ \-\-discards
.RI { ignore | nopassdown | passdown }]
.RB [ \-\-poolmetadatasize
-.IR MetadataSize [ bBsSkKmMgG ]]]
+.IR ThinPoolMetadataSize [ bBsSkKmMgG ]]]
.RB [ \-\-thinpool
.IR ThinPoolLogicalVolume { Name | Path }]
.RB [ \-\-type
@@ -76,7 +76,7 @@ lvcreate \- create a logical volume in an existing volume group
.BR \-L | \-\-size
.IR LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]]
.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
+.IR ChunkSize [ bBsSkK ]]
.RB [ \-\-noudevsync ]
.RB [ \-\-ignoremonitoring ]
.RB [ \-\-monitor " {" \fIy | \fIn }]
@@ -125,14 +125,14 @@ always assumed and it can't be overridden. If clustered locking is enabled,
\fB\-a\fIey\fR will activate exclusively on one node and \fB\-a\fIly\fR will
activate only on the local node.
.TP
-.BR \-c ", " \-\-chunksize " " \fIChunkSize
+.BR \-c ", " \-\-chunksize " " \fIChunkSize [ \fIbBsSkKmMgG ]
Gives the size of chunk for snapshot and thin pool logical volumes.
For snapshots the value must be power of 2 between 4KiB and 512KiB
and the default value is 4.
For thin pools the value must be between 64KiB and
-1048576KiB and the default value starts with 64 and scales
+1GiB and the default value starts with 64 and scales
up to fit the pool metadata size within 128MB,
-if the poolmetadata size is not specified.
+if the pool metadata size is not specified.
Older dm thin pool target version (<1.4) requires the value to be power of 2.
The newer version requires to be the multiple of 64KiB, however discard is
not supported for non power of 2 values.
@@ -144,7 +144,7 @@ logical volumes. Default is no contiguous allocation based
on a next free principle.
.TP
.BR \-\-discards " {" \fIignore | \fInopassdown | \fIpassdown }
-Set discards behavior.
+Set discards behavior for thin pool.
Default is \fIpassdown\fP.
.TP
.BR \-i ", " \-\-stripes " " \fIStripes
@@ -236,7 +236,7 @@ Set access permissions to read only or read and write.
.br
Default is read and write.
.TP
-.IR \fB\-\-poolmetadatasize " " MetadataSize [ bBsSkKmMgG ]
+.IR \fB\-\-poolmetadatasize " " ThinPoolMetadataSize [ bBsSkKmMgG ]
Set the size of thin pool's metadata logical volume.
Supported value is in range between 2MiB and 16GiB.
Default value is (Pool_LV_size / Pool_LV_chunk_size * 64b).
@@ -372,7 +372,7 @@ copies.
.B lvcreate \-\-type raid10 \-L 5G \-i 2 \-m 1 \-n my_lv vg00
Creates 100MiB pool logical volume for thin provisioning
-build with 2 stripes 64KiB and chunk size 128KiB together with
+build with 2 stripes 64KiB and chunk size 256KiB together with
1TiB thin provisioned logical volume "vg00/thin_lv":
.sp
.B lvcreate \-i 2 \-I 64 \-c 256 \-L100M \-T vg00/pool \-V 1T \-\-name thin_lv