Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=422d1ac8d244e1d7…
Commit: 422d1ac8d244e1d7c5e122c54efe0ad67ce98d04
Parent: 5226181329fe9f810495cbc348942708dacc8d0e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 19 01:04:24 2014 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 19 01:09:52 2014 +0100
man: clvmd updates
- closer to the recommendation of man-pages (7) if possible
- Add crossrefs
- Sort options and crossrefs
- Fix default timeout (60 secs) of -t
- Documents -I[auto]
Signed-off-by: Stéphane Aulery <saulery(a)free.fr>
---
daemons/clvmd/clvmd.c | 16 +++++-----
man/clvmd.8.in | 69 +++++++++++++++++++++++++++----------------------
2 files changed, 46 insertions(+), 39 deletions(-)
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
index 0c1cb44..5cd6874 100644
--- a/daemons/clvmd/clvmd.c
+++ b/daemons/clvmd/clvmd.c
@@ -153,16 +153,11 @@ static if_type_t get_cluster_type(void);
static void usage(const char *prog, FILE *file)
{
fprintf(file, "Usage: %s [options]\n"
- " -V Show version of clvmd\n"
- " -h Show this help information\n"
+ " -C Sets debug level (from -d) on all clvmd instances clusterwide\n"
" -d[n] Set debug logging (0:none, 1:stderr (implies -f option), 2:syslog)\n"
+ " -E<uuid> Take this lock uuid as exclusively locked resource (for restart)\n"
" -f Don't fork, run in the foreground\n"
- " -E<lockuuid> Take this lock uuid as exclusively locked resource (for restart)\n"
- " -R Tell all running clvmds in the cluster to reload their device cache\n"
- " -S Restart clvmd, preserving exclusive locks\n"
- " -C Sets debug level (from -d) on all clvmd instances clusterwide\n"
- " -t<secs> Command timeout (default 60 seconds)\n"
- " -T<secs> Startup timeout (default none)\n"
+ " -h Show this help information\n"
" -I<cmgr> Cluster manager (default: auto)\n"
" Available cluster managers: "
#ifdef USE_COROSYNC
@@ -177,6 +172,11 @@ static void usage(const char *prog, FILE *file)
#ifdef USE_SINGLENODE
"singlenode "
#endif
+ " -R Tell all running clvmds in the cluster to reload their device cache\n"
+ " -S Restart clvmd, preserving exclusive locks\n"
+ " -t<secs> Command timeout (default: 60 seconds)\n"
+ " -T<secs> Startup timeout (default: 0 seconds)\n"
+ " -V Show version of clvmd\n"
"\n", prog);
}
diff --git a/man/clvmd.8.in b/man/clvmd.8.in
index 915e447..9b2bd4e 100644
--- a/man/clvmd.8.in
+++ b/man/clvmd.8.in
@@ -3,9 +3,8 @@
clvmd \(em cluster LVM daemon
.SH SYNOPSIS
.B clvmd
-.RB [ \-d
-.RI [< value >]
-.RB [ \-C ]]
+.RB [ \-C ]
+.RB [ \-d [< \fIvalue\fP >]]
.RB [ \-E
.RI < "lock uuid" >]
.RB [ \-f ]
@@ -65,48 +64,53 @@ Don't fork, run in the foreground.
.B \-h
Show help information.
.TP
-.B \-I \fIcluster manager
-Selects the cluster manager to use for locking and internal communications,
-the available managers will be listed as part of the \fBclvmd \-h\fP output.
-clvmd will use the first cluster manager that succeeds, and it checks them
-in the order cman,corosync,openais. As it is quite possible to have
-(eg) corosync and cman available on the same system you might have to
-manually specify this option to override the search.
+.BR \-I " \fIcluster_manager\fP"
+Selects the \fIcluster manager\fP to use for locking and internal
+communications. As it is quite possible to have multiple managers available on
+the same system you might have to manually specify this option to override the
+search.
+
+By default, omit \fB-I\fP is equivalent to \fB\-I\fP\fIauto\fP. \fBClvmd\fP
+will use the first cluster manager that succeeds, and it checks them in a
+predefined order cman,corosync,openais.
+The available managers will be listed by order as part of the
+\fBclvmd \-h\fP output.
.TP
.B \-R
-Tells all the running clvmds in the cluster to reload their device cache and
-re-read the lvm configuration file. This command should be run whenever the
+Tells all the running instance of \fBclvmd\fP in the cluster to reload their device cache and
+re-read the lvm configuration file \fBlvm.conf\fP(5). This command should be run whenever the
devices on a cluster system are changed.
.TP
.B \-S
-Tells the running clvmd to exit and reexecute itself, for example at the
-end of a package upgrade. The new instance is instructed to reacquire
-any locks in the same state as they were previously held. (Alternative
+Tells the running \fBclvmd\fP to exit and reexecute itself, for example at the
+end of a package upgrade. The new instance is instructed to reacquire
+any locks in the same state as they were previously held. (Alternative
methods of restarting the daemon have the side effect of changing
exclusive LV locks into shared locks.)
.TP
.BR \-t < \fItimeout >
-Specifies the timeout for commands to run around the cluster. This should not
+Specifies the \fItimeout\fP for commands to run around the cluster. This should not
be so small that commands with many disk updates to do will fail, so you
may need to increase this on systems with very large disk farms.
-The default is 30 seconds.
+The default is 60 seconds.
.TP
.BR \-T < "\fIstart timeout" >
-Specifies the timeout for clvmd daemon startup. If the daemon does not report
-that it has started up within this time then the parent command will exit with
-status of 5. This does NOT mean that clvmd has not started! What it means is
-that the startup of clvmd has been delayed for some reason; the most likely
-cause of this is an inquorate cluster though it could be due to locking
-latencies on a cluster with large numbers of logical volumes. If you get the
-return code of 5 it is usually not necessary to restart clvmd - it will start
-as soon as that blockage has cleared. This flag is to allow startup scripts
-to exit in a timely fashion even if the cluster is stalled for some reason.
-.br
+Specifies the \fIstart timeout\fP for \fBclvmd\fP daemon startup. If the
+daemon does not report that it has started up within this time then the parent
+command will exit with status of 5. This does NOT mean that \fBclvmd\fP has
+not started! What it means is that the startup has been delayed for some
+reason; the most likely cause of this is an inquorate cluster though it
+could be due to locking latencies on a cluster with large numbers of logical
+volumes. If you get the return code of 5 it is usually not necessary to
+restart \fBclvmd\fP — it will start as soon as that blockage has cleared.
+This flag is to allow startup scripts to exit in a timely fashion even if the
+cluster is stalled for some reason.
+
The default is 0 (no timeout) and the value is in seconds. Don't set this too
small or you will experience spurious errors. 10 or 20 seconds might be
sensible.
-.br
-This timeout will be ignored if you start clvmd with the \-d switch.
+
+This timeout will be ignored if you start \fBclvmd\fP with the \fB\-d\fP.
.TP
.B \-V
Display the version of the cluster LVM daemon.
@@ -114,11 +118,14 @@ Display the version of the cluster LVM daemon.
.SH ENVIRONMENT VARIABLES
.TP
.B LVM_CLVMD_BINARY
-The CLVMD binary to use when clmvd restart is requested.
+The CLVMD binary to use when \fBclmvd\fP restart is requested.
Defaults to #CLVMD_PATH#.
.TP
.B LVM_BINARY
-The LVM2 binary to use. Defaults to #LVM_PATH#.
+The LVM2 binary to use.
+Defaults to #LVM_PATH#.
.SH SEE ALSO
+.BR syslog (3),
+.BR lvm.conf (5),
.BR lvm (8)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5226181329fe9f81…
Commit: 5226181329fe9f810495cbc348942708dacc8d0e
Parent: 10330b8782628d981b05de7c06da4370e4b34ff0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Nov 18 22:07:58 2014 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 19 01:09:52 2014 +0100
man: clvmd help output
Closer to the recommendation of groff_man (7) if possible
Signed-off-by: Stéphane Aulery <saulery(a)free.fr>
---
man/clvmd.8.in | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/man/clvmd.8.in b/man/clvmd.8.in
index d79c29b..915e447 100644
--- a/man/clvmd.8.in
+++ b/man/clvmd.8.in
@@ -26,17 +26,16 @@ if a node in the cluster does not have this daemon running.
.SH OPTIONS
.TP
.BR \-d [< \fIvalue >]
-Enable debug logging. Value can be 0, 1 or 2.
-.br
-0 disables debug logging
-.br
-1 sends debug logs to stderr (implies \fB\-f\fP option)
-.br
-2 sends debug logs to syslog
-.br
-If
-.B \-d
-is specified without a value then 1 is assumed.
+Set debug logging level.If \fB\-d\fP is specified without a \fIvalue\fP
+then 1 is assumed. \fIValue\fP can be:
+.RS
+.IP \fI0\fP
+Disabled
+.IP \fI1\fP
+Sends debug logs to stderr (implies \fB\-f\fP)
+.IP \fI2\fP
+Sends debug logs to \fBsyslog\fP(3)
+.RE
.TP
.B \-C
Only valid if
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=10330b8782628d98…
Commit: 10330b8782628d981b05de7c06da4370e4b34ff0
Parent: 731e99025bf66967de365fb7a79d5689dc14d5fe
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 19 00:35:04 2014 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 19 01:09:24 2014 +0100
man: blkdeactivate help output
- Closer to the recommendation of man-pages and groff_man (7) if
possible
- Sort options and crossrefs
- Relocate sub-options on the right places
Signed-off-by: Stéphane Aulery <saulery(a)free.fr>
---
man/blkdeactivate.8.in | 76 +++++++++++++++++++++++++----------------------
1 files changed, 40 insertions(+), 36 deletions(-)
diff --git a/man/blkdeactivate.8.in b/man/blkdeactivate.8.in
index bfd0204..ebeaeaa 100644
--- a/man/blkdeactivate.8.in
+++ b/man/blkdeactivate.8.in
@@ -3,57 +3,61 @@
blkdeactivate \(em utility to deactivate block devices
.SH SYNOPSIS
.B blkdeactivate
-.RI [ options ]
-.RI [ device... ]
-.sp
+.RB [ \-d \ \fIdm_options\fP ]
+.RB [ \-e ]
+.RB [ \-h ]
+.RB [ \-l \ \fIlvm_options\fP ]
+.RB [ \-u ]
+.RB [ \-v ]
+.RS
+.RI [ device ]
+.RE
.SH DESCRIPTION
blkdeactivate utility deactivates block devices. If a device
is mounted, the utility can unmount it automatically before
trying to deactivate. The utility currently supports
-\fIdevice-mapper\fP devices, including \fILVM\fP volumes.
-LVM volumes are handled directly using the \fIlvm\fP command.
+device-mapper devices, including LVM volumes.
+LVM volumes are handled directly using the \fBlvm\fP(8) command.
Other device-mapper based devices are handled using the
-\fIdmsetup\fP command.
+\fBdmsetup\fP(8) command.
.SH OPTIONS
.TP
+.BR \-d ", " \-\-dmoption \ \fIdm_options\fP
+Comma separated list of device-mapper specific options.
+Accepted \fBdmsetup\fP(8) options are:
+.RS
+.IP \fIretry\fP
+Retry removal several times in case of failure.
+.IP \fIforce\fP
+Force device removal.
+.RE
+.TP
.BR \-e ", " \-\-errors
-Show errors reported from tools called by blkdeactivate.
-Without this option, any error messages from these external tools
-are suppressed and the blkdeactivate itself provides only a summary
-message about device being skipped or not.
+Show errors reported from tools called by \fBblkdeactivate\fP. Without this
+option, any error messages from these external tools are suppressed and the
+\fBblkdeactivate\fP itself provides only a summary message about device being
+skipped or not.
.TP
.BR \-h ", " \-\-help
Display the help text.
.TP
+.BR \-l ", " \-\-lvmoption \ \fIlvm_options\fP
+Comma separated list of LVM specific options:
+.RS
+.IP \fIretry\fP
+Retry removal several times in case of failure.
+.IP \fIwholevg\fP
+Deactivate the whole LVM Volume Group when processing a Logical Volume.
+Deactivating Volume Group as a whole takes less time than deactivating each
+Logical Volume separately.
+.RE
+.TP
.BR \-u ", " \-\-umount
Unmount a mounted device before trying to deactivate it.
Without this option used, a device that is mounted is not deactivated.
.TP
.BR \-v ", " \-\-verbose
Run in verbose mode.
-.TP
-.BR \-d ", " \-\-dmoption " " \fIdm_options
-Comma separated list of device-mapper specific options.
-.TP
-.BR \-l ", " \-\-lvmoption " " \fIlvm_options
-Comma separated list of LVM specific options.
-.SH DM_OPTIONS
-.TP
-.B retry
-Retry removal several times in case of failure.
-.TP
-.B force
-Force device removal. See \fBdmsetup\fP(8) for more information.
-.SH LVM_OPTIONS
-.TP
-.B retry
-Retry removal several times in case of failure.
-.TP
-.B wholevg
-Deactivate the whole LVM Volume Group when processing a Logical Volume.
-Deactivating Volume Group as a whole takes less time than deactivating
-each Logical Volume separately.
-
.SH EXAMPLES
.sp
Deactivate all supported block devices found in the system. If a device
@@ -83,7 +87,7 @@ of device-mapper devices in case the deactivation fails and force removal.
.B blkdeactivate \-d force,retry
.SH SEE ALSO
-.BR lsblk (8)
+.BR dmsetup (8),
+.BR lsblk (8),
+.BR lvm (8),
.BR umount (8)
-.BR dmsetup (8)
-.BR lvm (8)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=731e99025bf66967…
Commit: 731e99025bf66967de365fb7a79d5689dc14d5fe
Parent: 53d2db31c6e68c43c59a47333c16f18658ce9ea4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Nov 19 00:30:43 2014 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Nov 19 00:31:23 2014 +0100
man: lvchange update
Fix \fI usage.
---
man/lvchange.8.in | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/man/lvchange.8.in b/man/lvchange.8.in
index d3d63fd..cafb914 100644
--- a/man/lvchange.8.in
+++ b/man/lvchange.8.in
@@ -10,8 +10,9 @@ lvchange \(em change attributes of a logical volume
.RB [ \-a | \-\-activate
.RI [ a | e | l ]{ y | n }]
.RB [ \-\-activationmode
-.IR { complete | degraded | partial } ]
-.RB [ \-k | \-\-setactivationskip { y | n } ]
+.RI { complete | degraded | partial }]
+.RB [ \-k | \-\-setactivationskip
+.RI { y | n }]
.RB [ \-K | \-\-ignoreactivationskip ]
.RB [ \-\-alloc
.IR AllocationPolicy ]
@@ -44,7 +45,7 @@ lvchange \(em change attributes of a logical volume
.RB [ \-\-[raid]writebehind
.IR IOCount ]
.RB [ \-\-[raid]writemostly
-.IR PhysicalVolume [ : { t | n | y }]]
+.IR PhysicalVolume [ : { y | n | t }]]
.RB [ \-\-sysinit ]
.RB [ \-\-noudevsync ]
.RB [ \-\-metadataprofile
@@ -105,15 +106,15 @@ exclusively because they can only be used on one node at once.
.BR \-\-activationmode " {" \fIcomplete | \fIdegraded | \fIpartial }
The activation mode determines whether logical volumes are allowed to
activate when there are physical volumes missing (e.g. due to a device
-failure). \fIcomplete is the most restrictive; allowing only those
+failure). \fIcomplete\fP is the most restrictive; allowing only those
logical volumes to be activated that are not affected by the missing
-PVs. \fIdegraded allows RAID logical volumes to be activated even if
-they have PVs missing. (Note that the "mirror" segment type is not
-considered a RAID logical volume. The "raid1" segment type should
-be used instead.) Finally, \fIpartial allows any logical volume to
+PVs. \fIdegraded\fP allows RAID logical volumes to be activated even if
+they have PVs missing. (Note that the "\fImirror\fP" segment type is not
+considered a RAID logical volume. The "\fIraid1\fP" segment type should
+be used instead.) Finally, \fIpartial\fP allows any logical volume to
be activated even if portions are missing due to a missing or failed
PV. This last option should only be used when performing recovery or
-repair operations. \fIdegraded is the default mode. To change it, modify
+repair operations. \fIdegraded\fP is the default mode. To change it, modify
.B activation_mode
in
.BR lvm.conf (5).
@@ -220,14 +221,14 @@ to the constituent devices must complete before the array signals the
write has completed). Setting the value to zero clears the preference
and allows the system to choose the value arbitrarily.
.TP
-.IR \fB\-\-[raid]writemostly " " PhysicalVolume [ : { t | y | n }]
+.IR \fB\-\-[raid]writemostly " " PhysicalVolume [ : { y | n | t }]
Mark a device in a RAID1 logical volume as \fIwrite-mostly\fP. All reads
to these drives will be avoided unless absolutely necessary. This keeps
the number of I/Os to the drive to a minimum. The default behavior is to
set the write-mostly attribute for the specified physical volume in the
logical volume. It is possible to also remove the write-mostly flag by
-appending a ":n" to the physical volume or to toggle the value by specifying
-":t". The \fB\-\-writemostly\fP argument can be specified more than one time
+appending a "\fI:n\fP" to the physical volume or to toggle the value by specifying
+"\fI:t\fP". The \fB\-\-writemostly\fP argument can be specified more than one time
in a single command; making it possible to toggle the write-mostly attributes
for all the physical volumes in a logical volume at once.
.TP
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=aaa6205d5ad4beb8…
Commit: aaa6205d5ad4beb8a54d56f9285cafb5dbd5c7b4
Parent: cf37c04347c6b6209420764da43127a96445af0e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 18 09:22:37 2014 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 18 09:25:56 2014 -0600
toollib: improve ignore_vg case in _process_pvs_in_vgs
ignore_vg now returns 0 for the FAILED_CLUSTERED case,
so all the ignore_vg 1 cases will return vg's with an
empty vg->pvs, so we do not need to iterate through
vg->pvs to remove the entries from the devices list.
Clean up whitespace problems in that area from the
previous commit.
---
tools/toollib.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index 8eb434d..30dc980 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -2200,25 +2200,26 @@ static int _process_pvs_in_vgs(struct cmd_context *cmd, uint32_t flags,
vg = vg_read(cmd, vg_name, vg_uuid, flags | READ_WARN_INCONSISTENT);
if (ignore_vg(vg, vg_name, flags & READ_ALLOW_INCONSISTENT, &skip)) {
stack;
- ret = ECMD_FAILED;
- skip = 1;
-
- /* Only continue if no vg was returned. */
- if (!vg)
- continue;
+ ret_max = ECMD_FAILED;
+ continue;
}
+ /*
+ * Don't continue when skip is set, because we need to remove
+ * vg->pvs entries from devices list.
+ */
+
ret = _process_pvs_in_vg(cmd, vg, all_devices, arg_pvnames, arg_tags,
process_all, skip, handle, process_single_pv);
if (ret != ECMD_PROCESSED)
stack;
- if (ret > ret_max)
+ if (ret > ret_max)
ret_max = ret;
- if (skip)
- release_vg(vg);
- else
- unlock_and_release_vg(cmd, vg, vg->name);
+ if (skip)
+ release_vg(vg);
+ else
+ unlock_and_release_vg(cmd, vg, vg->name);
/* Quit early when possible. */
if (!process_all && dm_list_empty(arg_tags) && dm_list_empty(arg_pvnames))