Accepting request 489075 from Base:System

- Update to 2.02.170:
  * Few smal fixes around; obsoleted 169 release that was removed
    from mirrors
- Refresh patch:
  * display-dm-name-for-lv-name.diff

- Update device mapper version to 1.02.138, see WHATS_NEW_DM for
  detailed changelogs
  * Drop obsolete lvmchange files accordingly
- Refresh libdm-iface-not-output-error-message-inside-retry-loop.patch
- Refresh make-mirror-legs-on-different-tag-pvs.patch
- device-mapper-dmsetup-export.patch

- Version update to 2.02.169 release, see WHATS_NEW and WHATS_NEW_DM
  files for detailed changelogs

- Split configure options to have one per line
- Pass over with spec-cleaner
- Enable internal cache
- Enable lvmpolld

- Add 'lvm2-lockd' subpackage, fate#323203 to lvm2-clvm to not pull
  corosync and other deps to the core lvm2 package

- Update to 2.02.170:
  * Few smal fixes around; obsoleted 169 release that was removed
    from mirrors
- Refresh patch:
  * display-dm-name-for-lv-name.diff

OBS-URL: https://build.opensuse.org/request/show/489075
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lvm2?expand=0&rev=101
This commit is contained in:
Dominique Leuenberger 2017-04-25 06:55:28 +00:00 committed by Git OBS Bridge
commit 3c41f400a6
14 changed files with 466 additions and 242 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:23a3d1cddd41b3ef51812ebf83e9fa491f502fe74130d4263be327a91914660d
size 2159438

View File

@ -1,7 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEUEABECAAYFAlg/XqMACgkQIoGRwVZ+LBdjQACVGeU4I+B5ETIhINJeYXy2bLNu
hQCgxEmGwG0ec2frSXhQociTYfT6vVc=
=T5md
-----END PGP SIGNATURE-----

3
LVM2.2.02.170.tgz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9372d2523027a751cf54eafdf8b761ff843969520c32b0c50abfba65e23d0d40
size 2329694

7
LVM2.2.02.170.tgz.asc Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAljuyYIACgkQIoGRwVZ+LBf6MgCbBRfOPhmawTE3HPwPZNORFXyU
UuMAoN38fO4+j+w4c8xYF9P5Wl3FYrGi
=TbpB
-----END PGP SIGNATURE-----

View File

