SHA256
1
0
forked from pool/lvm2

Accepting request 426139 from home:scarabeus_iv:branches:Base:System

- This is sync commit from Leap/SLE12 only
- Add patch pvcreate-enhance-the-error-message.patch bsc#960744
- Modify GPL-2.0 to GPL-2.0+ and LGPL-2.1 to LGPL-2.1+ to avoid
  license conflict with thin-provisioning-tools which is using GPL-3.0
- Also contains fix for bsc#969310
- Fix clvmd.ocf and cmirrord to remove "-d" option for cmirrod
  (bsc#971334)
- Fix clvmd.ocf to add lvmconf --enable-cluster before start daemon
  when locking_type is not 3 or use_lvmetad is 1 in setting
  (bsc#970439)
- Modified spec to enable blkid-wiping (fate#319908)
- Fix clvmd binary not found in case that users still use RA from
  ocf:lvm2:clvm (bsc#980200) 
  Add sbindir=$HA_SBIN_DIR for clvmd.ocf and cmirrord.ocf
- The bsc#979635 wnd bsc#991181 as fixed in past thanks to proper /usr
  migration code
- Modified raid10_segtype_default from "mirror" to "raid10"(bsc#982329)
- Remove lvm2-clvmd/cmirrord.service and related activation services
  from %service_add _pre/post/preun/postun because we start clvmd 
  /clmirrord and activate via pacemaker and RA. (bsc#980296)
- Lvchange improve refresh by trying to deactivate snapshot thinLV 
  in case it's preventing merge process change integrated upstream.
  (bsc#984321)
- Fixed in past bsc#992843
- Fixed by upstream bsc#984321
- Fixed by upstream bsc#970943
- 69-dm-lvm-metad.rules: Do not process rules for multipath
  devices (bsc#bsc#990538, bsc#986734)
  Add: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
- Rewrite patches to include patch header:

OBS-URL: https://build.opensuse.org/request/show/426139
OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=158
This commit is contained in:
Marcus Meissner 2016-09-14 09:43:37 +00:00 committed by Git OBS Bridge
parent cd69f1258b
commit 15510c0f84
16 changed files with 702 additions and 106 deletions

View File

@ -1,9 +1,24 @@
From de73c1ab474661307d87b3bcfe442fd9f3e31233 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 19 Aug 2016 16:16:13 +0200
Subject: [PATCH] 10-dm.rules: Reset state variables for spurious events
When spurious events are generated we need to ensure to always
present the same information than the original event; otherwise
systemd might be thinking the device to be non-functional and
will take unwanted action (like unmounting it).
References: bsc#932300 References: bsc#932300
Signed-off-by: Hannes Reinecke <hare@suse.com>
--- ---
Index: LVM2.2.02.152/udev/10-dm.rules.in udev/10-dm.rules.in | 5 +++++
1 file changed, 5 insertions(+)
Index: LVM2.2.02.165/udev/10-dm.rules.in
=================================================================== ===================================================================
--- LVM2.2.02.152.orig/udev/10-dm.rules.in --- LVM2.2.02.165.orig/udev/10-dm.rules.in
+++ LVM2.2.02.152/udev/10-dm.rules.in +++ LVM2.2.02.165/udev/10-dm.rules.in
@@ -138,6 +138,11 @@ ENV{DM_UDEV_RULES_VSN}="2" @@ -138,6 +138,11 @@ ENV{DM_UDEV_RULES_VSN}="2"
ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/$env{DM_NAME}" ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/$env{DM_NAME}"

View File

@ -0,0 +1,31 @@
From e8d52bf13bc4529172632c49c84a80e315741862 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 19 Aug 2016 16:19:55 +0200
Subject: 69-dm-lvm-metad.rules: Do not process rules for multipath devices
When the device is a multipath device lvm metad should not process
it; doing so will reset the 'SYSTEMD_READY' flag and the multipath
setup will not work correctly.
References: bsc#990538, bsc#986734
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
udev/69-dm-lvm-metad.rules.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in
index f0bfc1e..793a53d 100644
--- a/udev/69-dm-lvm-metad.rules.in
+++ b/udev/69-dm-lvm-metad.rules.in
@@ -17,6 +17,7 @@
SUBSYSTEM!="block", GOTO="lvm_end"
(LVM_EXEC_RULE)
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="lvm_end"
# If the PV label got lost, inform lvmetad immediately.
--
2.6.6

View File

@ -31,9 +31,12 @@
: ${OCF_RESKEY_daemon_timeout:="80"} : ${OCF_RESKEY_daemon_timeout:="80"}
: ${OCF_RESKEY_daemon_options:="-d0"} : ${OCF_RESKEY_daemon_options:="-d0"}
sbindir=$HA_SBIN_DIR
# Common variables # Common variables
DAEMON="/usr/sbin/clvmd" DAEMON="${sbindir}/clvmd"
CMIRRORD="/usr/sbin/cmirrord" CMIRRORD="${sbindir}/cmirrord"
LVMCONF="${sbindir}/lvmconf"
status_daemons() status_daemons()
{ {
@ -100,7 +103,7 @@ bringup_cmirrord()
return $OCF_ERR_INSTALLED return $OCF_ERR_INSTALLED
fi fi
start_daemon "$CMIRRORD" "$OCF_RESKEY_daemon_options"; rc=$? start_daemon "$CMIRRORD"; rc=$?
if [ $rc != 0 ]; then if [ $rc != 0 ]; then
ocf_log err "Could not start $CMIRRORD" ocf_log err "Could not start $CMIRRORD"
return $OCF_ERR_GENERIC return $OCF_ERR_GENERIC
@ -198,6 +201,11 @@ clvmd_start()
clvmd_validate clvmd_validate
ocf_log info "Starting $OCF_RESOURCE_INSTANCE" ocf_log info "Starting $OCF_RESOURCE_INSTANCE"
# autoset locking type to clusted when lvmconf tool is available
if [ -x "$LVMCONF" ]; then
$LVMCONF --enable-cluster > /dev/null 2>&1
fi
status_clvmd; rc=$? status_clvmd; rc=$?
if [ $rc == $OCF_NOT_RUNNING ]; then if [ $rc == $OCF_NOT_RUNNING ]; then
bringup_clvmd; rc=$? bringup_clvmd; rc=$?
@ -294,7 +302,7 @@ Number of seconds to allow the control daemon to come up and down
Options to clvmd. Refer to clvmd.8 for detailed descriptions. Options to clvmd. Refer to clvmd.8 for detailed descriptions.
</longdesc> </longdesc>
<shortdesc lang="en">Daemon Options</shortdesc> <shortdesc lang="en">Daemon Options</shortdesc>
<content type="string" default="-d2"/> <content type="string" default="-d0"/>
</parameter> </parameter>

View File

@ -29,10 +29,11 @@
# Parameter defaults # Parameter defaults
: ${OCF_RESKEY_CRM_meta_globally_unique:="false"} : ${OCF_RESKEY_CRM_meta_globally_unique:="false"}
: ${OCF_RESKEY_daemon_timeout:="80"} : ${OCF_RESKEY_daemon_timeout:="80"}
: ${OCF_RESKEY_daemon_options:="-d0"}
sbindir=$HA_SBIN_DIR
# Common variables # Common variables
DAEMON="/usr/sbin/cmirrord" DAEMON="${sbindir}/cmirrord"
status_daemon() status_daemon()
{ {
@ -50,7 +51,7 @@ bringup_daemon()
return $OCF_ERR_INSTALLED return $OCF_ERR_INSTALLED
fi fi
start_daemon "$DAEMON" "$OCF_RESKEY_daemon_options"; rc=$? start_daemon "$DAEMON"; rc=$?
if [ $rc != 0 ]; then if [ $rc != 0 ]; then
ocf_log err "Could not start $DAEMON" ocf_log err "Could not start $DAEMON"
return $OCF_ERR_GENERIC return $OCF_ERR_GENERIC

View File

@ -1,17 +1,22 @@
Make sure From 90d6f1d65de4c314af1aab1e0deddcb0d64bbd06 Mon Sep 17 00:00:00 2001
From: Neil Brown <neilb@suse.de>
Date: Fri, 19 Aug 2016 16:13:09 +0200
Subject: [PATCH] Always create /dev/device-mapper link
Make sure
/dev/device-mapper /dev/device-mapper
exists as a link to /dev/mapper/control exists as a link to /dev/mapper/control
Resolves: bnc#724578 Resolves: bnc#724578
Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: NeilBrown <neilb@suse.de>
--- ---
udev/10-dm.rules.in | 2 +- udev/10-dm.rules.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
Index: LVM2.2.02.152/udev/10-dm.rules.in Index: LVM2.2.02.165/udev/10-dm.rules.in
=================================================================== ===================================================================
--- LVM2.2.02.152.orig/udev/10-dm.rules.in --- LVM2.2.02.165.orig/udev/10-dm.rules.in
+++ LVM2.2.02.152/udev/10-dm.rules.in +++ LVM2.2.02.165/udev/10-dm.rules.in
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
# Also, keep in mind that recent rules may also require recent # Also, keep in mind that recent rules may also require recent
# subsystem-specific binaries. # subsystem-specific binaries.

View File

@ -1,3 +1,6 @@
From: Hannes Reinecke <hare@suse.com>
Subject: Use type-punning for device-mapper type
--- ---
lib/device/device.c | 2 +- lib/device/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Fri Sep 9 09:24:19 UTC 2016 - tchvatal@suse.com
- This is sync commit from Leap/SLE12 only
- Add patch pvcreate-enhance-the-error-message.patch bsc#960744
- Modify GPL-2.0 to GPL-2.0+ and LGPL-2.1 to LGPL-2.1+ to avoid
license conflict with thin-provisioning-tools which is using GPL-3.0
- Also contains fix for bsc#969310
- Fix clvmd.ocf and cmirrord to remove "-d" option for cmirrod
(bsc#971334)
- Fix clvmd.ocf to add lvmconf --enable-cluster before start daemon
when locking_type is not 3 or use_lvmetad is 1 in setting
(bsc#970439)
- Modified spec to enable blkid-wiping (fate#319908)
- Fix clvmd binary not found in case that users still use RA from
ocf:lvm2:clvm (bsc#980200)
Add sbindir=$HA_SBIN_DIR for clvmd.ocf and cmirrord.ocf
- The bsc#979635 wnd bsc#991181 as fixed in past thanks to proper /usr
migration code
- Modified raid10_segtype_default from "mirror" to "raid10"(bsc#982329)
- Remove lvm2-clvmd/cmirrord.service and related activation services
from %service_add _pre/post/preun/postun because we start clvmd
/clmirrord and activate via pacemaker and RA. (bsc#980296)
- Lvchange improve refresh by trying to deactivate snapshot thinLV
in case it's preventing merge process change integrated upstream.
(bsc#984321)
- Fixed in past bsc#992843
- Fixed by upstream bsc#984321
- Fixed by upstream bsc#970943
- 69-dm-lvm-metad.rules: Do not process rules for multipath
devices (bsc#bsc#990538, bsc#986734)
Add: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
- Rewrite patches to include patch header:
* 10-dm.rules-Reset-state-variable-for-spurious-events.patch
* device-mapper-link
* device-mapper-type_punning.diff
* udev_rules-update.diff
- Sync also lvm.conf
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com
@ -6,6 +45,8 @@ Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com
* Refresh fuzz on patch: * Refresh fuzz on patch:
+ make-mirror-legs-on-different-tag-pvs.patch + make-mirror-legs-on-different-tag-pvs.patch
+ cluster_support_mirrord_log.diff + cluster_support_mirrord_log.diff
- Update patch to use correct api:
+ make-mirror-legs-on-different-tag-pvs.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 8 13:43:41 UTC 2016 - tchvatal@suse.com Fri Jul 8 13:43:41 UTC 2016 - tchvatal@suse.com

View File

@ -18,7 +18,7 @@
### COMMON-DEF-BEGIN ### ### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.165 %define lvm2_version 2.02.165
%define device_mapper_version 1.02.133 %define device_mapper_version 1.02.134
### COMMON-DEF-END ### ### COMMON-DEF-END ###
%define libname libdevmapper1_03 %define libname libdevmapper1_03
%define libname_event libdevmapper-event1_03 %define libname_event libdevmapper-event1_03
@ -26,7 +26,7 @@ Name: device-mapper
Version: %{device_mapper_version} Version: %{device_mapper_version}
Release: 0 Release: 0
Summary: Device Mapper Tools Summary: Device Mapper Tools
License: GPL-2.0 and LGPL-2.1 License: GPL-2.0+ and LGPL-2.1+
Group: System/Base Group: System/Base
Url: http://www.sourceware.org/lvm2/ Url: http://www.sourceware.org/lvm2/
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
@ -72,6 +72,10 @@ Patch2005: fsadm-add-support-for-btrfs.patch
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
# bnc#960744
Patch2009: pvcreate-enhance-the-error-message.patch
# bnc#990538 bnc#986734
Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
@ -145,6 +149,8 @@ Files needed for software development using the device mapper
%patch2006 -p1 %patch2006 -p1
%patch2007 -p1 %patch2007 -p1
%patch2008 -p1 %patch2008 -p1
%patch2009 -p1
%patch2010 -p1
### COMMON-PREP-END ### ### COMMON-PREP-END ###
%build %build

436
lvm.conf
View File

@ -23,6 +23,9 @@ config {
# If enabled, any configuration mismatch aborts the LVM2 process. # If enabled, any configuration mismatch aborts the LVM2 process.
abort_on_errors = 0 abort_on_errors = 0
# Directory where LVM looks for configuration profiles.
profile_dir = "/etc/lvm/profile"
} }
# This section allows you to configure which block devices should # This section allows you to configure which block devices should
@ -50,11 +53,30 @@ devices {
# same block device and the tools need to display a name for device, # same block device and the tools need to display a name for device,
# all the pathnames are matched against each item in the following # all the pathnames are matched against each item in the following
# list of regular expressions in turn and the first match is used. # list of regular expressions in turn and the first match is used.
preferred_names = [ ]
# By default no preferred names are defined.
# preferred_names = [ ]
# Try to avoid using undescriptive /dev/dm-N names, if present. # Try to avoid using undescriptive /dev/dm-N names, if present.
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ] # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
# In case no prefererred name matches or if preferred_names are not
# defined at all, builtin rules are used to determine the preference.
#
# The first builtin rule checks path prefixes and it gives preference
# based on this ordering (where "dev" depends on devices/dev setting):
# /dev/mapper > /dev/disk > /dev/dm-* > /dev/block
#
# If the ordering above cannot be applied, the path with fewer slashes
# gets preference then.
#
# If the number of slashes is the same, a symlink gets preference.
#
# Finally, if all the rules mentioned above are not applicable,
# lexicographical order is used over paths and the smallest one
# of all gets preference.
# A filter that tells LVM2 to only use a restricted set of devices. # A filter that tells LVM2 to only use a restricted set of devices.
# The filter consists of an array of regular expressions. These # The filter consists of an array of regular expressions. These
# expressions can be delimited by a character of your choice, and # expressions can be delimited by a character of your choice, and
@ -72,7 +94,7 @@ devices {
# accepted. # accepted.
# By default we accept every block device except udev names, floppy and cdrom drives: # By default we accept every block device except udev names, floppy and cdrom drives:
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|","r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ] filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
# Exclude the cdrom drive # Exclude the cdrom drive
# filter = [ "r|/dev/cdrom|" ] # filter = [ "r|/dev/cdrom|" ]
@ -86,7 +108,7 @@ devices {
# Use anchors if you want to be really specific # Use anchors if you want to be really specific
# filter = [ "a|^/dev/hda8$|", "r/.*/" ] # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
# Since "filter" is often overriden from command line, it is not suitable # Since "filter" is often overridden from command line, it is not suitable
# for system-wide device filtering (udev rules, lvmetad). To hide devices # for system-wide device filtering (udev rules, lvmetad). To hide devices
# from LVM-specific udev processing and/or from lvmetad, you need to set # from LVM-specific udev processing and/or from lvmetad, you need to set
# global_filter. The syntax is the same as for normal "filter" # global_filter. The syntax is the same as for normal "filter"
@ -119,7 +141,7 @@ devices {
# If sysfs is mounted (2.6 kernels) restrict device scanning to # If sysfs is mounted (2.6 kernels) restrict device scanning to
# the block devices it believes are valid. # the block devices it believes are valid.
# 1 enables; 0 disables. # 1 enables; 0 disables.
sysfs_scan = 1 sysfs_scan = 1
# By default, LVM2 will ignore devices used as component paths # By default, LVM2 will ignore devices used as component paths
# of device-mapper multipath devices. # of device-mapper multipath devices.
@ -174,6 +196,35 @@ devices {
# in recovery situations. # in recovery situations.
ignore_suspended_devices = 0 ignore_suspended_devices = 0
# ignore_lvm_mirrors: Introduced in version 2.02.104
# This setting determines whether logical volumes of "mirror" segment
# type are scanned for LVM labels. This affects the ability of
# mirrors to be used as physical volumes. If 'ignore_lvm_mirrors'
# is set to '1', it becomes impossible to create volume groups on top
# of mirror logical volumes - i.e. to stack volume groups on mirrors.
#
# Allowing mirror logical volumes to be scanned (setting the value to '0')
# can potentially cause LVM processes and I/O to the mirror to become
# blocked. This is due to the way that the "mirror" segment type handles
# failures. In order for the hang to manifest itself, an LVM command must
# be run just after a failure and before the automatic LVM repair process
# takes place OR there must be failures in multiple mirrors in the same
# volume group at the same time with write failures occurring moments
# before a scan of the mirror's labels.
#
# Note that these scanning limitations do not apply to the LVM RAID
# types, like "raid1". The RAID segment types handle failures in a
# different way and are not subject to possible process or I/O blocking.
#
# It is encouraged that users set 'ignore_lvm_mirrors' to 1 if they
# are using the "mirror" segment type. Users that require volume group
# stacking on mirrored logical volumes should consider using the "raid1"
# segment type. The "raid1" segment type is not available for
# active/active clustered volume groups.
#
# Set to 1 to disallow stacking and thereby avoid a possible deadlock.
ignore_lvm_mirrors = 1
# During each LVM operation errors received from each device are counted. # During each LVM operation errors received from each device are counted.
# If the counter of a particular device exceeds the limit set here, no # If the counter of a particular device exceeds the limit set here, no
# further I/O is sent to that device for the remainder of the respective # further I/O is sent to that device for the remainder of the respective
@ -231,24 +282,78 @@ allocation {
# algorithm. # algorithm.
maximise_cling = 1 maximise_cling = 1
# Whether to use blkid library instead of native LVM2 code to detect
# any existing signatures while creating new Physical Volumes and
# Logical Volumes. LVM2 needs to be compiled with blkid wiping support
# for this setting to take effect.
#
# LVM2 native detection code is currently able to recognize these signatures:
# - MD device signature
# - swap signature
# - LUKS signature
# To see the list of signatures recognized by blkid, check the output
# of 'blkid -k' command. The blkid can recognize more signatures than
# LVM2 native detection code, but due to this higher number of signatures
# to be recognized, it can take more time to complete the signature scan.
use_blkid_wiping = 1
# Set to 1 to wipe any signatures found on newly-created Logical Volumes
# automatically in addition to zeroing of the first KB on the LV
# (controlled by the -Z/--zero y option).
# The command line option -W/--wipesignatures takes precedence over this
# setting.
# The default is to wipe signatures when zeroing.
#
wipe_signatures_when_zeroing_new_lvs = 1
# Set to 1 to guarantee that mirror logs will always be placed on # Set to 1 to guarantee that mirror logs will always be placed on
# different PVs from the mirror images. This was the default # different PVs from the mirror images. This was the default
# until version 2.02.85. # until version 2.02.85.
mirror_logs_require_separate_pvs = 0 mirror_logs_require_separate_pvs = 0
# Set to 1 to guarantee that cache_pool metadata will always be
# placed on different PVs from the cache_pool data.
cache_pool_metadata_require_separate_pvs = 0
# Specify the minimal chunk size (in kiB) for cache pool volumes.
# Using a chunk_size that is too large can result in wasteful use of
# the cache, where small reads and writes can cause large sections of
# an LV to be mapped into the cache. However, choosing a chunk_size
# that is too small can result in more overhead trying to manage the
# numerous chunks that become mapped into the cache. The former is
# more of a problem than the latter in most cases, so we default to
# a value that is on the smaller end of the spectrum. Supported values
# range from 32(kiB) to 1048576 in multiples of 32.
# cache_pool_chunk_size = 64
# Set to 1 to guarantee that thin pool metadata will always # Set to 1 to guarantee that thin pool metadata will always
# be placed on different PVs from the pool data. # be placed on different PVs from the pool data.
thin_pool_metadata_require_separate_pvs = 0 thin_pool_metadata_require_separate_pvs = 0
# Specify chunk size calculation policy for thin pool volumes.
# Possible options are:
# "generic" - if thin_pool_chunk_size is defined, use it.
# Otherwise, calculate the chunk size based on
# estimation and device hints exposed in sysfs:
# the minimum_io_size. The chunk size is always
# at least 64KiB.
#
# "performance" - if thin_pool_chunk_size is defined, use it.
# Otherwise, calculate the chunk size for
# performance based on device hints exposed in
# sysfs: the optimal_io_size. The chunk size is
# always at least 512KiB.
# thin_pool_chunk_size_policy = "generic"
# Specify the minimal chunk size (in KB) for thin pool volumes. # Specify the minimal chunk size (in KB) for thin pool volumes.
# Use of the larger chunk size may improve perfomance for plain # Use of the larger chunk size may improve performance for plain
# thin volumes, however using them for snapshot volumes is less efficient, # thin volumes, however using them for snapshot volumes is less efficient,
# as it consumes more space and takes extra time for copying. # as it consumes more space and takes extra time for copying.
# When unset, lvm tries to estimate chunk size starting from 64KB # When unset, lvm tries to estimate chunk size starting from 64KB
# Supported values are in range from 64 to 1048576. # Supported values are in range from 64 to 1048576.
# thin_pool_chunk_size = 64 # thin_pool_chunk_size = 64
# Specify discards behavior of the thin pool volume. # Specify discards behaviour of the thin pool volume.
# Select one of "ignore", "nopassdown", "passdown" # Select one of "ignore", "nopassdown", "passdown"
# thin_pool_discards = "passdown" # thin_pool_discards = "passdown"
@ -293,7 +398,7 @@ log {
# There are 6 syslog-like log levels currently in use - 2 to 7 inclusive. # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
# 7 is the most verbose (LOG_DEBUG). # 7 is the most verbose (LOG_DEBUG).
level = 0 level = 0
# Format of output messages # Format of output messages
# Whether or not (1 or 0) to indent messages according to their severity # Whether or not (1 or 0) to indent messages according to their severity
indent = 1 indent = 1
@ -321,14 +426,13 @@ log {
# memory, devices, activation, allocation, lvmetad, metadata, cache, # memory, devices, activation, allocation, lvmetad, metadata, cache,
# locking # locking
# Use "all" to see everything. # Use "all" to see everything.
debug_classes = [ "memory", "devices", "activation", "allocation", debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking" ]
"lvmetad", "metadata", "cache", "locking" ]
} }
# Configuration of metadata backups and archiving. In LVM2 when we # Configuration of metadata backups and archiving. In LVM2 when we
# talk about a 'backup' we mean making a copy of the metadata for the # talk about a 'backup' we mean making a copy of the metadata for the
# *current* system. The 'archive' contains old metadata configurations. # *current* system. The 'archive' contains old metadata configurations.
# Backups are stored in a human readeable text format. # Backups are stored in a human readable text format.
backup { backup {
# Should we maintain a backup of the current metadata configuration ? # Should we maintain a backup of the current metadata configuration ?
@ -366,7 +470,6 @@ shell {
# Miscellaneous global LVM2 settings # Miscellaneous global LVM2 settings
global { global {
# The file creation mask for any files and directories created. # The file creation mask for any files and directories created.
# Interpreted as octal if the first digit is zero. # Interpreted as octal if the first digit is zero.
umask = 077 umask = 077
@ -389,6 +492,11 @@ global {
# temporarily until you update them. # temporarily until you update them.
si_unit_consistency = 1 si_unit_consistency = 1
# Whether or not to display unit suffix for sizes. This setting has
# no effect if the units are in human-readable form (global/units="h")
# in which case the suffix is always displayed.
suffix = 1
# Whether or not to communicate with the kernel device-mapper. # Whether or not to communicate with the kernel device-mapper.
# Set to 0 if you want to use the tools to manipulate LVM metadata # Set to 0 if you want to use the tools to manipulate LVM metadata
# without activating any logical volumes. # without activating any logical volumes.
@ -421,6 +529,19 @@ global {
# Type 3 uses built-in clustered locking. # Type 3 uses built-in clustered locking.
# Type 4 uses read-only locking which forbids any operations that might # Type 4 uses read-only locking which forbids any operations that might
# change metadata. # change metadata.
# Type 5 offers dummy locking for tools that do not need any locks.
# You should not need to set this directly: the tools will select when
# to use it instead of the configured locking_type. Do not use lvmetad or
# the kernel device-mapper driver with this locking type.
# It is used by the --readonly option that offers read-only access to
# Volume Group metadata that cannot be locked safely because it belongs to
# an inaccessible domain and might be in use, for example a virtual machine
# image or a disk that is shared by a clustered machine.
#
# N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet
# supported in clustered environment. If use_lvmetad=1 and locking_type=3
# is set at the same time, LVM always issues a warning message about this
# and then it automatically disables lvmetad use.
locking_type = 1 locking_type = 1
# Set to 0 to fail when a lock request cannot be satisfied immediately. # Set to 0 to fail when a lock request cannot be satisfied immediately.
@ -516,11 +637,11 @@ global {
# "mirror" - LVM will layer the 'mirror' and 'stripe' segment types. It # "mirror" - LVM will layer the 'mirror' and 'stripe' segment types. It
# will do this by creating a mirror on top of striped sub-LVs; # will do this by creating a mirror on top of striped sub-LVs;
# effectively creating a RAID 0+1 array. This is suboptimal # effectively creating a RAID 0+1 array. This is suboptimal
# in terms of providing redunancy and performance. Changing to # in terms of providing redundancy and performance. Changing to
# this setting is not advised. # this setting is not advised.
# Specify the '--type <raid10|mirror>' option to override this default # Specify the '--type <raid10|mirror>' option to override this default
# setting. # setting.
raid10_segtype_default = "mirror" raid10_segtype_default = "raid10"
# The default format for displaying LV names in lvdisplay was changed # The default format for displaying LV names in lvdisplay was changed
# in version 2.02.89 to show the LV name and path separately. # in version 2.02.89 to show the LV name and path separately.
@ -532,15 +653,38 @@ global {
# Whether to use (trust) a running instance of lvmetad. If this is set to # 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 # 0, all commands fall back to the usual scanning mechanisms. When set to 1
# *and* when lvmetad is running (it is not auto-started), the volume group # *and* when lvmetad is running (automatically instantiated by making use of
# metadata and PV state flags are obtained from the lvmetad instance and no # systemd's socket-based service activation or run as an initscripts service
# scanning is done by the individual commands. In a setup with lvmetad, # or run manually), the volume group metadata and PV state flags are obtained
# lvmetad udev rules *must* be set up for LVM to work correctly. Without # from the lvmetad instance and no scanning is done by the individual
# proper udev rules, all changes in block device configuration will be # commands. In a setup with lvmetad, lvmetad udev rules *must* be set up for
# *ignored* until a manual 'pvscan --cache' is performed. # LVM to work correctly. Without proper udev rules, all changes in block
# device configuration will be *ignored* until a manual 'pvscan --cache'
# is performed. These rules are installed by default.
# #
# If lvmetad has been running while use_lvmetad was 0, it MUST be stopped # If lvmetad has been running while use_lvmetad was 0, it MUST be stopped
# before changing use_lvmetad to 1 and started again afterwards. # before changing use_lvmetad to 1 and started again afterwards.
#
# If using lvmetad, the volume activation is also switched to automatic
# event-based mode. In this mode, the volumes are activated based on
# incoming udev events that automatically inform lvmetad about new PVs
# that appear in the system. Once the VG is complete (all the PVs are
# present), it is auto-activated. The activation/auto_activation_volume_list
# setting controls which volumes are auto-activated (all by default).
#
# A note about device filtering while lvmetad is used:
# When lvmetad is updated (either automatically based on udev events
# or directly by pvscan --cache <device> call), the devices/filter
# is ignored and all devices are scanned by default. The lvmetad always
# keeps unfiltered information which is then provided to LVM commands
# and then each LVM command does the filtering based on devices/filter
# setting itself.
# To prevent scanning devices completely, even when using lvmetad,
# the devices/global_filter must be used.
# N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet
# supported in clustered environment. If use_lvmetad=1 and locking_type=3
# is set at the same time, LVM always issues a warning message about this
# and then it automatically disables lvmetad use.
# If use_lvmetad set to 1, please make sure lvm2-lvmetad.socket is started # If use_lvmetad set to 1, please make sure lvm2-lvmetad.socket is started
use_lvmetad = 0 use_lvmetad = 0
@ -553,11 +697,31 @@ global {
# The thin tools are available as part of the device-mapper-persistent-data # The thin tools are available as part of the device-mapper-persistent-data
# package from https://github.com/jthornber/thin-provisioning-tools. # package from https://github.com/jthornber/thin-provisioning-tools.
# #
thin_check_executable = "" # thin_check_executable = "/usr/sbin/thin_check"
# String with options passed with thin_check command. By default, # Array of string options passed with thin_check command. By default,
# option '-q' is for quiet output. # option "-q" is for quiet output.
thin_check_options = [ "-q" ] # With thin_check version 2.1 or newer you can add "--ignore-non-fatal-errors"
# to let it pass through ignorable errors and fix them later.
# With thin_check version 3.2 or newer you should add
# "--clear-needs-check-flag".
#
# thin_check_options = [ "-q", "--clear-needs-check-flag" ]
# Full path of the utility called to repair a thin metadata device
# is in a state that allows it to be used.
# Each time a thin pool needs repair this utility is executed.
# See thin_check_executable how to obtain binaries.
#
# thin_repair_executable = "/usr/sbin/thin_repair"
# Array of extra string options passed with thin_repair command.
# thin_repair_options = [ "" ]
# Full path of the utility called to dump thin metadata content.
# See thin_check_executable how to obtain binaries.
#
# thin_dump_executable = "/usr/sbin/thin_dump"
# If set, given features are not used by thin driver. # If set, given features are not used by thin driver.
# This can be helpful not just for testing, but i.e. allows to avoid # This can be helpful not just for testing, but i.e. allows to avoid
@ -566,8 +730,41 @@ global {
# block_size # block_size
# discards # discards
# discards_non_power_2 # discards_non_power_2
# external_origin
# metadata_resize
# external_origin_extend
# #
# thin_disabled_features = [ "discards", "block_size" ] # thin_disabled_features = [ "discards", "block_size" ]
# Full path of the utility called to check that a cache metadata device
# is in a state that allows it to be used.
# Each time a cached LV needs to be used or after it is deactivated
# this utility is executed. The activation will only proceed if the utility
# has an exit status of 0.
# Set to "" to skip this check. (Not recommended.)
# The cache tools are available as part of the device-mapper-persistent-data
# package from https://github.com/jthornber/thin-provisioning-tools.
#
# cache_check_executable = "autodetect"
# Array of string options passed with cache_check command. By default,
# option "-q" is for quiet output.
#
# cache_check_options = [ "-q" ]
# Full path of the utility called to repair a cache metadata device.
# Each time a cache metadata needs repair this utility is executed.
# See cache_check_executable how to obtain binaries.
#
# cache_repair_executable = "autodetect"
# Array of extra string options passed with cache_repair command.
# cache_repair_options = [ "" ]
# Full path of the utility called to dump cache metadata content.
# See cache_check_executable how to obtain binaries.
#
# cache_dump_executable = "autodetect"
} }
activation { activation {
@ -641,9 +838,36 @@ activation {
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# If auto_activation_volume_list is defined, each LV that is to be # If auto_activation_volume_list is defined, each LV that is to be
# activated with the autoactivation option (--activate ay/-a ay) # activated with the autoactivation option (--activate ay/-a ay) is
# is first checked against the list. If it does not match, the LV # first checked against the list. There are two scenarios in which
# is not activated. This list is checked as well as volume_list. # the autoactivation option is used:
#
# - automatic activation of volumes based on incoming PVs. If all the
# PVs making up a VG are present in the system, the autoactivation
# is triggered. This requires lvmetad (global/use_lvmetad=1) and udev
# to be running. In this case, "pvscan --cache -aay" is called
# automatically without any user intervention while processing
# udev events. Please, make sure you define auto_activation_volume_list
# properly so only the volumes you want and expect are autoactivated.
#
# - direct activation on command line with the autoactivation option.
# In this case, the user calls "vgchange --activate ay/-a ay" or
# "lvchange --activate ay/-a ay" directly.
#
# By default, the auto_activation_volume_list is not defined and all
# volumes will be activated either automatically or by using --activate ay/-a ay.
#
# N.B. The "activation/volume_list" is still honoured in all cases so even
# if the VG/LV passes the auto_activation_volume_list, it still needs to
# pass the volume_list for it to be activated in the end.
# If auto_activation_volume_list is defined but empty, no volumes will be
# activated automatically and --activate ay/-a ay will do nothing.
#
# auto_activation_volume_list = []
# If auto_activation_volume_list is defined and it's not empty, only matching
# volumes will be activated either automatically or by using --activate ay/-a ay.
# #
# "vgname" and "vgname/lvname" are matched exactly. # "vgname" and "vgname/lvname" are matched exactly.
# "@tag" matches any tag set in the LV or VG. # "@tag" matches any tag set in the LV or VG.
@ -662,8 +886,15 @@ activation {
# #
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] # read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# Each LV can have an 'activation skip' flag stored persistently against it.
# During activation, this flag is used to decide whether such an LV is skipped.
# The 'activation skip' flag can be set during LV creation and by default it
# is automatically set for thin snapshot LVs. The 'auto_set_activation_skip'
# enables or disables this automatic setting of the flag while LVs are created.
# auto_set_activation_skip = 1
# For RAID or 'mirror' segment types, 'raid_region_size' is the # For RAID or 'mirror' segment types, 'raid_region_size' is the
# size (in kiB) of each: # size (in KiB) of each:
# - synchronization operation when initializing # - synchronization operation when initializing
# - each copy operation when performing a 'pvmove' (using 'mirror' segtype) # - each copy operation when performing a 'pvmove' (using 'mirror' segtype)
# This setting has replaced 'mirror_region_size' since version 2.02.99 # This setting has replaced 'mirror_region_size' since version 2.02.99
@ -733,7 +964,6 @@ activation {
# since it would break the redundant nature of the mirror. This # since it would break the redundant nature of the mirror. This
# policy acts like "remove" if no suitable device and space can # policy acts like "remove" if no suitable device and space can
# be allocated for the replacement. # be allocated for the replacement.
mirror_log_fault_policy = "allocate" mirror_log_fault_policy = "allocate"
mirror_image_fault_policy = "remove" mirror_image_fault_policy = "remove"
@ -801,8 +1031,140 @@ activation {
# are no progress reports, but the process is awoken immediately the # are no progress reports, but the process is awoken immediately the
# operation is complete. # operation is complete.
polling_interval = 15 polling_interval = 15
# 'activation_mode' determines how Logical Volumes are activated if
# any devices are missing. Possible settings are:
#
# "complete" - Only allow activation of an LV if all of the Physical
# Volumes it uses are present. Other PVs in the Volume
# Group may be missing.
#
# "degraded" - Like "complete", but additionally RAID Logical Volumes of
# segment type raid1, raid4, raid5, radid6 and raid10 will
# be activated if there is no data loss, i.e. they have
# sufficient redundancy to present the entire addressable
# range of the Logical Volume.
#
# "partial" - Allows the activation of any Logical Volume even if
# a missing or failed PV could cause data loss with a
# portion of the Logical Volume inaccessible.
# This setting should not normally be used, but may
# sometimes assist with data recovery.
#
# This setting was introduced in LVM version 2.02.108. It corresponds
# with the '--activationmode' option for lvchange and vgchange.
activation_mode = "degraded"
} }
# Report settings.
#
# report {
# Align columns on report output.
# aligned=1
# When buffered reporting is used, the report's content is appended
# incrementally to include each object being reported until the report
# is flushed to output which normally happens at the end of command
# execution. Otherwise, if buffering is not used, each object is
# reported as soon as its processing is finished.
# buffered=1
# Show headings for columns on report.
# headings=1
# A separator to use on report after each field.
# separator=" "
# A separator to use for list items when reported.
# list_item_separator=","
# Use a field name prefix for each field reported.
# prefixes=0
# Quote field values when using field name prefixes.
# quoted=1
# Output each column as a row. If set, this also implies report/prefixes=1.
# colums_as_rows=0
# Use binary values "0" or "1" instead of descriptive literal values for
# columns that have exactly two valid values to report (not counting the
# "unknown" value which denotes that the value could not be determined).
#
# binary_values_as_numeric = 0
# Comma separated list of columns to sort by when reporting 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# devtypes_sort="devtype_name"
# Comma separated list of columns to report for 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# devtypes_cols="devtype_name,devtype_max_partitions,devtype_description"
# Comma separated list of columns to report for 'lvm devtypes' command in verbose mode.
# See 'lvm devtypes -o help' for the list of possible fields.
# devtypes_cols_verbose="devtype_name,devtype_max_partitions,devtype_description"
# Comma separated list of columns to sort by when reporting 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# lvs_sort="vg_name,lv_name"
# Comma separated list of columns to report for 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# lvs_cols="lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
# Comma separated list of columns to report for 'lvs' command in verbose mode.
# See 'lvs -o help' for the list of possible fields.
# lvs_cols_verbose="lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert
# Comma separated list of columns to sort by when reporting 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# vgs_sort="vg_name"
# Comma separated list of columns to report for 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# vgs_cols="vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
# Comma separated list of columns to report for 'vgs' command in verbose mode.
# See 'vgs -o help' for the list of possible fields.
# vgs_cols_verbose="vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
# Comma separated list of columns to sort by when reporting 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# pvs_sort="pv_name"
# Comma separated list of columns to report for 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# pvs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
# Comma separated list of columns to report for 'pvs' command in verbose mode.
# See 'pvs -o help' for the list of possible fields.
# pvs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
# Comma separated list of columns to sort by when reporting 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# segs_sort="vg_name,lv_name,seg_start"
# Comma separated list of columns to report for 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# segs_cols="lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
# Comma separated list of columns to report for 'lvs --segments' command in verbose mode.
# See 'lvs --segments -o help' for the list of possible fields.
# segs_cols_verbose="lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
# Comma separated list of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# pvsegs_sort="pv_name,pvseg_start"
# Comma separated list of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
# Comma separated list of columns to sort by when reporting 'pvs --segments' command in verbose mode.
# See 'pvs --segments -o help' for the list of possible fields.
# pvsegs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
#}
#################### ####################
# Advanced section # # Advanced section #
@ -812,11 +1174,23 @@ activation {
# #
# metadata { # metadata {
# Default number of copies of metadata to hold on each PV. 0, 1 or 2. # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
# It's best to leave this at 2. # You might want to override it from the command line with 0
# You might want to override it from the command line with 0 or 1
# when running pvcreate on new PVs which are to be added to large VGs. # when running pvcreate on new PVs which are to be added to large VGs.
# pvmetadatacopies = 2 # pvmetadatacopies = 1
# Default number of copies of metadata to maintain for each VG.
# If set to a non-zero value, LVM automatically chooses which of
# the available metadata areas to use to achieve the requested
# number of copies of the VG metadata. If you set a value larger
# than the the total number of metadata areas available then
# metadata is stored in them all.
# The default value of 0 ("unmanaged") disables this automatic
# management and allows you to control which metadata areas
# are used at the individual PV level using 'pvchange
# --metadataignore y/n'.
# vgmetadatacopies = 0
# Approximate default size of on-disk metadata areas in sectors. # Approximate default size of on-disk metadata areas in sectors.
# You should increase this if you have large volume groups or # You should increase this if you have large volume groups or

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Fri Sep 9 09:24:19 UTC 2016 - tchvatal@suse.com
- This is sync commit from Leap/SLE12 only
- Add patch pvcreate-enhance-the-error-message.patch bsc#960744
- Modify GPL-2.0 to GPL-2.0+ and LGPL-2.1 to LGPL-2.1+ to avoid
license conflict with thin-provisioning-tools which is using GPL-3.0
- Also contains fix for bsc#969310
- Fix clvmd.ocf and cmirrord to remove "-d" option for cmirrod
(bsc#971334)
- Fix clvmd.ocf to add lvmconf --enable-cluster before start daemon
when locking_type is not 3 or use_lvmetad is 1 in setting
(bsc#970439)
- Modified spec to enable blkid-wiping (fate#319908)
- Fix clvmd binary not found in case that users still use RA from
ocf:lvm2:clvm (bsc#980200)
Add sbindir=$HA_SBIN_DIR for clvmd.ocf and cmirrord.ocf
- The bsc#979635 wnd bsc#991181 as fixed in past thanks to proper /usr
migration code
- Modified raid10_segtype_default from "mirror" to "raid10"(bsc#982329)
- Remove lvm2-clvmd/cmirrord.service and related activation services
from %service_add _pre/post/preun/postun because we start clvmd
/clmirrord and activate via pacemaker and RA. (bsc#980296)
- Lvchange improve refresh by trying to deactivate snapshot thinLV
in case it's preventing merge process change integrated upstream.
(bsc#984321)
- Fixed in past bsc#992843
- Fixed by upstream bsc#984321
- Fixed by upstream bsc#970943
- 69-dm-lvm-metad.rules: Do not process rules for multipath
devices (bsc#bsc#990538, bsc#986734)
Add: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
- Rewrite patches to include patch header:
* 10-dm.rules-Reset-state-variable-for-spurious-events.patch
* device-mapper-link
* device-mapper-type_punning.diff
* udev_rules-update.diff
- Sync also lvm.conf
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com
@ -6,6 +45,8 @@ Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com
* Refresh fuzz on patch: * Refresh fuzz on patch:
+ make-mirror-legs-on-different-tag-pvs.patch + make-mirror-legs-on-different-tag-pvs.patch
+ cluster_support_mirrord_log.diff + cluster_support_mirrord_log.diff
- Update patch to use correct api:
+ make-mirror-legs-on-different-tag-pvs.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 8 13:43:41 UTC 2016 - tchvatal@suse.com Fri Jul 8 13:43:41 UTC 2016 - tchvatal@suse.com

View File

@ -18,13 +18,13 @@
### COMMON-DEF-BEGIN ### ### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.165 %define lvm2_version 2.02.165
%define device_mapper_version 1.02.133 %define device_mapper_version 1.02.134
### COMMON-DEF-END ### ### COMMON-DEF-END ###
Name: lvm2-clvm Name: lvm2-clvm
Version: %{lvm2_version} Version: %{lvm2_version}
Release: 0 Release: 0
Summary: Clustered LVM2 Summary: Clustered LVM2
License: GPL-2.0 and LGPL-2.1 License: GPL-2.0+ and LGPL-2.1+
Group: Productivity/Clustering/HA Group: Productivity/Clustering/HA
Url: http://sources.redhat.com/cluster/clvm/ Url: http://sources.redhat.com/cluster/clvm/
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
@ -71,6 +71,10 @@ Patch2005: fsadm-add-support-for-btrfs.patch
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
# bnc#960744
Patch2009: pvcreate-enhance-the-error-message.patch
# bnc#990538 bnc#986734
Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: libcorosync-devel BuildRequires: libcorosync-devel
BuildRequires: libdlm-devel BuildRequires: libdlm-devel
@ -129,6 +133,8 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
%patch2006 -p1 %patch2006 -p1
%patch2007 -p1 %patch2007 -p1
%patch2008 -p1 %patch2008 -p1
%patch2009 -p1
%patch2010 -p1
### COMMON-PREP-END ### ### COMMON-PREP-END ###
%build %build
@ -187,30 +193,6 @@ rm %{buildroot}%{_unitdir}/dm-event.socket
rm %{buildroot}%{_unitdir}/lvm2-monitor.service rm %{buildroot}%{_unitdir}/lvm2-monitor.service
rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8 rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8
%pre
%service_add_pre lvm2-cluster-activation.service lvm2-clvmd.service
%post
%service_add_post lvm2-cluster-activation.service lvm2-clvmd.service
%preun
%service_del_preun lvm2-cluster-activation.service lvm2-clvmd.service
%postun
%service_del_postun lvm2-cluster-activation.service lvm2-clvmd.service
%pre -n lvm2-cmirrord
%service_add_pre lvm2-cmirrord.service lvm2-cluster-activation.service
%post -n lvm2-cmirrord
%service_add_post lvm2-cmirrord.service lvm2-cluster-activation.service
%preun -n lvm2-cmirrord
%service_del_preun lvm2-cmirrord.service lvm2-cluster-activation.service
%postun -n lvm2-cmirrord
%service_del_postun lvm2-cmirrord.service lvm2-cluster-activation.service
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_sbindir}/clvmd %{_sbindir}/clvmd

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Fri Sep 9 09:24:19 UTC 2016 - tchvatal@suse.com
- This is sync commit from Leap/SLE12 only
- Add patch pvcreate-enhance-the-error-message.patch bsc#960744
- Modify GPL-2.0 to GPL-2.0+ and LGPL-2.1 to LGPL-2.1+ to avoid
license conflict with thin-provisioning-tools which is using GPL-3.0
- Also contains fix for bsc#969310
- Fix clvmd.ocf and cmirrord to remove "-d" option for cmirrod
(bsc#971334)
- Fix clvmd.ocf to add lvmconf --enable-cluster before start daemon
when locking_type is not 3 or use_lvmetad is 1 in setting
(bsc#970439)
- Modified spec to enable blkid-wiping (fate#319908)
- Fix clvmd binary not found in case that users still use RA from
ocf:lvm2:clvm (bsc#980200)
Add sbindir=$HA_SBIN_DIR for clvmd.ocf and cmirrord.ocf
- The bsc#979635 wnd bsc#991181 as fixed in past thanks to proper /usr
migration code
- Modified raid10_segtype_default from "mirror" to "raid10"(bsc#982329)
- Remove lvm2-clvmd/cmirrord.service and related activation services
from %service_add _pre/post/preun/postun because we start clvmd
/clmirrord and activate via pacemaker and RA. (bsc#980296)
- Lvchange improve refresh by trying to deactivate snapshot thinLV
in case it's preventing merge process change integrated upstream.
(bsc#984321)
- Fixed in past bsc#992843
- Fixed by upstream bsc#984321
- Fixed by upstream bsc#970943
- 69-dm-lvm-metad.rules: Do not process rules for multipath
devices (bsc#bsc#990538, bsc#986734)
Add: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
- Rewrite patches to include patch header:
* 10-dm.rules-Reset-state-variable-for-spurious-events.patch
* device-mapper-link
* device-mapper-type_punning.diff
* udev_rules-update.diff
- Sync also lvm.conf
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com
@ -6,6 +45,8 @@ Fri Sep 2 08:23:06 UTC 2016 - tchvatal@suse.com
* Refresh fuzz on patch: * Refresh fuzz on patch:
+ make-mirror-legs-on-different-tag-pvs.patch + make-mirror-legs-on-different-tag-pvs.patch
+ cluster_support_mirrord_log.diff + cluster_support_mirrord_log.diff
- Update patch to use correct api:
+ make-mirror-legs-on-different-tag-pvs.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 8 13:43:41 UTC 2016 - tchvatal@suse.com Fri Jul 8 13:43:41 UTC 2016 - tchvatal@suse.com

View File

@ -18,7 +18,7 @@
### COMMON-DEF-BEGIN ### ### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.165 %define lvm2_version 2.02.165
%define device_mapper_version 1.02.133 %define device_mapper_version 1.02.134
### COMMON-DEF-END ### ### COMMON-DEF-END ###
%define _udevdir %(pkg-config --variable=udevdir udev) %define _udevdir %(pkg-config --variable=udevdir udev)
%define applib liblvm2app2_2 %define applib liblvm2app2_2
@ -27,7 +27,7 @@ Name: lvm2
Version: %{lvm2_version} Version: %{lvm2_version}
Release: 0 Release: 0
Summary: Logical Volume Manager Tools Summary: Logical Volume Manager Tools
License: GPL-2.0 and LGPL-2.1 License: GPL-2.0+ and LGPL-2.1+
Group: System/Base Group: System/Base
Url: http://www.sourceware.org/lvm2/ Url: http://www.sourceware.org/lvm2/
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
@ -73,6 +73,10 @@ Patch2005: fsadm-add-support-for-btrfs.patch
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
# bnc#960744
Patch2009: pvcreate-enhance-the-error-message.patch
# bnc#990538 bnc#986734
Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libaio-devel BuildRequires: libaio-devel
@ -153,6 +157,8 @@ This package provides development files for the LVM2 Logical Volume Manager.
%patch2006 -p1 %patch2006 -p1
%patch2007 -p1 %patch2007 -p1
%patch2008 -p1 %patch2008 -p1
%patch2009 -p1
%patch2010 -p1
### COMMON-PREP-END ### ### COMMON-PREP-END ###
%build %build

View File

@ -25,10 +25,10 @@ Signed-off-by: Guangliang Zhao <gzhao@suse.com>
man/lvcreate.8.in | 4 ++++ man/lvcreate.8.in | 4 ++++
5 files changed, 60 insertions(+) 5 files changed, 60 insertions(+)
Index: LVM2.2.02.164/conf/example.conf.in Index: LVM2.2.02.165/conf/example.conf.in
=================================================================== ===================================================================
--- LVM2.2.02.164.orig/conf/example.conf.in --- LVM2.2.02.165.orig/conf/example.conf.in
+++ LVM2.2.02.164/conf/example.conf.in +++ LVM2.2.02.165/conf/example.conf.in
@@ -372,6 +372,23 @@ allocation { @@ -372,6 +372,23 @@ allocation {
# or erased unless the --wipesignatures option is used directly. # or erased unless the --wipesignatures option is used directly.
wipe_signatures_when_zeroing_new_lvs = 1 wipe_signatures_when_zeroing_new_lvs = 1
@ -53,10 +53,10 @@ Index: LVM2.2.02.164/conf/example.conf.in
# Configuration option allocation/mirror_logs_require_separate_pvs. # Configuration option allocation/mirror_logs_require_separate_pvs.
# Mirror logs and images will always use different PVs. # Mirror logs and images will always use different PVs.
# The default setting changed in version 2.02.85. # The default setting changed in version 2.02.85.
Index: LVM2.2.02.164/lib/config/config_settings.h Index: LVM2.2.02.165/lib/config/config_settings.h
=================================================================== ===================================================================
--- LVM2.2.02.164.orig/lib/config/config_settings.h --- LVM2.2.02.165.orig/lib/config/config_settings.h
+++ LVM2.2.02.164/lib/config/config_settings.h +++ LVM2.2.02.165/lib/config/config_settings.h
@@ -473,6 +473,9 @@ cfg(allocation_raid_stripe_all_devices_C @@ -473,6 +473,9 @@ cfg(allocation_raid_stripe_all_devices_C
"when the command does not specify the number of stripes to use.\n" "when the command does not specify the number of stripes to use.\n"
"This was the default behaviour until release 2.02.162.\n") "This was the default behaviour until release 2.02.162.\n")
@ -67,11 +67,11 @@ Index: LVM2.2.02.164/lib/config/config_settings.h
cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL, 0, NULL, cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL, 0, NULL,
"Cache pool metadata and data will always use different PVs.\n") "Cache pool metadata and data will always use different PVs.\n")
Index: LVM2.2.02.164/lib/config/defaults.h Index: LVM2.2.02.165/lib/config/defaults.h
=================================================================== ===================================================================
--- LVM2.2.02.164.orig/lib/config/defaults.h --- LVM2.2.02.165.orig/lib/config/defaults.h
+++ LVM2.2.02.164/lib/config/defaults.h +++ LVM2.2.02.165/lib/config/defaults.h
@@ -157,6 +157,7 @@ @@ -158,6 +158,7 @@
#define DEFAULT_MAX_LV 0 #define DEFAULT_MAX_LV 0
#define DEFAULT_ALLOC_POLICY ALLOC_NORMAL #define DEFAULT_ALLOC_POLICY ALLOC_NORMAL
#define DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS 0 #define DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS 0
@ -79,10 +79,10 @@ Index: LVM2.2.02.164/lib/config/defaults.h
#define DEFAULT_MAXIMISE_CLING 1 #define DEFAULT_MAXIMISE_CLING 1
#define DEFAULT_CLUSTERED 0 #define DEFAULT_CLUSTERED 0
Index: LVM2.2.02.164/lib/metadata/lv_manip.c Index: LVM2.2.02.165/lib/metadata/lv_manip.c
=================================================================== ===================================================================
--- LVM2.2.02.164.orig/lib/metadata/lv_manip.c --- LVM2.2.02.165.orig/lib/metadata/lv_manip.c
+++ LVM2.2.02.164/lib/metadata/lv_manip.c +++ LVM2.2.02.165/lib/metadata/lv_manip.c
@@ -1519,6 +1519,9 @@ struct alloc_handle { @@ -1519,6 +1519,9 @@ struct alloc_handle {
unsigned maximise_cling; unsigned maximise_cling;
@ -93,7 +93,7 @@ Index: LVM2.2.02.164/lib/metadata/lv_manip.c
/* /*
* RAID devices require a metadata area that accompanies each * RAID devices require a metadata area that accompanies each
@@ -2600,6 +2603,32 @@ static int _limit_to_one_area_per_tag(st @@ -2633,6 +2636,32 @@ static int _limit_to_one_area_per_tag(st
} }
/* /*
@ -117,7 +117,7 @@ Index: LVM2.2.02.164/lib/metadata/lv_manip.c
+ for (i = ix_start; i < ix_end; i++) + for (i = ix_start; i < ix_end; i++)
+ if(_pvs_have_matching_tag(ah->cling_tag_list_cn, + if(_pvs_have_matching_tag(ah->cling_tag_list_cn,
+ alloc_state->areas[i].pva->map->pv, + alloc_state->areas[i].pva->map->pv,
+ pva->map->pv)) + pva->map->pv, 0))
+ return i; + return i;
+ return -1; + return -1;
+} +}
@ -126,7 +126,7 @@ Index: LVM2.2.02.164/lib/metadata/lv_manip.c
* Returns 1 regardless of whether any space was found, except on error. * Returns 1 regardless of whether any space was found, except on error.
*/ */
static int _find_some_parallel_space(struct alloc_handle *ah, static int _find_some_parallel_space(struct alloc_handle *ah,
@@ -2729,6 +2758,10 @@ static int _find_some_parallel_space(str @@ -2762,6 +2791,10 @@ static int _find_some_parallel_space(str
continue; continue;
case USE_AREA: case USE_AREA:
@ -137,7 +137,7 @@ Index: LVM2.2.02.164/lib/metadata/lv_manip.c
/* /*
* Except with ALLOC_ANYWHERE, replace first area with this * Except with ALLOC_ANYWHERE, replace first area with this
* one which is smaller but still big enough. * one which is smaller but still big enough.
@@ -3210,6 +3243,7 @@ static struct alloc_handle *_alloc_init( @@ -3243,6 +3276,7 @@ static struct alloc_handle *_alloc_init(
ah->parity_count = parity_count; ah->parity_count = parity_count;
ah->region_size = region_size; ah->region_size = region_size;
ah->alloc = alloc; ah->alloc = alloc;
@ -145,7 +145,7 @@ Index: LVM2.2.02.164/lib/metadata/lv_manip.c
/* /*
* For the purposes of allocation, area_count and parity_count are * For the purposes of allocation, area_count and parity_count are
@@ -3221,6 +3255,7 @@ static struct alloc_handle *_alloc_init( @@ -3254,6 +3288,7 @@ static struct alloc_handle *_alloc_init(
ah->area_multiple = _calc_area_multiple(segtype, area_count + parity_count, stripes); ah->area_multiple = _calc_area_multiple(segtype, area_count + parity_count, stripes);
//FIXME: s/mirror_logs_separate/metadata_separate/ so it can be used by others? //FIXME: s/mirror_logs_separate/metadata_separate/ so it can be used by others?
ah->mirror_logs_separate = find_config_tree_bool(cmd, allocation_mirror_logs_require_separate_pvs_CFG, NULL); ah->mirror_logs_separate = find_config_tree_bool(cmd, allocation_mirror_logs_require_separate_pvs_CFG, NULL);
@ -153,10 +153,10 @@ Index: LVM2.2.02.164/lib/metadata/lv_manip.c
if (mirrors || stripes) if (mirrors || stripes)
total_extents = new_extents; total_extents = new_extents;
Index: LVM2.2.02.164/man/lvcreate.8.in Index: LVM2.2.02.165/man/lvcreate.8.in
=================================================================== ===================================================================
--- LVM2.2.02.164.orig/man/lvcreate.8.in --- LVM2.2.02.165.orig/man/lvcreate.8.in
+++ LVM2.2.02.164/man/lvcreate.8.in +++ LVM2.2.02.165/man/lvcreate.8.in
@@ -418,6 +418,10 @@ Using \fBcore\fP means the mirror is reg @@ -418,6 +418,10 @@ Using \fBcore\fP means the mirror is reg
from the first device each time the logical volume is activated, from the first device each time the logical volume is activated,
like after every reboot. like after every reboot.

View File

@ -0,0 +1,28 @@
From b8b35c35a17b95e83817f262d70cb7a7d45cb192 Mon Sep 17 00:00:00 2001
From: Liuhua Wang <lwang@suse.com>
Date: Mon, 29 Feb 2016 20:08:00 +0800
Subject: [PATCH] pvcreate enhance the error message
Signed-off-by: Liuhua Wang(lwang@suse.com)
References: bsc#960744
---
lib/metadata/metadata.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 19741ba..9f098ca 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -1483,7 +1483,8 @@ static int _pvcreate_check(struct cmd_context *cmd, const char *name,
filter_refresh_needed = scan_needed = 1;
if (!dev) {
- log_error("Device %s not found (or ignored by filtering).", name);
+ log_error("Device %s not found (or ignored by filtering). "
+ "Please run with -vvv option for more details", name);
goto out;
}
--
1.8.4.5

View File

@ -1,8 +1,19 @@
Index: LVM2.2.02.110/udev/10-dm.rules.in From a2fb79f7316871fb834b1181633292b3ac8dc46c Mon Sep 17 00:00:00 2001
=================================================================== From: Hannes Reinecke <hare@suse.de>
--- LVM2.2.02.110.orig/udev/10-dm.rules.in Date: Fri, 19 Aug 2016 16:13:48 +0200
+++ LVM2.2.02.110/udev/10-dm.rules.in Subject: [PATCH] update lvm udev rules
@@ -101,6 +101,10 @@ TEST=="dm", ENV{DM_NAME}="$attr{dm/name}
References: bnc#78902 bnc#789019 bnc#789020
---
udev/10-dm.rules.in | 4 ++++
udev/13-dm-disk.rules.in | 9 ++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index 46a6869..7da0cc4 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -101,6 +101,10 @@ TEST=="dm", ENV{DM_NAME}="$attr{dm/name}", ENV{DM_UUID}="$attr{dm/uuid}", ENV{DM
TEST!="dm", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o name,uuid,suspended" TEST!="dm", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o name,uuid,suspended"
ENV{DM_SUSPENDED}!="?*", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o suspended" ENV{DM_SUSPENDED}!="?*", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o suspended"
@ -13,10 +24,10 @@ Index: LVM2.2.02.110/udev/10-dm.rules.in
# dmsetup tool provides suspended state information in textual # dmsetup tool provides suspended state information in textual
# form with values "Suspended"/"Active". We translate it to # form with values "Suspended"/"Active". We translate it to
# 0/1 respectively to be consistent with sysfs values. # 0/1 respectively to be consistent with sysfs values.
Index: LVM2.2.02.110/udev/13-dm-disk.rules.in diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in
=================================================================== index 4b64dd6..dca9c5c 100644
--- LVM2.2.02.110.orig/udev/13-dm-disk.rules.in --- a/udev/13-dm-disk.rules.in
+++ LVM2.2.02.110/udev/13-dm-disk.rules.in +++ b/udev/13-dm-disk.rules.in
@@ -14,14 +14,17 @@ ACTION!="add|change", GOTO="dm_end" @@ -14,14 +14,17 @@ ACTION!="add|change", GOTO="dm_end"
ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end" ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end"
ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end" ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end"
@ -38,3 +49,6 @@ Index: LVM2.2.02.110/udev/13-dm-disk.rules.in
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
--
2.6.6