master - remove unused backgroundfork option
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3ca8ed66a737c3b078e...
Commit: 3ca8ed66a737c3b078e292752461befd157d49b4
Parent: 814cff0c20158b89592bac437faa375d7d8ff682
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Nov 14 09:34:49 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Nov 14 09:34:49 2018 -0600
remove unused backgroundfork option
---
tools/args.h | 5 -----
tools/lvmcmdline.c | 8 --------
2 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index 3e737f8..1ceba99 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -932,16 +932,11 @@ arg(activevolumegroups_ARG, 'A', "activevolumegroups", 0, 0, 0,
"Only select active VGs. The VG is considered active\n"
"if at least one of its LVs is active.\n")
-/* FIXME: remove background option from pvscan, it's not used */
-
arg(background_ARG, 'b', "background", 0, 0, 0,
"If the operation requires polling, this option causes the command to\n"
"return before the operation is complete, and polling is done in the\n"
"background.\n")
-/* Not used */
-arg(backgroundfork_ARG, 'b', "background", 0, 0, 0, NULL)
-
arg(basevgname_ARG, 'n', "basevgname", string_VAL, 0, 0,
"By default the snapshot VG will be renamed to the original name plus a\n"
"numeric suffix to avoid duplicate naming (e.g. 'test_vg' would be renamed\n"
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index f49843d..9c0476e 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -2825,14 +2825,6 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
set_cmd_name(cmd->name);
- if (arg_is_set(cmd, backgroundfork_ARG)) {
- if (!become_daemon(cmd, 1)) {
- /* parent - quit immediately */
- ret = ECMD_PROCESSED;
- goto out;
- }
- }
-
if (arg_is_set(cmd, config_ARG))
if (!override_config_tree_from_string(cmd, arg_str_value(cmd, config_ARG, ""))) {
ret = EINVALID_CMD_LINE;
5 years, 4 months
master - man: pvscan updates
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=814cff0c20158b89592...
Commit: 814cff0c20158b89592bac437faa375d7d8ff682
Parent: 819b469880e9f6b18e76d3f1cdbd3e69fe5dab3e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Nov 14 09:34:30 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Nov 14 09:34:30 2018 -0600
man: pvscan updates
---
man/pvscan.8_des | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/man/pvscan.8_des b/man/pvscan.8_des
index 5e24855..f685b82 100644
--- a/man/pvscan.8_des
+++ b/man/pvscan.8_des
@@ -1,13 +1,11 @@
-pvscan reads all supported LVM block devices in the system for PVs.
-
When called without the --cache option, pvscan lists PVs on the system,
like
.BR pvs (8)
or
.BR pvdisplay (8).
-When the --cache and -aay options are used, pvscan keeps track of PVs that
-have appeared on the system, and activates LVs in completed VGs. A VG is
+When the --cache and -aay options are used, pvscan records which PVs are
+available on the system, and activates LVs in completed VGs. A VG is
complete when pvscan sees that the final PV in the VG has appeared. This
is used by event-based system startup (systemd, udev) to activate LVs.
@@ -23,14 +21,14 @@ In most cases, the pvscan will only read the named devices.
.B pvscan --cache -aay
.IR device ...
-This begins by performing the same steps as above. If the device is the
-final PV in the VG to appear on the system, then pvscan will activate LVs
-in the VG (the same as vgchange -aay vgname would do.)
+This begins by performing the same steps as above. Afterward, if the VG
+for the specified PV is complete, then pvscan will activate LVs in the VG
+(the same as vgchange -aay vgname would do.)
.B pvscan --cache
-This clears all existing PV online records, then scans all the devices on
-the system, adding PV online records for any PVs that it finds.
+This first clears all existing PV online records, then scans all devices
+on the system, adding PV online records for any PVs that are found.
.B pvscan --cache -aay
5 years, 4 months
master - man pvscan: replace lvmetad text
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cbee4d3d8843e14368f...
Commit: cbee4d3d8843e14368f5f68531ef8ab429287077
Parent: 1c0b02e367a4686d2331f140c999aa3b4f26cea7
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 13 17:23:32 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 13 17:23:32 2018 -0600
man pvscan: replace lvmetad text
---
man/pvscan.8_des | 120 ++++++++++++++++++++---------------------------------
1 files changed, 45 insertions(+), 75 deletions(-)
diff --git a/man/pvscan.8_des b/man/pvscan.8_des
index c3d80b4..5e24855 100644
--- a/man/pvscan.8_des
+++ b/man/pvscan.8_des
@@ -1,70 +1,49 @@
-pvscan scans all supported LVM block devices in the system for PVs.
-
-\fBScanning with lvmetad\fP
-
-pvscan operates differently when used with the
-.BR lvmetad (8)
-daemon.
-
-Scanning disks is required to read LVM metadata and identify LVM PVs.
-Once read, lvmetad caches the metadata so that LVM commands can read it
-without repeatedly scanning disks. This is helpful because scanning disks
-is time consuming, and frequent scanning may interfere with the normal
-work of the system and disks.
-
-When lvmetad is not used, LVM commands revert to scanning disks to read
-metadata. Any LVM command that needs metadata will scan disks for it;
-running the pvscan command is not necessary for the sake of other LVM
-commands.
-
-When lvmetad is used, LVM commands avoid scanning disks by reading
-metadata from lvmetad. When new disks appear, they must be scanned so
-their metadata can be cached in lvmetad. This is done by the command
-pvscan --cache, which scans disks and passes the metadata to lvmetad.
-
-The pvscan --cache command is typically run automatically by system
-services when a new device appears. Users do not generally need to run
-this command if the system and lvmetad are running properly.
-
-Many scripts contain unnecessary pvscan (or vgscan) commands for
-historical reasons. To avoid disrupting the system with extraneous disk
-scanning, an ordinary pvscan (without --cache) will simply read metadata
-from lvmetad like other LVM commands. It does not do anything beyond
-displaying the current state of the cache.
-.IP \[bu] 2
-When given specific device name arguments, pvscan --cache will only
-read the named devices.
-.IP \[bu] 2
-LVM udev rules and systemd services are used to initiate automatic device
-scanning.
-.IP \[bu] 2
+pvscan reads all supported LVM block devices in the system for PVs.
+
+When called without the --cache option, pvscan lists PVs on the system,
+like
+.BR pvs (8)
+or
+.BR pvdisplay (8).
+
+When the --cache and -aay options are used, pvscan keeps track of PVs that
+have appeared on the system, and activates LVs in completed VGs. A VG is
+complete when pvscan sees that the final PV in the VG has appeared. This
+is used by event-based system startup (systemd, udev) to activate LVs.
+
+The four main variations of this are:
+
+.B pvscan --cache
+.IR device
+
+If device is present, lvm adds a record that the PV on device is online.
+If device is not present, lvm removes the online record for the PV.
+In most cases, the pvscan will only read the named devices.
+
+.B pvscan --cache -aay
+.IR device ...
+
+This begins by performing the same steps as above. If the device is the
+final PV in the VG to appear on the system, then pvscan will activate LVs
+in the VG (the same as vgchange -aay vgname would do.)
+
+.B pvscan --cache
+
+This clears all existing PV online records, then scans all the devices on
+the system, adding PV online records for any PVs that it finds.
+
+.B pvscan --cache -aay
+
+This begins by performing the same steps as pvscan --cache. Afterward, it
+activates LVs in any complete VGs.
+
To prevent devices from being scanned by pvscan --cache, add them
to
.BR lvm.conf (5)
.B devices/global_filter.
-The devices/filter setting does not
-apply to system level scanning.
For more information, see:
.br
.B lvmconfig --withcomments devices/global_filter
-.IP \[bu] 2
-If lvmetad is started or restarted after devices are visible, or
-if the global_filter has changed, then all devices must be rescanned
-for metadata with the command pvscan --cache.
-.IP \[bu] 2
-lvmetad does not cache older metadata formats, e.g. lvm1, and will
-be temporarily disabled if they are seen.
-.IP \[bu] 2
-To notify lvmetad about a device that is no longer present, the major and
-minor numbers must be given, not the path.
-.P
-\fBAutomatic activation\fP
-
-When event-driven system services detect a new LVM device, the first step
-is to automatically scan and cache the metadata from the device. This is
-done by pvscan --cache. A second step is to automatically activate LVs
-that are present on the new device. This auto-activation is done by the
-same pvscan --cache command when the option --activate ay is included.
Auto-activation of VGs or LVs can be enabled/disabled using:
.br
@@ -75,18 +54,9 @@ For more information, see:
.br
.B lvmconfig --withcomments activation/auto_activation_volume_list
-When this setting is undefined, all LVs are auto-activated (when lvm is
-fully integrated with the event-driven system services.)
-
-When a VG or LV is not auto-activated, traditional activation using
-vgchange or lvchange --activate is needed.
-.IP \[bu] 2
-pvscan auto-activation can be only done in combination with --cache.
-.IP \[bu] 2
-Auto-activation is designated by the "a" argument in --activate ay.
-This is meant to distinguish system generated commands from explicit user
-commands, although it can be used in any activation command. Whenever it
-is used, the auto_activation_volume_list is applied.
-.IP \[bu] 2
-Auto-activation is not yet supported for LVs that are part of partial or
-clustered volume groups.
+To disable auto-activation, explicitly set this list to an empty list,
+i.e. auto_activation_volume_list = [ ].
+
+When this setting is undefined (e.g. commented), then all LVs are
+auto-activated.
+
5 years, 4 months
master - pvscan: background option is not used
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=819b469880e9f6b18e7...
Commit: 819b469880e9f6b18e76d3f1cdbd3e69fe5dab3e
Parent: cbee4d3d8843e14368f5f68531ef8ab429287077
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 13 17:27:53 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 13 17:27:53 2018 -0600
pvscan: background option is not used
Move this into the list of ignored options so
it doesn't appear in the man page.
---
tools/command-lines.in | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/command-lines.in b/tools/command-lines.in
index a8e7272..018153a 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -1481,9 +1481,10 @@ ID: pvscan_display
DESC: Display PV information.
pvscan --cache_long
-OO: --ignorelockingfailure, --reportformat ReportFmt, --background,
+OO: --ignorelockingfailure, --reportformat ReportFmt,
--activate ay, --major Number, --minor Number
OP: PV|String ...
+IO: --background
ID: pvscan_cache
DESC: Autoactivate a VG when all PVs are online.
5 years, 4 months
master - man: remove lvmetad
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1c0b02e367a4686d233...
Commit: 1c0b02e367a4686d2331f140c999aa3b4f26cea7
Parent: 8aec65c0546ffaf5f40ab6fce7616e237cb17960
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 13 16:22:34 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 13 16:22:34 2018 -0600
man: remove lvmetad
---
man/Makefile.in | 9 +---
man/lvmetad.8_main | 129 ----------------------------------------------------
2 files changed, 2 insertions(+), 136 deletions(-)
diff --git a/man/Makefile.in b/man/Makefile.in
index 25e6fa6..e73f834 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -26,7 +26,6 @@ FSADMMAN = fsadm.8
BLKDEACTIVATEMAN = blkdeactivate.8
DMEVENTDMAN = dmeventd.8
DMFILEMAPDMAN = dmfilemapd.8
-LVMETADMAN = lvmetad.8
LVMPOLLDMAN = lvmpolld.8
LVMLOCKDMAN = lvmlockd.8 lvmlockctl.8
CMIRRORDMAN = cmirrord.8
@@ -60,7 +59,7 @@ ifeq ($(MAKECMDGOALS),install_all_man)
endif
ifeq ($(MAN_ALL),"yes")
- MAN8+=$(FSADMMAN) $(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(LVMDBUSDMAN)
+ MAN8+=$(FSADMMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(LVMDBUSDMAN)
MAN8DM+=$(BLKDEACTIVATEMAN) $(DMEVENTDMAN) $(DMFILEMAPDMAN)
MAN8CLUSTER+=$(CMIRRORDMAN)
else
@@ -72,10 +71,6 @@ else
MAN8+=$(LVMDBUSDMAN)
endif
- ifeq ("@BUILD_LVMETAD@", "yes")
- MAN8+=$(LVMETADMAN)
- endif
-
ifeq ("@BUILD_LVMPOLLD@", "yes")
MAN8+=$(LVMPOLLDMAN)
endif
@@ -114,7 +109,7 @@ include $(top_builddir)/make.tmpl
CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8:%.8=%.8_gen) $(MAN8CLUSTER) \
$(MAN8SYSTEMD_GENERATORS) $(MAN8DM) $(TESTMAN)
DISTCLEAN_TARGETS+=$(FSADMMAN) $(BLKDEACTIVATEMAN) $(DMEVENTDMAN) \
- $(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(CMIRRORDMAN) \
+ $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(CMIRRORDMAN) \
$(LVMCACHEMAN) $(LVMTHINMAN) $(LVMDBUSDMAN) $(LVMRAIDMAN) \
$(DMFILEMAPDMAN)
diff --git a/man/lvmetad.8_main b/man/lvmetad.8_main
deleted file mode 100644
index ec55171..0000000
--- a/man/lvmetad.8_main
+++ /dev/null
@@ -1,129 +0,0 @@
-.TH LVMETAD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
-.SH NAME
-lvmetad \(em LVM metadata cache daemon
-
-.SH SYNOPSIS
-.B lvmetad
-.RB [ -l
-.IR level [,level...]]
-.RB [ -p
-.IR pidfile_path ]
-.RB [ -s
-.IR socket_path ]
-.RB [ -t
-.IR timeout_value ]
-.RB [ -f ]
-.RB [ -h ]
-.RB [ -V ]
-.RB [ -? ]
-
-.SH DESCRIPTION
-
-The lvmetad daemon caches LVM metadata so that LVM commands can read
-metadata from the cache rather than scanning disks. This can be an
-advantage because scanning disks is time consuming and may interfere with
-the normal work of the system. lvmetad can be a disadvantage when disk
-event notifications from the system are unreliable.
-
-lvmetad does not read metadata from disks itself. Instead, it relies on
-an LVM command, like pvscan --cache, to read metadata from disks and
-send it to lvmetad to be cached.
-
-New LVM disks that appear on the system must be scanned before lvmetad
-knows about them. If lvmetad does not know about a disk, then LVM
-commands using lvmetad will also not know about it. When disks are added
-or removed from the system, lvmetad must be updated.
-
-lvmetad is usually combined with event-based system services that
-automatically run pvscan --cache on disks added or removed. This way,
-the cache is automatically updated with metadata from new disks when they
-appear. LVM udev rules and systemd services implement this automation.
-Automatic scanning is usually combined with automatic activation. For
-more information, see
-.BR pvscan (8).
-
-If lvmetad is started or restarted after disks have been added to the
-system, or if the global_filter has changed, the cache must be updated.
-This can be done by running pvscan --cache, or it will be done
-automatically by the next LVM command that's run.
-
-When lvmetad is not used, LVM commands revert to scanning disks for LVM
-metadata.
-
-In some cases, lvmetad will be temporarily disabled while it continues
-running. In this state, LVM commands will ignore the lvmetad cache and
-revert to scanning disks. A warning will also be printed which includes
-the reason why lvmetad is not being used. The most common reasons are the
-existence of duplicate PVs (lvmetad cannot cache data for duplicate PVs),
-or an 'lvconvert --repair' command has been run (the lvmetad cache may
-not be reliable while repairs are neeeded.)
-Once duplicates have been resolved, or repairs have been completed,
-the lvmetad cache is can be updated with pvscan --cache and commands
-will return to using the cache.
-
-Use of lvmetad is enabled/disabled by:
-.br
-.BR lvm.conf (5)
-.B global/use_lvmetad
-
-For more information on this setting, see:
-.br
-.B lvmconfig --withcomments global/use_lvmetad
-
-To ignore disks from LVM at the system level, e.g. lvmetad, pvscan use:
-.br
-.BR lvm.conf (5)
-.B devices/global_filter
-
-For more information on this setting, see
-.br
-.B lvmconfig --withcomments devices/global_filter
-
-.SH OPTIONS
-
-To run the daemon in a test environment both the pidfile_path and the
-socket_path should be changed from the defaults.
-.TP
-.B -f
-Don't fork, but run in the foreground.
-.TP
-.BR -h ", " -?
-Show help information.
-.TP
-.B -l \fIlevels
-Specify the levels of log messages to generate as a comma separated list.
-Messages are logged by syslog.
-Additionally, when -f is given they are also sent to standard error.
-Possible levels are: all, fatal, error, warn, info, wire, debug.
-.TP
-.B -p \fIpidfile_path
-Path to the pidfile. This overrides both the built-in default
-(#DEFAULT_PID_DIR#/lvmetad.pid) and the environment variable
-\fBLVM_LVMETAD_PIDFILE\fP. This file is used to prevent more
-than one instance of the daemon running simultaneously.
-.TP
-.B -s \fIsocket_path
-Path to the socket file. This overrides both the built-in default
-(#DEFAULT_RUN_DIR#/lvmetad.socket) and the environment variable
-\fBLVM_LVMETAD_SOCKET\fP. To communicate successfully with lvmetad,
-all LVM2 processes should use the same socket path.
-.TP
-.B -t \fItimeout_value
-The daemon may shutdown after being idle for the given time (in seconds). When the
-option is omitted or the value given is zero the daemon never shutdowns on idle.
-.TP
-.B -V
-Display the version of lvmetad daemon.
-.SH ENVIRONMENT VARIABLES
-.TP
-.B LVM_LVMETAD_PIDFILE
-Path for the pid file.
-.TP
-.B LVM_LVMETAD_SOCKET
-Path for the socket file.
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvmconfig (8),
-.BR lvm.conf (5),
-.BR pvscan (8)
5 years, 4 months
master - man lvmdump: remove clvm reference
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8aec65c0546ffaf5f40...
Commit: 8aec65c0546ffaf5f40ab6fce7616e237cb17960
Parent: c203ce7f8614226bc2f76f0eba3797e43add3de6
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 13 16:20:02 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 13 16:20:02 2018 -0600
man lvmdump: remove clvm reference
---
man/lvmdump.8_main | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/man/lvmdump.8_main b/man/lvmdump.8_main
index ec3dbb2..2e80ed2 100644
--- a/man/lvmdump.8_main
+++ b/man/lvmdump.8_main
@@ -38,8 +38,6 @@ The content of the tarball is as follows:
.br
- if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
.br
-- if enabled with -c, cluster status info
-.br
- if enabled with -l, lvmetad state if running
.br
- if enabled with -p, lvmpolld state if running
@@ -54,9 +52,6 @@ Advanced collection.
\fBWARNING\fR: if lvm is already hung, then this script may hang as well
if \fB-a\fR is used.
.TP
-.B -c
-If clvmd is running, gather cluster data as well.
-.TP
.B -d \fIdirectory
Dump into a directory instead of tarball
By default, lvmdump will produce a single compressed tarball containing
5 years, 4 months
master - man: remove cluster references
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=970f49dcab64bdef45b...
Commit: 970f49dcab64bdef45bce2122ead51dd17e3c48b
Parent: 517332e78ddf0ea1ed5735925b1047cf5cf4f8f8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 13 16:15:41 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 13 16:15:41 2018 -0600
man: remove cluster references
---
tools/args.h | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index cc65be5..3e737f8 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -498,12 +498,9 @@ arg(readonly_ARG, '\0', "readonly", 0, 0, 0,
"Run the command in a special read-only mode which will read on-disk\n"
"metadata without needing to take any locks. This can be used to peek\n"
"inside metadata used by a virtual machine image while the virtual\n"
- "machine is running.\n"
- "It can also be used to peek inside the metadata of clustered VGs\n"
- "when clustered locking is not configured or running. No attempt\n"
- "will be made to communicate with the device-mapper kernel driver, so\n"
- "this option is unable to report whether or not LVs are\n"
- "actually in use.\n")
+ "machine is running. No attempt will be made to communicate with the\n"
+ "device-mapper kernel driver, so this option is unable to report whether\n"
+ "or not LVs are actually in use.\n")
arg(refresh_ARG, '\0', "refresh", 0, 0, 0,
"If the LV is active, reload its metadata.\n"
@@ -592,7 +589,6 @@ arg(shared_ARG, '\0', "shared", 0, 0, 0,
"lvmlockd will select lock type sanlock or dlm depending on which lock\n"
"manager is running. This allows multiple hosts to share a VG on shared\n"
"devices. lvmlockd and a lock manager must be configured and running.\n"
- "(A shared VG using lvmlockd is different from a clustered VG using clvmd.)\n"
"See \\fBlvmlockd\\fP(8) for more information about shared VGs.\n"
"#vgs\n"
"#lvs\n"
@@ -894,7 +890,6 @@ arg(activate_ARG, 'a', "activate", activation_VAL, 0, 0,
"Autoactivation should be used during system boot to make it possible\n"
"to select which LVs should be automatically activated by the system.\n"
"See \\fBlvmlockd\\fP(8) for more information about activation options \\fBey\\fP and \\fBsy\\fP for shared VGs.\n"
- "See \\fBclvmd\\fP(8) for more information about activation options \\fBey\\fP, \\fBsy\\fP, \\fBly\\fP and \\fBln\\fP for clustered VGs.\n"
"#lvcreate\n"
"Controls the active state of the new LV.\n"
"\\fBy\\fP makes the LV active, or available.\n"
@@ -907,8 +902,7 @@ arg(activate_ARG, 'a', "activate", activation_VAL, 0, 0,
"If autoactivation \\fBay\\fP is used, the LV is only activated\n"
"if it matches an item in lvm.conf activation/auto_activation_volume_list.\n"
"\\fBay\\fP implies --zero n and --wipesignatures n.\n"
- "See \\fBlvmlockd\\fP(8) for more information about activation options for shared VGs.\n"
- "See \\fBclvmd\\fP(8) for more information about activation options for clustered VGs.\n")
+ "See \\fBlvmlockd\\fP(8) for more information about activation options for shared VGs.\n")
arg(all_ARG, 'a', "all", 0, 0, 0,
"#vgreduce\n"
5 years, 4 months
master - man: remove clvmd man page
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c203ce7f8614226bc2f...
Commit: c203ce7f8614226bc2f76f0eba3797e43add3de6
Parent: 970f49dcab64bdef45bce2122ead51dd17e3c48b
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 13 16:17:17 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 13 16:17:17 2018 -0600
man: remove clvmd man page
---
man/Makefile.in | 1 -
man/clvmd.8_main | 204 ------------------------------------------------------
2 files changed, 0 insertions(+), 205 deletions(-)
diff --git a/man/Makefile.in b/man/Makefile.in
index 6d5e2ac..25e6fa6 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -159,7 +159,6 @@ $(Q)$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \
-e "s+#DEFAULT_PROFILE_DIR#+$(DEFAULT_PROFILE_DIR)+" \
-e "s+#DEFAULT_CACHE_DIR#+$(DEFAULT_CACHE_DIR)+" \
-e "s+#DEFAULT_LOCK_DIR#+$(DEFAULT_LOCK_DIR)+" \
- -e "s+#CLVMD_PATH#+$(exec_prefix)/clvmd+" \
-e "s+#LVM_PATH#+$(exec_prefix)/lvm+" \
-e "s+#DEFAULT_RUN_DIR#+$(DEFAULT_RUN_DIR)+" \
-e "s+#DEFAULT_PID_DIR#+$(DEFAULT_PID_DIR)+" \
diff --git a/man/clvmd.8_main b/man/clvmd.8_main
deleted file mode 100644
index de6ce25..0000000
--- a/man/clvmd.8_main
+++ /dev/null
@@ -1,204 +0,0 @@
-.TH CLVMD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
-.
-.SH NAME
-.
-clvmd \(em cluster LVM daemon
-.
-.SH SYNOPSIS
-.
-.ad l
-.B clvmd
-.RB [ -C ]
-.RB [ -d
-.RI [ value ]]
-.RB [ -E
-.IR lock_uuid ]
-.RB [ -f ]
-.RB [ -h ]
-.RB [ -I
-.IR cluster_manager ]
-.RB [ -R ]
-.RB [ -S ]
-.RB [ -t
-.IR timeout ]
-.RB [ -T
-.IR start_timeout ]
-.RB [ -V ]
-.ad b
-.
-.SH DESCRIPTION
-.
-clvmd is the daemon that distributes LVM metadata updates around a cluster.
-It must be running on all nodes in the cluster and will give an error
-if a node in the cluster does not have this daemon running.
-
-Also see \fBlvmlockd\fP(8) for a newer method of using LVM on shared
-storage.
-.
-.SH OPTIONS
-.
-.HP
-.BR -C
-.br
-Only valid if \fB-d\fP is also specified.
-Tells all clvmds in a cluster to enable/disable debug logging.
-Without this switch, only the local clvmd will change its debug level to that
-given with \fB-d\fP.
-.br
-This does not work correctly if specified on the command-line that starts clvmd.
-If you want to start clvmd \fBand\fP
-enable cluster-wide logging then the command needs to be issued twice, eg:
-.br
-.BR clvmd
-.br
-.BR clvmd\ -d2
-.
-.HP
-.BR -d
-.RI [ value ]
-.br
-Set debug logging level.
-If \fB-d\fP is specified without a \fIvalue\fP
-then 1 is assumed. \fIValue\fP can be:
-.PD 0
-.IP
-.BR 0
-\(em Disabled
-.IP
-.BR 1
-\(em Sends debug logs to stderr (implies \fB-f\fP)
-.IP
-.BR 2
-\(em Sends debug logs to \fBsyslog\fP(3)
-.PD
-.
-.HP
-.BR -E
-.IR lock_uuid
-.br
-Pass lock uuid to be reacquired exclusively when clvmd is restarted.
-.
-.HP
-.BR -f
-.br
-Don't fork, run in the foreground.
-.
-.HP
-.BR -h
-.br
-Show help information.
-.
-.HP
-.BR -I
-.IR cluster_manager
-.br
-Selects the cluster manager 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-Iauto\fP.
-Clvmd will use the first cluster manager that succeeds,
-and it checks them in a predefined order
-.BR cman ,
-.BR corosync ,
-.BR openais .
-The available managers will be listed by order as part of the
-\fBclvmd -h\fP output.
-.
-.HP
-.BR -R
-.br
-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.
-.
-.HP
-.BR -S
-.br
-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.)
-.
-.HP
-.BR -t
-.IR timeout
-.br
-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 60 seconds.
-.
-.HP
-.BR -T
-.IR start_timeout
-.br
-Specifies the start timeout 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 \fB0\fP (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.
-
-This timeout will be ignored if you start \fBclvmd\fP with the \fB-d\fP.
-.
-.HP
-.BR -V
-.br
-Display the version of the cluster LVM daemon.
-.
-.SH NOTES
-.
-.SS Activation
-.
-In a clustered VG, clvmd is used for activation, and the following values are
-possible with \fBlvchange/vgchange -a\fP:
-.IP \fBy\fP|\fBsy\fP
-clvmd activates the LV in shared mode (with a shared lock),
-allowing multiple nodes to activate the LV concurrently.
-If the LV type prohibits shared access, such as an LV with a snapshot,
-an exclusive lock is automatically used instead.
-clvmd attempts to activate the LV concurrently on all nodes.
-.IP \fBey\fP
-clvmd activates the LV in exclusive mode (with an exclusive lock),
-allowing a single node to activate the LV.
-clvmd attempts to activate the LV concurrently on all nodes, but only
-one will succeed.
-.IP \fBly\fP
-clvmd attempts to activate the LV only on the local node.
-If the LV type allows concurrent access, then shared mode is used,
-otherwise exclusive.
-.IP \fBn\fP
-clvmd attempts to deactivate the LV on all nodes.
-.IP \fBln\fP
-clvmd attempts to deactivate the LV on the local node.
-.
-.SH ENVIRONMENT VARIABLES
-.TP
-.B LVM_CLVMD_BINARY
-The CLVMD binary to use when \fBclvmd\fP restart is requested.
-Defaults to \fI#CLVMD_PATH#\fP.
-.TP
-.B LVM_BINARY
-The LVM2 binary to use.
-Defaults to \fI#LVM_PATH#\fP.
-.SH FILES
-.I #CLVMD_PATH#
-.br
-.I #LVM_PATH#
-.SH SEE ALSO
-.BR syslog (3),
-.BR lvm.conf (5),
-.BR lvm (8),
-.BR lvmlockd (8),
-.BR lvmsystemid (7)
5 years, 4 months
master - tests: add wait loop
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=517332e78ddf0ea1ed5...
Commit: 517332e78ddf0ea1ed5735925b1047cf5cf4f8f8
Parent: 836dc9876b58ae275b87cedebd11991639cbd019
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Nov 12 15:28:45 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Nov 12 15:30:40 2018 +0100
tests: add wait loop
Add a little wait loop - since lvconvert started background process
and we need to wait till this bg task initiate its work -
adding ~1s loop should give reasonable enough time to start mirroring.
---
test/shell/mirror-names.sh | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/test/shell/mirror-names.sh b/test/shell/mirror-names.sh
index 54d42e1..6d46180 100644
--- a/test/shell/mirror-names.sh
+++ b/test/shell/mirror-names.sh
@@ -112,6 +112,12 @@ check_and_cleanup_lvs_
lvcreate -aey -l2 --type mirror -m1 -n $lv1 $vg
# Use large enough polling interval so mirror is keeping mimagetmp
LVM_TEST_TAG="kill_me_$PREFIX" lvconvert -m+1 -i+40 -b $vg/$lv1
+for i in $(seq 1 10) ; do
+ # check if background process already started
+ # this is recognized by presence of LV1_mimage_2
+ check lvl $vg/${lv1}_mimage_2 && break
+ sleep .1
+done
convlv=$(lv_convert_lv_ $vg/$lv1)
test "$convlv" = "${lv1}_mimagetmp_2"
lv_devices_ $vg/$lv1 $convlv ${lv1}_mimage_2
5 years, 4 months
master - devicemapper: retry mirror leg deactivation
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=836dc9876b58ae275b8...
Commit: 836dc9876b58ae275b87cedebd11991639cbd019
Parent: 38770db19b3c77e83e4e451f12ba3cd134c09f05
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Nov 12 15:22:44 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Nov 12 15:30:40 2018 +0100
devicemapper: retry mirror leg deactivation
This could be seen as continuation of
6cee8f1b063dcf5d809e14de38ba489ce5b8f562.
Some test maching with old udev system shows problem,
where udev 'jumps on' leg device after mirror target
releases its legs - since udev does not (in this old case) skips
such device from scanning - it opens device - and this prevent
leg device to be deactivated - effectively such device stays
'leaked' in DM table invisibly to lvm2 command.
So to 'combat' this issue - if the device has '_mimage' in its name,
the retry of deactivation is automatically assumed.
NOTE: wider impact is unexpected - as it's touching only old mirror
target which is nowadays replaced with 'raid'.
In case there will be some problem identified - probably both patches
should be reverted.
---
device_mapper/libdm-deptree.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/device_mapper/libdm-deptree.c b/device_mapper/libdm-deptree.c
index 06f10ae..c134489 100644
--- a/device_mapper/libdm-deptree.c
+++ b/device_mapper/libdm-deptree.c
@@ -1764,7 +1764,12 @@ static int _dm_tree_deactivate_children(struct dm_tree_node *dnode,
if (info.open_count) {
/* Skip internal non-toplevel opened nodes */
- if (level)
+ /* On some old udev systems without corrrect udev rules
+ * this hack avoids 'leaking' active _mimageX legs after
+ * deactivation of mirror LV. Other suffixes are not added
+ * since it's expected newer systems with wider range of
+ * supported targets also use better udev */
+ if (level && !strstr(name, "_mimage"))
continue;
/* When retry is not allowed, error */
5 years, 4 months