@ -1,7 +1,20 @@
Index: LVM2.2.02.139/man/dmsetup.8.in From b148cb1c1e801455cb774f51eecd57f7e4f98c39 Mon Sep 17 00:00:00 2001
From: Eric Ren <zren@suse.com>
Date: Tue, 11 Apr 2017 10:58:56 +0800
Subject: [PATCH] DM: add dmsetup export
bsc#479104
Patch-refreshed-by: Eric Ren <zren@suse.com>
---
man/dmsetup.8_main | 16 +++-
tools/dmsetup.c | 252 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 266 insertions(+), 2 deletions(-)
Index: LVM2.2.02.169/man/dmsetup.8_main
=================================================================== ===================================================================
--- LVM2.2.02.139.orig/man/dmsetup.8.in --- LVM2.2.02.169.orig/man/dmsetup.8_main
+++ LVM2.2.02.139/man/dmsetup.8.in +++ LVM2.2.02.169/man/dmsetup.8_main
@@ -97,7 +97,15 @@ dmsetup \(em low level logical volume ma @@ -97,7 +97,15 @@ dmsetup \(em low level logical volume ma
.. ..
.CMD_LOAD .CMD_LOAD
@ -23,20 +36,20 @@ Index: LVM2.2.02.139/man/dmsetup.8.in
See below for more information on the table format. See below for more information on the table format.
. .
.HP .HP
+.BR \-\-export +.BR --export
+.IR export +.IR export
+.br +.br
+Outputs information in key/value format to be imported by other programs. +Outputs information in key/value format to be imported by other programs.
+. +.
+.HP +.HP
.BR \-\-udevcookie .BR --udevcookie
.IR cookie .IR cookie
.br .br
Index: LVM2.2.02.139/tools/dmsetup.c Index: LVM2.2.02.169/tools/dmsetup.c
=================================================================== ===================================================================
--- LVM2.2.02.139.orig/tools/dmsetup.c --- LVM2.2.02.169.orig/tools/dmsetup.c
+++ LVM2.2.02.139/tools/dmsetup.c +++ LVM2.2.02.169/tools/dmsetup.c
@@ -2177,6 +2177,129 @@ out: @@ -2231,6 +2231,129 @@ out:
return r; return r;
} }
@ -166,11 +179,16 @@ Index: LVM2.2.02.139/tools/dmsetup.c
/* Show target names and their version numbers */ /* Show target names and their version numbers */
static int _targets(CMD_ARGS) static int _targets(CMD_ARGS)
{ {
@@ -5138,6 +5261,7 @@ static struct command _dmsetup_commands[ @@ -5904,7 +6027,11 @@ static struct command _dmsetup_commands[
{"deps", "[-o <options>] [<device>]", 0, -1, 1, 0, _deps}, {"deps", "[-o <options>] [<device>...]", 0, -1, 1, 0, _deps},
{"stats", "<command> [<options>] [<devices>]", 1, -1, 1, 1, _stats}, {"stats", "<command> [<options>] [<device>...]", 1, -1, 1, 1, _stats},
{"status", "[<device>] [--noflush] [--target <target_type>]", 0, -1, 1, 0, _status}, {"status", "[<device>...] [--noflush] [--target <target_type>]", 0, -1, 1, 0, _status},
- {"table", "[<device>...] [--target <target_type>] [--showkeys]", 0, -1, 1, 0, _status},
+ {"deps", "[-o <options>] [<device>]", 0, -1, 1, 0, _deps},
+ {"stats", "<command> [<options>] [<devices>]", 1, -1, 1, 1, _stats},
+ {"status", "[<device>] [--noflush] [--target <target_type>]", 0, -1, 1, 0, _status},
+ {"export", "[<device>]", 0, -1, 1, 0, _export}, + {"export", "[<device>]", 0, -1, 1, 0, _export},
{"table", "[<device>] [--target <target_type>] [--showkeys]", 0, -1, 1, 0, _status}, + {"table", "[<device>] [--target <target_type>] [--showkeys]", 0, -1, 1, 0, _status},
{"wait", "<device> [<event_nr>] [--noflush]", 0, 2, 0, 0, _wait}, {"wait", "<device> [<event_nr>] [--noflush]", 0, 2, 0, 0, _wait},
{"mknodes", "[<device>]", 0, -1, 1, 0, _mknodes}, {"mknodes", "[<device>...]", 0, -1, 1, 0, _mknodes},
{"mangle", "[<device>...]", 0, -1, 1, 0, _mangle},

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Tue Apr 18 11:07:01 UTC 2017 - tchvatal@suse.com
- Update to 2.02.170:
* Few smal fixes around; obsoleted 169 release that was removed
from mirrors
- Refresh patch:
* display-dm-name-for-lv-name.diff
-------------------------------------------------------------------
Wed Apr 12 01:33:15 UTC 2017 - zren@suse.com
- Update device mapper version to 1.02.138, see WHATS_NEW_DM for
detailed changelogs
* Drop obsolete lvmchange files accordingly
- Refresh libdm-iface-not-output-error-message-inside-retry-loop.patch
- Refresh make-mirror-legs-on-different-tag-pvs.patch
- device-mapper-dmsetup-export.patch
-------------------------------------------------------------------
Mon Apr 10 23:08:45 UTC 2017 - jnelson-suse@jamponi.net
- Version update to 2.02.169 release, see WHATS_NEW and WHATS_NEW_DM
files for detailed changelogs
-------------------------------------------------------------------
Mon Apr 10 10:41:02 UTC 2017 - tchvatal@suse.com
- Split configure options to have one per line
- Pass over with spec-cleaner
- Enable internal cache
- Enable lvmpolld
-------------------------------------------------------------------
Mon Apr 10 07:41:10 UTC 2017 - zren@suse.com
- Add 'lvm2-lockd' subpackage, fate#323203 to lvm2-clvm to not pull
corosync and other deps to the core lvm2 package
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com

View File

@ -16,15 +16,13 @@
# #
### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.168
%define device_mapper_version 1.02.137
%define thin_provisioning_version 0.5.6
### COMMON-DEF-END ###
%define libname libdevmapper1_03 %define libname libdevmapper1_03
%define libname_event libdevmapper-event1_03 %define libname_event libdevmapper-event1_03
### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.170
%define device_mapper_version 1.02.139
%define thin_provisioning_version 0.5.6
### COMMON-DEF-END ###
Name: device-mapper Name: device-mapper
Version: %{device_mapper_version} Version: %{device_mapper_version}
Release: 0 Release: 0
@ -35,7 +33,18 @@ 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
Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc
Source99: baselibs.conf Source99: baselibs.conf
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: suse-module-tools
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(libsepol)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd)
Requires: thin-provisioning-tools >= %{thin_provisioning_version}
Requires(post): coreutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
### COMMON-PATCH-BEGIN ### ### COMMON-PATCH-BEGIN ###
# Upstream patches # Upstream patches
# SUSE patches: 1000+ for LVM, 2000+ for device mapper # SUSE patches: 1000+ for LVM, 2000+ for device mapper
@ -93,19 +102,6 @@ Patch2011: lvm2-testsuite.patch
Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: suse-module-tools
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(libsepol)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd)
Requires: thin-provisioning-tools >= %{thin_provisioning_version}
Requires(post): coreutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%description %description
Programs and man pages for configuring and using the device mapper. Programs and man pages for configuring and using the device mapper.
@ -152,8 +148,10 @@ extra_opts=""
export PATH=$PATH:/sbin:%{_prefix}/sbin export PATH=$PATH:/sbin:%{_prefix}/sbin
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
%configure \ %configure \
--enable-dmeventd --enable-cmdlib \ --enable-dmeventd \
--enable-udev_rules --enable-udev_sync \ --enable-cmdlib \
--enable-udev_rules \
--enable-udev_sync \
--with-udev-prefix="%{_prefix}/" \ --with-udev-prefix="%{_prefix}/" \
--enable-selinux \ --enable-selinux \
--enable-pkgconfig \ --enable-pkgconfig \
@ -223,9 +221,9 @@ ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup
%{_sbindir}/dmsetup %{_sbindir}/dmsetup
%{_sbindir}/dmeventd %{_sbindir}/dmeventd
%{_sbindir}/dmstats %{_sbindir}/dmstats
%{_mandir}/man8/dmstats.8.* %{_mandir}/man8/dmstats.8%{ext_man}
%{_mandir}/man8/dmsetup.8.* %{_mandir}/man8/dmsetup.8%{ext_man}
%{_mandir}/man8/dmeventd.8.* %{_mandir}/man8/dmeventd.8%{ext_man}
%{_udevrulesdir}/10-dm.rules %{_udevrulesdir}/10-dm.rules
%{_udevrulesdir}/13-dm-disk.rules %{_udevrulesdir}/13-dm-disk.rules
%{_udevrulesdir}/95-dm-notify.rules %{_udevrulesdir}/95-dm-notify.rules
@ -236,6 +234,7 @@ ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup
############################################################################## ##############################################################################
# Library for device-mapper # Library for device-mapper
############################################################################## ##############################################################################
%package -n %{libname} %package -n %{libname}
Summary: Library for device-mapper Summary: Library for device-mapper
Group: System/Libraries Group: System/Libraries
@ -255,6 +254,7 @@ Device mapper main shared library
############################################################################## ##############################################################################
# Event library for device-mapper # Event library for device-mapper
############################################################################## ##############################################################################
%package -n %{libname_event} %package -n %{libname_event}
Summary: Event library for device-mapper Summary: Event library for device-mapper
Group: System/Libraries Group: System/Libraries
@ -274,6 +274,7 @@ Device mapper event daemon shared library
############################################################################## ##############################################################################
# Development package for the device mapper # Development package for the device mapper
############################################################################## ##############################################################################
%package devel %package devel
Summary: Development package for the device mapper Summary: Development package for the device mapper
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++

View File

@ -4,13 +4,13 @@
lib/display/display.c | 13 +++++++++---- lib/display/display.c | 13 +++++++++----
3 files changed, 13 insertions(+), 4 deletions(-) 3 files changed, 13 insertions(+), 4 deletions(-)
Index: LVM2.2.02.139/lib/config/config_settings.h Index: LVM2.2.02.170/lib/config/config_settings.h
=================================================================== ===================================================================
--- LVM2.2.02.139.orig/lib/config/config_settings.h --- LVM2.2.02.170.orig/lib/config/config_settings.h
+++ LVM2.2.02.139/lib/config/config_settings.h +++ LVM2.2.02.170/lib/config/config_settings.h
@@ -947,6 +947,9 @@ cfg_array(global_cache_check_options_CFG @@ -1039,6 +1039,9 @@ cfg(global_fsadm_executable_CFG, "fsadm_
cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_CACHE_REPAIR_OPTIONS_CONFIG, vsn(2, 2, 108), NULL, 0, NULL, "The full path to the fsadm command.\n"
"List of options passed to the cache_repair command.\n") "LVM uses this command to help with lvresize -r operations.\n")
+cfg(global_display_dm_name_for_lv_name_CFG, "display_dm_name_for_lv_name", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME, vsn(2, 2, 98), NULL, 0, NULL, +cfg(global_display_dm_name_for_lv_name_CFG, "display_dm_name_for_lv_name", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME, vsn(2, 2, 98), NULL, 0, NULL,
+ "Display dm name for lv name.\n") + "Display dm name for lv name.\n")
@ -18,10 +18,10 @@ Index: LVM2.2.02.139/lib/config/config_settings.h
cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SYSTEM_ID_SOURCE, vsn(2, 2, 117), NULL, 0, NULL, cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SYSTEM_ID_SOURCE, vsn(2, 2, 117), NULL, 0, NULL,
"The method LVM uses to set the local system ID.\n" "The method LVM uses to set the local system ID.\n"
"Volume Groups can also be given a system ID (by vgcreate, vgchange,\n" "Volume Groups can also be given a system ID (by vgcreate, vgchange,\n"
Index: LVM2.2.02.139/lib/config/defaults.h Index: LVM2.2.02.170/lib/config/defaults.h
=================================================================== ===================================================================
--- LVM2.2.02.139.orig/lib/config/defaults.h --- LVM2.2.02.170.orig/lib/config/defaults.h
+++ LVM2.2.02.139/lib/config/defaults.h +++ LVM2.2.02.170/lib/config/defaults.h
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
#define DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV 1 #define DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV 1
#define DEFAULT_EXTERNAL_DEVICE_INFO_SOURCE "none" #define DEFAULT_EXTERNAL_DEVICE_INFO_SOURCE "none"
@ -30,11 +30,11 @@ Index: LVM2.2.02.139/lib/config/defaults.h
#define DEFAULT_MD_COMPONENT_DETECTION 1 #define DEFAULT_MD_COMPONENT_DETECTION 1
#define DEFAULT_FW_RAID_COMPONENT_DETECTION 0 #define DEFAULT_FW_RAID_COMPONENT_DETECTION 0
#define DEFAULT_MD_CHUNK_ALIGNMENT 1 #define DEFAULT_MD_CHUNK_ALIGNMENT 1
Index: LVM2.2.02.139/lib/display/display.c Index: LVM2.2.02.170/lib/display/display.c
=================================================================== ===================================================================
--- LVM2.2.02.139.orig/lib/display/display.c --- LVM2.2.02.170.orig/lib/display/display.c
+++ LVM2.2.02.139/lib/display/display.c +++ LVM2.2.02.170/lib/display/display.c
@@ -371,10 +371,15 @@ int lvdisplay_full(struct cmd_context *c @@ -413,10 +413,15 @@ int lvdisplay_full(struct cmd_context *c
lv->vg->cmd->dev_dir, lv->vg->name, lv->name); lv->vg->cmd->dev_dir, lv->vg->name, lv->name);
else if (lv_is_visible(lv)) { else if (lv_is_visible(lv)) {
/* Thin pool does not have /dev/vg/name link */ /* Thin pool does not have /dev/vg/name link */

View File

@ -1,22 +1,25 @@
From a70f17fd1dc9a8cccefb946c3501d5cb6f2766bb Mon Sep 17 00:00:00 2001 From 3c4d9dd3571e89545d97c8421fd4cbdbaa6895b8 Mon Sep 17 00:00:00 2001
From: Liuhua Wang <lwang@suse.com> From: Eric Ren <zren@suse.com>
Date: Mon, 23 Nov 2015 13:49:39 +0800 Date: Tue, 11 Apr 2017 11:09:26 +0800
Subject: [PATCH] libdm-iface: not output error message inside retry loops Subject: [PATCH] libdm-iface: not output error message inside retry loops
This is a workaround to avoid noisy error message being output inside retry loops This is a workaround to avoid noisy error message being output inside
in case of remove failure because device busy. But as to the replies from upstream retry loops
in case of remove failure because device busy. But as to the replies
from upstream
there may be some issues in udev operations. there may be some issues in udev operations.
References: bsc#940298 boo#957059 References: bsc#940298 boo#957059
Signed-off-by: lwang@suse.com Signed-off-by: lwang@suse.com
Patch-refreshed-by: Eric Ren <zren@suse.com>
--- ---
libdm/ioctl/libdm-iface.c | 4 ++-- libdm/ioctl/libdm-iface.c | 6 +++---
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 3 insertions(+), 3 deletions(-)
Index: LVM2.2.02.141/libdm/ioctl/libdm-iface.c diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
=================================================================== index cb3e8dc..c1c0771 100644
--- LVM2.2.02.141.orig/libdm/ioctl/libdm-iface.c --- a/libdm/ioctl/libdm-iface.c
+++ LVM2.2.02.141/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c
@@ -62,6 +62,7 @@ @@ -62,6 +62,7 @@
*/ */
#define MAPPER_CTRL_MINOR 236 #define MAPPER_CTRL_MINOR 236
@ -25,15 +28,17 @@ Index: LVM2.2.02.141/libdm/ioctl/libdm-iface.c
/* dm major version no for running kernel */ /* dm major version no for running kernel */
static unsigned _dm_version = DM_VERSION_MAJOR; static unsigned _dm_version = DM_VERSION_MAJOR;
@@ -1862,7 +1863,7 @@ static struct dm_ioctl *_do_dm_ioctl(str @@ -1862,8 +1863,8 @@ static struct dm_ioctl *_do_dm_ioctl(struct dm_task *dmt, unsigned command,
dmt->major > 0 && dmt->minor == 0 ? "0" : "", dmt->major > 0 && dmt->minor == 0 ? "0" : "",
dmt->major > 0 ? ")" : "", dmt->major > 0 ? ")" : "",
strerror(dmt->ioctl_errno)); strerror(dmt->ioctl_errno));
- else - else
- log_error("device-mapper: %s ioctl on %s %s%s%.0d%s%.0d%s%s "
+ else if(errno != EBUSY || retry_repeat_count == DM_IOCTL_RETRIES) + else if(errno != EBUSY || retry_repeat_count == DM_IOCTL_RETRIES)
log_error("device-mapper: %s ioctl on %s%s%s%.0d%s%.0d%s%s " + log_error("device-mapper: %s ioctl on %s%s%s%.0d%s%.0d%s%s "
"failed: %s", "failed: %s",
_cmd_data_v4[dmt->type].name, _cmd_data_v4[dmt->type].name,
dmi->name, dmi->uuid,
@@ -1915,7 +1916,6 @@ void dm_task_update_nodes(void) @@ -1915,7 +1916,6 @@ void dm_task_update_nodes(void)
update_devs(); update_devs();
} }
@ -42,3 +47,6 @@ Index: LVM2.2.02.141/libdm/ioctl/libdm-iface.c
#define DM_RETRY_USLEEP_DELAY 200000 #define DM_RETRY_USLEEP_DELAY 200000
int dm_task_get_errno(struct dm_task *dmt) int dm_task_get_errno(struct dm_task *dmt)
--
2.10.2

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Tue Apr 18 11:07:01 UTC 2017 - tchvatal@suse.com
- Update to 2.02.170:
* Few smal fixes around; obsoleted 169 release that was removed
from mirrors
- Refresh patch:
* display-dm-name-for-lv-name.diff
-------------------------------------------------------------------
Wed Apr 12 01:33:15 UTC 2017 - zren@suse.com
- Update device mapper version to 1.02.138, see WHATS_NEW_DM for
detailed changelogs
* Drop obsolete lvmchange files accordingly
- Refresh libdm-iface-not-output-error-message-inside-retry-loop.patch
- Refresh make-mirror-legs-on-different-tag-pvs.patch
- device-mapper-dmsetup-export.patch
-------------------------------------------------------------------
Mon Apr 10 23:08:45 UTC 2017 - jnelson-suse@jamponi.net
- Version update to 2.02.169 release, see WHATS_NEW and WHATS_NEW_DM
files for detailed changelogs
-------------------------------------------------------------------
Mon Apr 10 10:41:02 UTC 2017 - tchvatal@suse.com
- Split configure options to have one per line
- Pass over with spec-cleaner
- Enable internal cache
- Enable lvmpolld
-------------------------------------------------------------------
Mon Apr 10 07:41:10 UTC 2017 - zren@suse.com
- Add 'lvm2-lockd' subpackage, fate#323203 to lvm2-clvm to not pull
corosync and other deps to the core lvm2 package
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com

View File

@ -16,12 +16,13 @@
# #
%define dlm_version 3.99.1
%define sanlock_version 3.3.0
### COMMON-DEF-BEGIN ### ### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.168 %define lvm2_version 2.02.170
%define device_mapper_version 1.02.137 %define device_mapper_version 1.02.139
%define thin_provisioning_version 0.5.6 %define thin_provisioning_version 0.5.6
### COMMON-DEF-END ### ### COMMON-DEF-END ###
Name: lvm2-clvm Name: lvm2-clvm
Version: %{lvm2_version} Version: %{lvm2_version}
Release: 0 Release: 0
@ -33,7 +34,20 @@ Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc
Source2: clvmd.ocf Source2: clvmd.ocf
Source3: cmirrord.ocf Source3: cmirrord.ocf
BuildRequires: libcorosync-devel
BuildRequires: libdlm-devel >= %{dlm_version}
BuildRequires: pkgconfig
BuildRequires: sanlock-devel >= %{sanlock_version}
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(blkid)
BuildRequires: pkgconfig(devmapper)
BuildRequires: pkgconfig(libudev)
Requires: corosync
Requires: device-mapper >= %{device_mapper_version}
Requires: lvm2 = %{version}
Requires: lvm2-cmirrord
Obsoletes: cmirrord < %{version}
Provides: cmirrord = %{version}
### COMMON-PATCH-BEGIN ### ### COMMON-PATCH-BEGIN ###
# Upstream patches # Upstream patches
# SUSE patches: 1000+ for LVM, 2000+ for device mapper # SUSE patches: 1000+ for LVM, 2000+ for device mapper
@ -91,19 +105,6 @@ Patch2011: lvm2-testsuite.patch
Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: libcorosync-devel
BuildRequires: libdlm-devel
BuildRequires: pkgconfig
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(devmapper)
BuildRequires: pkgconfig(libudev)
Requires: corosync
Requires: device-mapper >= %{device_mapper_version}
Requires: lvm2 = %{version}
Requires: lvm2-cmirrord
Obsoletes: cmirrord < %{version}
Provides: cmirrord = %{version}
%description %description
A daemon for using LVM2 Logival Volumes in a clustered environment. A daemon for using LVM2 Logival Volumes in a clustered environment.
@ -146,20 +147,30 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
%build %build
extra_opts=" extra_opts="
--enable-applib
--enable-blkid_wiping
--enable-cmdlib
--enable-lvmetad
--enable-lvmpolld
--enable-realtime
--with-default-locking-dir=/run/lock/lvm --with-default-locking-dir=/run/lock/lvm
--with-default-pid-dir=/run --with-default-pid-dir=/run
--with-default-run-dir=/run/lvm --with-default-run-dir=/run/lvm
--with-clvmd=corosync --with-clvmd=corosync
--with-cluster=internal --with-cluster=internal
--enable-cmirrord --enable-cmirrord
--enable-lockd-dlm
--enable-lockd-sanlock
" "
### COMMON-CONFIG-BEGIN ### ### COMMON-CONFIG-BEGIN ###
export PATH=$PATH:/sbin:%{_prefix}/sbin export PATH=$PATH:/sbin:%{_prefix}/sbin
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
%configure \ %configure \
--enable-dmeventd --enable-cmdlib \ --enable-dmeventd \
--enable-udev_rules --enable-udev_sync \ --enable-cmdlib \
--enable-udev_rules \
--enable-udev_sync \
--with-udev-prefix="%{_prefix}/" \ --with-udev-prefix="%{_prefix}/" \
--enable-selinux \ --enable-selinux \
--enable-pkgconfig \ --enable-pkgconfig \
@ -184,8 +195,13 @@ make %{?_smp_mflags}
make DESTDIR=%{buildroot} \ make DESTDIR=%{buildroot} \
install_cluster \ install_cluster \
install_systemd_units install_systemd_generators install_systemd_units install_systemd_generators
make DESTDIR=%{buildroot} install -C daemons/lvmlockd
make DESTDIR=%{buildroot} install -C daemons/cmirrord make DESTDIR=%{buildroot} install -C daemons/cmirrord
# lvmlockd does not have separate target install the mans by hand for now
install -m0644 -D man/lvmlockd.8 %{buildroot}%{_mandir}/man8/lvmlockd.8
install -m0644 -D man/lvmlockctl.8 %{buildroot}%{_mandir}/man8/lvmlockctl.8
# ocf files # ocf files
install -m755 -D %{SOURCE2} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/clvmd" install -m755 -D %{SOURCE2} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/clvmd"
install -m755 -D %{SOURCE3} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/cmirrord" install -m755 -D %{SOURCE3} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/cmirrord"
@ -194,6 +210,8 @@ install -m755 -D %{SOURCE3} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/cmi
ln -s service %{buildroot}%{_sbindir}/rclvm2-cluster-activation ln -s service %{buildroot}%{_sbindir}/rclvm2-cluster-activation
ln -s service %{buildroot}%{_sbindir}/rclvm2-clvmd ln -s service %{buildroot}%{_sbindir}/rclvm2-clvmd
ln -s service %{buildroot}%{_sbindir}/rclvm2-cmirrord ln -s service %{buildroot}%{_sbindir}/rclvm2-cmirrord
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmlockd
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmlocking
# remove files from lvm2 split due to systemd_generators picking them up # remove files from lvm2 split due to systemd_generators picking them up
rm %{buildroot}%{_unitdir}/blk-availability.service rm %{buildroot}%{_unitdir}/blk-availability.service
@ -201,6 +219,12 @@ rm %{buildroot}%{_unitdir}/dm-event.service
rm %{buildroot}%{_unitdir}/dm-event.socket 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
rm %{buildroot}%{_libexecdir}/systemd/system-generators/lvm2-activation-generator
rm %{buildroot}%{_unitdir}/lvm2-lvmetad.service
rm %{buildroot}%{_unitdir}/lvm2-lvmetad.socket
rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.service
rm %{buildroot}%{_unitdir}/lvm2-lvmpolld.socket
rm %{buildroot}%{_unitdir}/lvm2-pvscan@.service
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -214,11 +238,12 @@ rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8
%{_unitdir}/lvm2-clvmd.service %{_unitdir}/lvm2-clvmd.service
%{_unitdir}/lvm2-cluster-activation.service %{_unitdir}/lvm2-cluster-activation.service
%{_libexecdir}/systemd/lvm2-cluster-activation %{_libexecdir}/systemd/lvm2-cluster-activation
%{_mandir}/man8/clvmd.8.gz %{_mandir}/man8/clvmd.8%{ext_man}
############################################################################## ##############################################################################
# Clustered RAID 1 support using device-mapper and corosync # Clustered RAID 1 support using device-mapper and corosync
############################################################################## ##############################################################################
%package -n lvm2-cmirrord %package -n lvm2-cmirrord
Summary: Clustered RAID 1 support using device-mapper and corosync Summary: Clustered RAID 1 support using device-mapper and corosync
Group: Productivity/Clustering/HA Group: Productivity/Clustering/HA
@ -236,6 +261,44 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
%{_libexecdir}/ocf/resource.d/lvm2/cmirrord %{_libexecdir}/ocf/resource.d/lvm2/cmirrord
%{_libexecdir}/systemd/system/lvm2-cmirrord.service %{_libexecdir}/systemd/system/lvm2-cmirrord.service
%{_sbindir}/rclvm2-cmirrord %{_sbindir}/rclvm2-cmirrord
%{_mandir}/man8/cmirrord.8.* %{_mandir}/man8/cmirrord.8%{ext_man}
##############################################################################
# LVM locking daemon
##############################################################################
%package -n lvm2-lockd
Summary: LVM locking daemon
Group: Productivity/Clustering/HA
Requires: libdlm >= %{dlm_version}
Requires: libsanlock1 >= %{sanlock_version}
Requires: lvm2 = %{version}
%{?systemd_requires}
%description -n lvm2-lockd
LVM commands use lvmlockd to coordinate access to shared storage.
%pre -n lvm2-lockd
%service_add_pre lvm2-lvmlockd.service lvm2-lvmlocking.service
%post -n lvm2-lockd
%service_add_post lvm2-lvmlockd.service lvm2-lvmlocking.service
%preun -n lvm2-lockd
%service_del_preun lvm2-lvmlockd.service lvm2-lvmlocking.service
%postun -n lvm2-lockd
%service_del_postun lvm2-lvmlockd.service lvm2-lvmlocking.service
%files -n lvm2-lockd
%defattr(-,root,root,)
%{_sbindir}/lvmlockd
%{_sbindir}/lvmlockctl
%{_mandir}/man8/lvmlockd.8%{ext_man}
%{_mandir}/man8/lvmlockctl.8%{ext_man}
%{_unitdir}/lvm2-lvmlockd.service
%{_unitdir}/lvm2-lvmlocking.service
%{_sbindir}/rclvm2-lvmlockd
%{_sbindir}/rclvm2-lvmlocking
%changelog %changelog

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Tue Apr 18 11:07:01 UTC 2017 - tchvatal@suse.com
- Update to 2.02.170:
* Few smal fixes around; obsoleted 169 release that was removed
from mirrors
- Refresh patch:
* display-dm-name-for-lv-name.diff
-------------------------------------------------------------------
Wed Apr 12 01:33:15 UTC 2017 - zren@suse.com
- Update device mapper version to 1.02.138, see WHATS_NEW_DM for
detailed changelogs
* Drop obsolete lvmchange files accordingly
- Refresh libdm-iface-not-output-error-message-inside-retry-loop.patch
- Refresh make-mirror-legs-on-different-tag-pvs.patch
- device-mapper-dmsetup-export.patch
-------------------------------------------------------------------
Mon Apr 10 23:08:45 UTC 2017 - jnelson-suse@jamponi.net
- Version update to 2.02.169 release, see WHATS_NEW and WHATS_NEW_DM
files for detailed changelogs
-------------------------------------------------------------------
Mon Apr 10 10:41:02 UTC 2017 - tchvatal@suse.com
- Split configure options to have one per line
- Pass over with spec-cleaner
- Enable internal cache
- Enable lvmpolld
-------------------------------------------------------------------
Mon Apr 10 07:41:10 UTC 2017 - zren@suse.com
- Add 'lvm2-lockd' subpackage, fate#323203 to lvm2-clvm to not pull
corosync and other deps to the core lvm2 package
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com

202
lvm2.spec
View File

@ -16,16 +16,14 @@
# #
### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.168
%define device_mapper_version 1.02.137
%define thin_provisioning_version 0.5.6
### 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
%define cmdlib liblvm2cmd2_02 %define cmdlib liblvm2cmd2_02
### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.170
%define device_mapper_version 1.02.139
%define thin_provisioning_version 0.5.6
### COMMON-DEF-END ###
Name: lvm2 Name: lvm2
Version: %{lvm2_version} Version: %{lvm2_version}
Release: 0 Release: 0
@ -36,7 +34,22 @@ 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
Source1: lvm.conf Source1: lvm.conf
Source42: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz.asc Source42: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz.asc
BuildRequires: gcc-c++
BuildRequires: libaio-devel
BuildRequires: libselinux-devel
BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(blkid)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev)
Requires: device-mapper >= %{device_mapper_version}
Requires(post): coreutils
Requires(postun): coreutils
Provides: lvm = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
### COMMON-PATCH-BEGIN ### ### COMMON-PATCH-BEGIN ###
# Upstream patches # Upstream patches
# SUSE patches: 1000+ for LVM, 2000+ for device mapper # SUSE patches: 1000+ for LVM, 2000+ for device mapper
@ -94,23 +107,6 @@ Patch2011: lvm2-testsuite.patch
Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: gcc-c++
BuildRequires: libaio-devel
BuildRequires: libselinux-devel
BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(blkid)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev)
Requires: device-mapper >= %{device_mapper_version}
Requires(post): coreutils
Requires(postun): coreutils
Provides: lvm = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%description %description
Programs and man pages for configuring and using the LVM2 Logical Programs and man pages for configuring and using the LVM2 Logical
Volume Manager. Volume Manager.
@ -153,11 +149,13 @@ Volume Manager.
%build %build
extra_opts=" extra_opts="
--enable-applib
--enable-blkid_wiping --enable-blkid_wiping
--enable-cmdlib --enable-cmdlib
--enable-applib
--enable-realtime
--enable-lvmetad --enable-lvmetad
--enable-lvmpolld
--enable-realtime
--with-cache=internal
--with-default-locking-dir=/run/lock/lvm --with-default-locking-dir=/run/lock/lvm
--with-default-pid-dir=/run --with-default-pid-dir=/run
--with-default-run-dir=/run/lvm --with-default-run-dir=/run/lvm
@ -167,8 +165,10 @@ extra_opts="
export PATH=$PATH:/sbin:%{_prefix}/sbin export PATH=$PATH:/sbin:%{_prefix}/sbin
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
%configure \ %configure \
--enable-dmeventd --enable-cmdlib \ --enable-dmeventd \
--enable-udev_rules --enable-udev_sync \ --enable-cmdlib \
--enable-udev_rules \
--enable-udev_sync \
--with-udev-prefix="%{_prefix}/" \ --with-udev-prefix="%{_prefix}/" \
--enable-selinux \ --enable-selinux \
--enable-pkgconfig \ --enable-pkgconfig \
@ -213,6 +213,7 @@ popd
ln -s service %{buildroot}%{_sbindir}/rcblk-availability ln -s service %{buildroot}%{_sbindir}/rcblk-availability
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmetad ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmetad
ln -s service %{buildroot}%{_sbindir}/rclvm2-monitor ln -s service %{buildroot}%{_sbindir}/rclvm2-monitor
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmpolld
# Remove devicemapper binaries, plain rm so we fail if something change # Remove devicemapper binaries, plain rm so we fail if something change
rm %{buildroot}%{_sbindir}/dmsetup rm %{buildroot}%{_sbindir}/dmsetup
@ -242,12 +243,12 @@ done
popd popd
%pre %pre
%service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service %service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service lvm2-lvmpolld.service lvm2-lvmpolld.socket
%post %post
/sbin/ldconfig /sbin/ldconfig
%{?regenerate_initrd_post} %{?regenerate_initrd_post}
%service_add_post blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service %service_add_post blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service lvm2-lvmpolld.service lvm2-lvmpolld.socket
# Use %%tmpfiles_create when 13.2 is oldest in support scope # Use %%tmpfiles_create when 13.2 is oldest in support scope
%{_bindir}/systemd-tmpfiles --create %{_tmpfilesdir}/lvm2.conf || : %{_bindir}/systemd-tmpfiles --create %{_tmpfilesdir}/lvm2.conf || :
@ -255,12 +256,12 @@ popd
%{?regenerate_initrd_posttrans} %{?regenerate_initrd_posttrans}
%preun %preun
%service_del_preun blk-availability.service lvm2-monitor.service lvm2-lvmetad.service %service_del_preun blk-availability.service lvm2-monitor.service lvm2-lvmetad.service lvm2-lvmpolld.service lvm2-lvmpolld.socket
%postun %postun
/sbin/ldconfig /sbin/ldconfig
%{?regenerate_initrd_post} %{?regenerate_initrd_post}
%service_del_postun blk-availability.service lvm2-monitor.service lvm2-lvmetad.service %service_del_postun blk-availability.service lvm2-monitor.service lvm2-lvmetad.service lvm2-lvmpolld.service lvm2-lvmpolld.socket
%files %files
%defattr(-,root,root) %defattr(-,root,root)
@ -274,13 +275,13 @@ popd
%{_sbindir}/lvmconfig %{_sbindir}/lvmconfig
%{_sbindir}/lvmdump %{_sbindir}/lvmdump
%{_sbindir}/lvmetad %{_sbindir}/lvmetad
%{_sbindir}/lvmpolld
# Other files # Other files
%{_sbindir}/lvchange %{_sbindir}/lvchange
%{_sbindir}/lvconvert %{_sbindir}/lvconvert
%{_sbindir}/lvcreate %{_sbindir}/lvcreate
%{_sbindir}/lvdisplay %{_sbindir}/lvdisplay
%{_sbindir}/lvextend %{_sbindir}/lvextend
%{_sbindir}/lvmchange
%{_sbindir}/lvmdiskscan %{_sbindir}/lvmdiskscan
%{_sbindir}/lvmsadc %{_sbindir}/lvmsadc
%{_sbindir}/lvmsar %{_sbindir}/lvmsar
@ -320,6 +321,7 @@ popd
%{_sbindir}/vgsplit %{_sbindir}/vgsplit
%{_sbindir}/rcblk-availability %{_sbindir}/rcblk-availability
%{_sbindir}/rclvm2-lvmetad %{_sbindir}/rclvm2-lvmetad
%{_sbindir}/rclvm2-lvmpolld
%{_sbindir}/rclvm2-monitor %{_sbindir}/rclvm2-monitor
# compat symlinks in /sbin # compat symlinks in /sbin
/sbin/lvm /sbin/lvm
@ -327,12 +329,12 @@ popd
/sbin/lvmconfig /sbin/lvmconfig
/sbin/lvmdump /sbin/lvmdump
/sbin/lvmetad /sbin/lvmetad
/sbin/lvmpolld
/sbin/lvchange /sbin/lvchange
/sbin/lvconvert /sbin/lvconvert
/sbin/lvcreate /sbin/lvcreate
/sbin/lvdisplay /sbin/lvdisplay
/sbin/lvextend /sbin/lvextend
/sbin/lvmchange
/sbin/lvmdiskscan /sbin/lvmdiskscan
/sbin/lvmsadc /sbin/lvmsadc
/sbin/lvmsar /sbin/lvmsar
@ -370,67 +372,67 @@ popd
/sbin/vgs /sbin/vgs
/sbin/vgscan /sbin/vgscan
/sbin/vgsplit /sbin/vgsplit
%{_mandir}/man5/lvm.conf.5.gz %{_mandir}/man5/lvm.conf.5%{ext_man}
%{_mandir}/man7/lvmcache.7.gz %{_mandir}/man7/lvmcache.7%{ext_man}
%{_mandir}/man7/lvmraid.7.gz %{_mandir}/man7/lvmraid.7%{ext_man}
%{_mandir}/man7/lvmreport.7.gz %{_mandir}/man7/lvmreport.7%{ext_man}
%{_mandir}/man7/lvmthin.7.gz %{_mandir}/man7/lvmthin.7%{ext_man}
%{_mandir}/man7/lvmsystemid.7.gz %{_mandir}/man7/lvmsystemid.7%{ext_man}
%{_mandir}/man8/fsadm.8.gz %{_mandir}/man8/fsadm.8%{ext_man}
%{_mandir}/man8/lvchange.8.gz %{_mandir}/man8/lvchange.8%{ext_man}
%{_mandir}/man8/lvconvert.8.gz %{_mandir}/man8/lvconvert.8%{ext_man}
%{_mandir}/man8/lvcreate.8.gz %{_mandir}/man8/lvcreate.8%{ext_man}
%{_mandir}/man8/lvdisplay.8.gz %{_mandir}/man8/lvdisplay.8%{ext_man}
%{_mandir}/man8/lvextend.8.gz %{_mandir}/man8/lvextend.8%{ext_man}
%{_mandir}/man8/lvm.8.gz %{_mandir}/man8/lvm.8%{ext_man}
%{_mandir}/man8/lvm2-activation-generator.8.gz %{_mandir}/man8/lvm2-activation-generator.8%{ext_man}
%{_mandir}/man8/lvm-config.8.gz %{_mandir}/man8/lvm-config.8%{ext_man}
%{_mandir}/man8/lvmconfig.8.gz %{_mandir}/man8/lvmconfig.8%{ext_man}
%{_mandir}/man8/lvm-dumpconfig.8.gz %{_mandir}/man8/lvm-dumpconfig.8%{ext_man}
%{_mandir}/man8/lvmchange.8.gz %{_mandir}/man8/lvmconf.8%{ext_man}
%{_mandir}/man8/lvmconf.8.gz %{_mandir}/man8/lvmdiskscan.8%{ext_man}
%{_mandir}/man8/lvmdiskscan.8.gz %{_mandir}/man8/lvmdump.8%{ext_man}
%{_mandir}/man8/lvmdump.8.gz %{_mandir}/man8/lvm-fullreport.8%{ext_man}
%{_mandir}/man8/lvm-fullreport.8.gz %{_mandir}/man8/lvmsadc.8%{ext_man}
%{_mandir}/man8/lvmsadc.8.gz %{_mandir}/man8/lvmsar.8%{ext_man}
%{_mandir}/man8/lvmsar.8.gz %{_mandir}/man8/lvreduce.8%{ext_man}
%{_mandir}/man8/lvreduce.8.gz %{_mandir}/man8/lvremove.8%{ext_man}
%{_mandir}/man8/lvremove.8.gz %{_mandir}/man8/lvrename.8%{ext_man}
%{_mandir}/man8/lvrename.8.gz %{_mandir}/man8/lvresize.8%{ext_man}
%{_mandir}/man8/lvresize.8.gz %{_mandir}/man8/lvs.8%{ext_man}
%{_mandir}/man8/lvs.8.gz %{_mandir}/man8/lvscan.8%{ext_man}
%{_mandir}/man8/lvscan.8.gz %{_mandir}/man8/pvchange.8%{ext_man}
%{_mandir}/man8/pvchange.8.gz %{_mandir}/man8/pvck.8%{ext_man}
%{_mandir}/man8/pvck.8.gz %{_mandir}/man8/pvcreate.8%{ext_man}
%{_mandir}/man8/pvcreate.8.gz %{_mandir}/man8/pvdisplay.8%{ext_man}
%{_mandir}/man8/pvdisplay.8.gz %{_mandir}/man8/pvmove.8%{ext_man}
%{_mandir}/man8/pvmove.8.gz %{_mandir}/man8/pvremove.8%{ext_man}
%{_mandir}/man8/pvremove.8.gz %{_mandir}/man8/pvresize.8%{ext_man}
%{_mandir}/man8/pvresize.8.gz %{_mandir}/man8/pvs.8%{ext_man}
%{_mandir}/man8/pvs.8.gz %{_mandir}/man8/pvscan.8%{ext_man}
%{_mandir}/man8/pvscan.8.gz %{_mandir}/man8/vgcfgbackup.8%{ext_man}
%{_mandir}/man8/vgcfgbackup.8.gz %{_mandir}/man8/vgcfgrestore.8%{ext_man}
%{_mandir}/man8/vgcfgrestore.8.gz %{_mandir}/man8/vgchange.8%{ext_man}
%{_mandir}/man8/vgchange.8.gz %{_mandir}/man8/vgck.8%{ext_man}
%{_mandir}/man8/vgck.8.gz %{_mandir}/man8/vgconvert.8%{ext_man}
%{_mandir}/man8/vgconvert.8.gz %{_mandir}/man8/vgcreate.8%{ext_man}
%{_mandir}/man8/vgcreate.8.gz %{_mandir}/man8/vgdisplay.8%{ext_man}
%{_mandir}/man8/vgdisplay.8.gz %{_mandir}/man8/vgexport.8%{ext_man}
%{_mandir}/man8/vgexport.8.gz %{_mandir}/man8/vgextend.8%{ext_man}
%{_mandir}/man8/vgextend.8.gz %{_mandir}/man8/vgimport.8%{ext_man}
%{_mandir}/man8/vgimport.8.gz %{_mandir}/man8/vgimportclone.8%{ext_man}
%{_mandir}/man8/vgimportclone.8.gz %{_mandir}/man8/vgmerge.8%{ext_man}
%{_mandir}/man8/vgmerge.8.gz %{_mandir}/man8/vgmknodes.8%{ext_man}
%{_mandir}/man8/vgmknodes.8.gz %{_mandir}/man8/vgreduce.8%{ext_man}
%{_mandir}/man8/vgreduce.8.gz %{_mandir}/man8/vgremove.8%{ext_man}
%{_mandir}/man8/vgremove.8.gz %{_mandir}/man8/vgrename.8%{ext_man}
%{_mandir}/man8/vgrename.8.gz %{_mandir}/man8/vgs.8%{ext_man}
%{_mandir}/man8/vgs.8.gz %{_mandir}/man8/vgscan.8%{ext_man}
%{_mandir}/man8/vgscan.8.gz %{_mandir}/man8/vgsplit.8%{ext_man}
%{_mandir}/man8/vgsplit.8.gz %{_mandir}/man8/lvmetad.8%{ext_man}
%{_mandir}/man8/lvmetad.8.gz %{_mandir}/man8/blkdeactivate.8%{ext_man}
%{_mandir}/man8/lvm-lvpoll.8.gz %{_mandir}/man8/lvmpolld.8%{ext_man}
%{_mandir}/man8/blkdeactivate.8.gz %{_mandir}/man8/lvm-lvpoll.8%{ext_man}
%{_udevdir}/rules.d/11-dm-lvm.rules %{_udevdir}/rules.d/11-dm-lvm.rules
%{_udevdir}/rules.d/69-dm-lvm-metad.rules %{_udevdir}/rules.d/69-dm-lvm-metad.rules
%dir %{_sysconfdir}/lvm %dir %{_sysconfdir}/lvm
@ -456,7 +458,9 @@ popd
%{_unitdir}/lvm2-lvmetad.socket %{_unitdir}/lvm2-lvmetad.socket
%{_unitdir}/lvm2-lvmetad.service %{_unitdir}/lvm2-lvmetad.service
%{_unitdir}/lvm2-pvscan@.service %{_unitdir}/lvm2-pvscan@.service
%{_prefix}/lib/systemd/system-generators/lvm2-activation-generator %{_unitdir}/lvm2-lvmpolld.socket
%{_unitdir}/lvm2-lvmpolld.service
%{_libexecdir}/systemd/system-generators/lvm2-activation-generator
%dir %{_libdir}/device-mapper %dir %{_libdir}/device-mapper
%{_libdir}/device-mapper/libdevmapper-event-lvm2*.so %{_libdir}/device-mapper/libdevmapper-event-lvm2*.so
%{_libdir}/libdevmapper-event-lvm2*.so %{_libdir}/libdevmapper-event-lvm2*.so
@ -465,6 +469,7 @@ popd
############################################################################## ##############################################################################
# LVM2 application api library # LVM2 application api library
############################################################################## ##############################################################################
%package -n %{applib} %package -n %{applib}
Summary: LVM2 application api library Summary: LVM2 application api library
Group: System/Libraries Group: System/Libraries
@ -483,6 +488,7 @@ LVM library for applications api
############################################################################## ##############################################################################
# LVM2 command line library # LVM2 command line library
############################################################################## ##############################################################################
%package -n %{cmdlib} %package -n %{cmdlib}
Summary: LVM2 command line library Summary: LVM2 command line library
Group: System/Libraries Group: System/Libraries
@ -502,6 +508,7 @@ lvm devices without invoking a separate program.
############################################################################## ##############################################################################
# Development files for LVM2 # Development files for LVM2
############################################################################## ##############################################################################
%package devel %package devel
Summary: Development files for LVM2 Summary: Development files for LVM2
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
@ -524,6 +531,7 @@ This package provides development files for the LVM2 Logical Volume Manager.
############################################################################## ##############################################################################
# LVM2 Testsuite # LVM2 Testsuite
############################################################################## ##############################################################################
%package testsuite %package testsuite
Summary: LVM2 Testsuite Summary: LVM2 Testsuite
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++

View File

@ -1,10 +1,10 @@
From 49a5da732c74b8b96bc123a541d590c4fd06d7af Mon Sep 17 00:00:00 2001 From b17f2ae4334f9233a88d7a2fcae325f86691beb0 Mon Sep 17 00:00:00 2001
From: Guangliang Zhao <gzhao@suse.com> From: Eric Ren <zren@suse.com>
Date: Mon, 12 Nov 2012 15:28:11 +0800 Date: Tue, 11 Apr 2017 10:44:30 +0800
Subject: [PATCH 1/2] mirror: make mirror legs on different tag pvs Subject: [PATCH] [PATCH 1/2] mirror: make mirror legs on different tag pvs
The mirror legs could be placed on the PVs(with different The mirror legs could be placed on the PVs(with different tags)
tags) from the other mirror legs with this patch. from the other mirror legs with this patch.
The lvcreate allocates the replica "randomly" when creating The lvcreate allocates the replica "randomly" when creating
a mirrored logical volume now, so it could happen that both a mirrored logical volume now, so it could happen that both
@ -17,18 +17,19 @@ finding areas for parallel space, so that mirror legs will
always be placed on pvs with differnt tags. always be placed on pvs with differnt tags.
Signed-off-by: Guangliang Zhao <gzhao@suse.com> Signed-off-by: Guangliang Zhao <gzhao@suse.com>
Fix-conflict-by: Eric Ren <zren@suse.com>
--- ---
conf/example.conf.in | 17 +++++++++++++++++ conf/example.conf.in | 17 +++++++++++++++++
lib/config/config_settings.h | 3 +++ lib/config/config_settings.h | 5 ++++-
lib/config/defaults.h | 1 + lib/config/defaults.h | 1 +
lib/metadata/lv_manip.c | 35 +++++++++++++++++++++++++++++++++++ lib/metadata/lv_manip.c | 35 +++++++++++++++++++++++++++++++++++
man/lvcreate.8.in | 4 ++++ man/lvcreate.8_pregen | 7 +++++++
5 files changed, 60 insertions(+) 5 files changed, 64 insertions(+), 1 deletion(-)
Index: LVM2.2.02.165/conf/example.conf.in diff --git a/conf/example.conf.in b/conf/example.conf.in
=================================================================== index 614ce53..b33289f 100644
--- LVM2.2.02.165.orig/conf/example.conf.in --- a/conf/example.conf.in
+++ LVM2.2.02.165/conf/example.conf.in +++ b/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,25 +54,27 @@ Index: LVM2.2.02.165/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.165/lib/config/config_settings.h diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
=================================================================== index b701722..0e5a5e2 100644
--- LVM2.2.02.165.orig/lib/config/config_settings.h --- a/lib/config/config_settings.h
+++ LVM2.2.02.165/lib/config/config_settings.h +++ b/lib/config/config_settings.h
@@ -473,6 +473,9 @@ cfg(allocation_raid_stripe_all_devices_C @@ -473,7 +473,10 @@ cfg(allocation_raid_stripe_all_devices_CFG, "raid_stripe_all_devices", allocatio
"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")
-cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL, 0, NULL,
+cfg(allocation_mirror_legs_require_separate_pvs_CFG, "mirror_legs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LEGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 98), NULL, 0, NULL, +cfg(allocation_mirror_legs_require_separate_pvs_CFG, "mirror_legs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LEGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 98), NULL, 0, NULL,
+ "Mirror legs will always use different PVs.\n") + "Mirror legs will always use different PVs.\n")
+ +
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.165/lib/config/defaults.h cfg(allocation_cache_pool_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_CACHE_MODE, vsn(2, 2, 113), NULL, vsn(2, 2, 128),
=================================================================== diff --git a/lib/config/defaults.h b/lib/config/defaults.h
--- LVM2.2.02.165.orig/lib/config/defaults.h index 2340636..256fab6 100644
+++ LVM2.2.02.165/lib/config/defaults.h --- a/lib/config/defaults.h
@@ -158,6 +158,7 @@ +++ b/lib/config/defaults.h
@@ -159,6 +159,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,11 +82,11 @@ Index: LVM2.2.02.165/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.165/lib/metadata/lv_manip.c diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
=================================================================== index 0dfbad4..357e46a 100644
--- LVM2.2.02.165.orig/lib/metadata/lv_manip.c --- a/lib/metadata/lv_manip.c
+++ LVM2.2.02.165/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c
@@ -1519,6 +1519,9 @@ struct alloc_handle { @@ -1622,6 +1622,9 @@ struct alloc_handle {
unsigned maximise_cling; unsigned maximise_cling;
unsigned mirror_logs_separate; /* Force mirror logs on separate PVs? */ unsigned mirror_logs_separate; /* Force mirror logs on separate PVs? */
@ -93,7 +96,7 @@ Index: LVM2.2.02.165/lib/metadata/lv_manip.c
/* /*
* RAID devices require a metadata area that accompanies each * RAID devices require a metadata area that accompanies each
@@ -2633,6 +2636,32 @@ static int _limit_to_one_area_per_tag(st @@ -2736,6 +2739,32 @@ static int _limit_to_one_area_per_tag(struct alloc_handle *ah, struct alloc_stat
} }
/* /*
@ -126,7 +129,7 @@ Index: LVM2.2.02.165/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,
@@ -2762,6 +2791,10 @@ static int _find_some_parallel_space(str @@ -2865,6 +2894,10 @@ static int _find_some_parallel_space(struct alloc_handle *ah,
continue; continue;
case USE_AREA: case USE_AREA:
@ -137,7 +140,7 @@ Index: LVM2.2.02.165/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.
@@ -3243,6 +3276,7 @@ static struct alloc_handle *_alloc_init( @@ -3355,6 +3388,7 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
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 +148,7 @@ Index: LVM2.2.02.165/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
@@ -3254,6 +3288,7 @@ static struct alloc_handle *_alloc_init( @@ -3366,6 +3400,7 @@ static struct alloc_handle *_alloc_init(struct cmd_context *cmd,
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,18 +156,24 @@ Index: LVM2.2.02.165/lib/metadata/lv_manip.c
if (mirrors || stripes) if (mirrors || stripes)
total_extents = new_extents; total_extents = new_extents;
Index: LVM2.2.02.165/man/lvcreate.8.in diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
=================================================================== index 6663087..c385927 100644
--- LVM2.2.02.165.orig/man/lvcreate.8.in --- a/man/lvcreate.8_pregen
+++ LVM2.2.02.165/man/lvcreate.8.in +++ b/man/lvcreate.8_pregen
@@ -418,6 +418,10 @@ Using \fBcore\fP means the mirror is reg @@ -416,6 +416,13 @@ Create a raid10 LV.
from the first device each time the logical volume is activated, [ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
like after every reboot. .ad b
.br .br
+Every leg of the mirrored logical volume could be placed on the pvs with +Every leg of the mirrored logical volume could be placed on the pvs with
+same tag, see details(mirror_legs_require_separate_pvs) in lvm.conf. +same tag, see details(mirror_legs_require_separate_pvs) in lvm.conf.
+ +
+.br +.br
Using \fBmirrored\fP will create a persistent log that is itself mirrored. +Using \fBmirrored\fP will create a persistent log that is itself mirrored.
. +.
.HP +.HP
.ad l
[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
.ad b
--
2.10.2