master - config settings: fix version 3.0.0
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cd0fb0846db0d0bc044...
Commit: cd0fb0846db0d0bc04469914f6866a04af377548
Parent: ea9b2c2122d76b7fbdb0fb78e854acdf0f80ec87
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Nov 28 12:16:50 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Nov 28 12:16:50 2018 -0600
config settings: fix version 3.0.0
version 3.0.0 was changed in the end to 2.3.0,
but config settings had previously been encoded
with version 3.0.0.
---
lib/config/config_settings.h | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 1621608..e473dd5 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -226,7 +226,7 @@ cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING,
cfg_array(devices_scan_CFG, "scan", devices_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0), NULL, 0, NULL,
"Directories containing device nodes to use with LVM.\n")
-cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), NULL, vsn(3, 0, 0), NULL, NULL)
+cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), NULL, vsn(2, 3, 0), NULL, NULL)
cfg(devices_obtain_device_list_from_udev_CFG, "obtain_device_list_from_udev", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV, vsn(2, 2, 85), NULL, 0, NULL,
"Obtain the list of available devices from udev.\n"
@@ -314,13 +314,13 @@ cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_D
cfg_runtime(devices_cache_CFG, "cache", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), vsn(1, 2, 19), NULL,
"This setting is no longer used.\n")
-cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 2, 19), vsn(3, 0, 0), NULL,
+cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 2, 19), vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
-cfg(devices_cache_file_prefix_CFG, "cache_file_prefix", devices_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_CACHE_FILE_PREFIX, vsn(1, 2, 19), NULL, vsn(3, 0, 0), NULL,
+cfg(devices_cache_file_prefix_CFG, "cache_file_prefix", devices_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_CACHE_FILE_PREFIX, vsn(1, 2, 19), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
-cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL,
+cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_ADVANCED, CFG_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
@@ -419,7 +419,7 @@ cfg(devices_ignore_lvm_mirrors_CFG, "ignore_lvm_mirrors", devices_CFG_SECTION, 0
"apply to LVM RAID types like 'raid1' which handle failures in a\n"
"different way, making them a better choice for VG stacking.\n")
-cfg(devices_disable_after_error_count_CFG, "disable_after_error_count", devices_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(2, 2, 75), NULL, vsn(3, 0, 0), NULL,
+cfg(devices_disable_after_error_count_CFG, "disable_after_error_count", devices_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(2, 2, 75), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
cfg(devices_require_restorefile_with_uuid_CFG, "require_restorefile_with_uuid", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_REQUIRE_RESTOREFILE_WITH_UUID, vsn(2, 2, 73), NULL, 0, NULL,
@@ -871,13 +871,13 @@ cfg(global_activation_CFG, "activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, D
"is not present in the kernel, disabling this should suppress\n"
"the error messages.\n")
-cfg(global_fallback_to_lvm1_CFG, "fallback_to_lvm1", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, 0, vsn(1, 0, 18), NULL, vsn(3, 0, 0), NULL,
+cfg(global_fallback_to_lvm1_CFG, "fallback_to_lvm1", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, 0, vsn(1, 0, 18), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
-cfg(global_format_CFG, "format", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_FORMAT, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL,
+cfg(global_format_CFG, "format", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_FORMAT, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
-cfg_array(global_format_libraries_CFG, "format_libraries", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL,
+cfg_array(global_format_libraries_CFG, "format_libraries", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.")
cfg_array(global_segment_libraries_CFG, "segment_libraries", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 18), NULL, 0, NULL, NULL)
@@ -888,16 +888,16 @@ cfg(global_proc_CFG, "proc", global_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING,
cfg(global_etc_CFG, "etc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ETC_DIR, vsn(2, 2, 117), "@CONFDIR@", 0, NULL,
"Location of /etc system configuration directory.\n")
-cfg(global_locking_type_CFG, "locking_type", global_CFG_SECTION, 0, CFG_TYPE_INT, 1, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL,
+cfg(global_locking_type_CFG, "locking_type", global_CFG_SECTION, 0, CFG_TYPE_INT, 1, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.")
cfg(global_wait_for_locks_CFG, "wait_for_locks", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_WAIT_FOR_LOCKS, vsn(2, 2, 50), NULL, 0, NULL,
"When disabled, fail if a lock request would block.\n")
-cfg(global_fallback_to_clustered_locking_CFG, "fallback_to_clustered_locking", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_CLUSTERED_LOCKING, vsn(2, 2, 42), NULL, vsn(3, 0, 0), NULL,
+cfg(global_fallback_to_clustered_locking_CFG, "fallback_to_clustered_locking", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_CLUSTERED_LOCKING, vsn(2, 2, 42), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
-cfg(global_fallback_to_local_locking_CFG, "fallback_to_local_locking", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_LOCAL_LOCKING, vsn(2, 2, 42), NULL, vsn(3, 0, 0), NULL,
+cfg(global_fallback_to_local_locking_CFG, "fallback_to_local_locking", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_LOCAL_LOCKING, vsn(2, 2, 42), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
cfg(global_locking_dir_CFG, "locking_dir", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_LOCK_DIR, vsn(1, 0, 0), "@DEFAULT_LOCK_DIR@", 0, NULL,
@@ -917,7 +917,7 @@ cfg(global_prioritise_write_locks_CFG, "prioritise_write_locks", global_CFG_SECT
cfg(global_library_dir_CFG, "library_dir", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
"Search this directory first for shared libraries.\n")
-cfg(global_locking_library_CFG, "locking_library", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_LOCKING_LIB, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL,
+cfg(global_locking_library_CFG, "locking_library", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_LOCKING_LIB, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
cfg(global_abort_on_internal_errors_CFG, "abort_on_internal_errors", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ABORT_ON_INTERNAL_ERRORS, vsn(2, 2, 57), NULL, 0, NULL,
@@ -1013,10 +1013,10 @@ cfg(global_event_activation_CFG, "event_activation", global_CFG_SECTION, 0, CFG_
"When event_activation is disabled, the system will generally run\n"
"a direct activation command to activate LVs in complete VGs.\n")
-cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), 0, vsn(3, 0, 0), NULL,
+cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), 0, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
-cfg(global_lvmetad_update_wait_time_CFG, "lvmetad_update_wait_time", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, 0, vsn(2, 2, 151), NULL, vsn(3, 0, 0), NULL,
+cfg(global_lvmetad_update_wait_time_CFG, "lvmetad_update_wait_time", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, 0, vsn(2, 2, 151), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
cfg(global_use_aio_CFG, "use_aio", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_USE_AIO, vsn(2, 2, 183), NULL, 0, NULL,
@@ -1635,14 +1635,14 @@ cfg(metadata_pvmetadataignore_CFG, "pvmetadataignore", metadata_CFG_SECTION, CFG
cfg(metadata_stripesize_CFG, "stripesize", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_STRIPESIZE, vsn(1, 0, 0), NULL, 0, NULL, NULL)
-cfg_array(metadata_dirs_CFG, "dirs", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL,
+cfg_array(metadata_dirs_CFG, "dirs", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL,
"This setting is no longer used.\n")
-cfg_section(metadata_disk_areas_CFG_SUBSECTION, "disk_areas", metadata_CFG_SECTION, CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, vsn(1, 0, 0), vsn(3, 0, 0), NULL, NULL)
-cfg_section(disk_area_CFG_SUBSECTION, "disk_area", metadata_disk_areas_CFG_SUBSECTION, CFG_NAME_VARIABLE | CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, vsn(1, 0, 0), vsn(3, 0, 0), NULL, NULL)
-cfg(disk_area_start_sector_CFG, "start_sector", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL, NULL)
-cfg(disk_area_size_CFG, "size", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL, NULL)
-cfg(disk_area_id_CFG, "id", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, vsn(3, 0, 0), NULL, NULL)
+cfg_section(metadata_disk_areas_CFG_SUBSECTION, "disk_areas", metadata_CFG_SECTION, CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, vsn(1, 0, 0), vsn(2, 3, 0), NULL, NULL)
+cfg_section(disk_area_CFG_SUBSECTION, "disk_area", metadata_disk_areas_CFG_SUBSECTION, CFG_NAME_VARIABLE | CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, vsn(1, 0, 0), vsn(2, 3, 0), NULL, NULL)
+cfg(disk_area_start_sector_CFG, "start_sector", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL, NULL)
+cfg(disk_area_size_CFG, "size", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL, NULL)
+cfg(disk_area_id_CFG, "id", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, vsn(2, 3, 0), NULL, NULL)
cfg(report_output_format_CFG, "output_format", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED | CFG_DISALLOW_INTERACTIVE, CFG_TYPE_STRING, DEFAULT_REP_OUTPUT_FORMAT, vsn(2, 2, 158), NULL, 0, NULL,
"Format of LVM command's report output.\n"
5 years, 5 months
master - lvmlockd: vgchange locktype with yes option
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ea9b2c2122d76b7fbdb...
Commit: ea9b2c2122d76b7fbdb0fb78e854acdf0f80ec87
Parent: d8284beb23f7a81b27e5acb0ecb90d76809df736
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 27 14:38:39 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 27 14:40:24 2018 -0600
lvmlockd: vgchange locktype with yes option
for auto response to yes/no prompt.
---
tools/vgchange.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index e8e302c..0f9241c 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -1045,7 +1045,8 @@ int vgchange_locktype_cmd(struct cmd_context *cmd, int argc, char **argv)
return 0;
}
- if (yes_no_prompt("Forcibly change VG lock type to none? [y/n]: ") == 'n') {
+ if (!arg_is_set(cmd, yes_ARG) &&
+ yes_no_prompt("Forcibly change VG lock type to none? [y/n]: ") == 'n') {
log_error("VG lock type not changed.");
return 0;
}
5 years, 5 months
master - lvmlockctl: wait by default when stopping
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d8284beb23f7a81b27e...
Commit: d8284beb23f7a81b27e5acb0ecb90d76809df736
Parent: 904e1e3d26ccb43c19266e96e67f8c10f93eaaa4
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 27 13:41:33 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Nov 27 13:41:33 2018 -0600
lvmlockctl: wait by default when stopping
lvmlockctl --stop-lockspaces was by default not waiting
for all the lockspaces to be gone.
---
daemons/lvmlockd/lvmlockctl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemons/lvmlockd/lvmlockctl.c b/daemons/lvmlockd/lvmlockctl.c
index 2442b46..0dfc3e6 100644
--- a/daemons/lvmlockd/lvmlockctl.c
+++ b/daemons/lvmlockd/lvmlockctl.c
@@ -24,7 +24,7 @@
static int quit = 0;
static int info = 0;
static int dump = 0;
-static int wait_opt = 0;
+static int wait_opt = 1;
static int force_opt = 0;
static int kill_vg = 0;
static int drop_vg = 0;
5 years, 5 months
master - Place the first PE at 1 MiB for all defaults
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=904e1e3d26ccb43c192...
Commit: 904e1e3d26ccb43c19266e96e67f8c10f93eaaa4
Parent: 2d1152103f8fce4892380f75f59dd5013bcd84d3
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Nov 13 15:00:11 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Nov 26 16:36:50 2018 -0600
Place the first PE at 1 MiB for all defaults
. When using default settings, this commit should change
nothing. The first PE continues to be placed at 1 MiB
resulting in a metadata area size of 1020 KiB (for
4K page sizes; slightly smaller for larger page sizes.)
. When default_data_alignment is disabled in lvm.conf,
align pe_start at 1 MiB, based on a default metadata area
size that adapts to the page size. Previously, disabling
this option would result in mda_size that was too small
for common use, and produced a 64 KiB aligned pe_start.
. Customized pe_start and mda_size values continue to be
set as before in lvm.conf and command line.
. Remove the configure option for setting default_data_alignment
at build time.
. Improve alignment related option descriptions.
. Add section about alignment to pvcreate man page.
Previously, DEFAULT_PVMETADATASIZE was 255 sectors.
However, the fact that the config setting named
"default_data_alignment" has a default value of 1 (MiB)
meant that DEFAULT_PVMETADATASIZE was having no effect.
The metadata area size is the space between the start of
the metadata area (page size offset from the start of the
device) and the first PE (1 MiB by default due to
default_data_alignment 1.) The result is a 1020 KiB metadata
area on machines with 4KiB page size (1024 KiB - 4 KiB),
and smaller on machines with larger page size.
If default_data_alignment was set to 0 (disabled), then
DEFAULT_PVMETADATASIZE 255 would take effect, and produce a
metadata area that was 188 KiB and pe_start of 192 KiB.
This was too small for common use.
This is fixed by making the default metadata area size a
computed value that matches the value produced by
default_data_alignment.
---
configure.ac | 10 --
include/configure.h.in | 3 -
lib/config/config.c | 6 +
lib/config/config.h | 2 +
lib/config/config_settings.h | 62 +++++++-----
lib/config/defaults.h | 15 +++-
lib/format_text/format-text.c | 81 +++++++++-------
lib/metadata/metadata-exported.h | 14 ++--
lib/metadata/metadata.c | 175 +++++++++++++++++++++++++--------
lib/metadata/metadata.h | 7 +-
lib/metadata/pv.h | 4 +-
man/pvcreate.8_des | 87 ++++++++++++++---
man/vgcreate.8_des | 6 +
test/shell/pe-align.sh | 144 +++++++++++++++++++++++++++
test/shell/pvcreate-bootloaderarea.sh | 8 +-
test/shell/pvcreate-usage.sh | 42 +++++---
test/shell/topology-support.sh | 3 +-
tools/args.h | 31 +++---
tools/toollib.c | 5 +-
19 files changed, 526 insertions(+), 179 deletions(-)
diff --git a/configure.ac b/configure.ac
index ffec809..3578f7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1599,15 +1599,6 @@ AC_DEFINE_UNQUOTED(DEFAULT_LOCK_DIR, ["$DEFAULT_LOCK_DIR"],
[Name of default locking directory.])
################################################################################
-dnl -- Setup default data alignment
-AC_ARG_WITH(default-data-alignment,
- AC_HELP_STRING([--with-default-data-alignment=NUM],
- [set the default data alignment in MiB [1]]),
- DEFAULT_DATA_ALIGNMENT=$withval, DEFAULT_DATA_ALIGNMENT=1)
-AC_DEFINE_UNQUOTED(DEFAULT_DATA_ALIGNMENT, [$DEFAULT_DATA_ALIGNMENT],
- [Default data alignment.])
-
-################################################################################
dnl -- which kernel interface to use (ioctl only)
AC_MSG_CHECKING(for kernel interface choice)
AC_ARG_WITH(interface,
@@ -1667,7 +1658,6 @@ AC_SUBST(DEBUG)
AC_SUBST(DEFAULT_ARCHIVE_SUBDIR)
AC_SUBST(DEFAULT_BACKUP_SUBDIR)
AC_SUBST(DEFAULT_CACHE_SUBDIR)
-AC_SUBST(DEFAULT_DATA_ALIGNMENT)
AC_SUBST(DEFAULT_DM_RUN_DIR)
AC_SUBST(DEFAULT_LOCK_DIR)
AC_SUBST(DEFAULT_MIRROR_SEGTYPE)
diff --git a/include/configure.h.in b/include/configure.h.in
index 19c1922..c66b37b 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -45,9 +45,6 @@
/* Name of default metadata cache subdirectory. */
#undef DEFAULT_CACHE_SUBDIR
-/* Default data alignment. */
-#undef DEFAULT_DATA_ALIGNMENT
-
/* Define default node creation behavior with dmsetup create */
#undef DEFAULT_DM_ADD_NODE
diff --git a/lib/config/config.c b/lib/config/config.c
index 2e7e9b6..b3e230d 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -24,6 +24,7 @@
#include "lib/misc/lvm-file.h"
#include "lib/mm/memlock.h"
#include "lib/label/label.h"
+#include "lib/metadata/metadata.h"
#include <sys/stat.h>
#include <sys/mman.h>
@@ -2333,6 +2334,11 @@ int load_pending_profiles(struct cmd_context *cmd)
return r;
}
+int get_default_metadata_pvmetadatasize_CFG(struct cmd_context *cmd, struct profile *profile)
+{
+ return get_default_pvmetadatasize_sectors();
+}
+
const char *get_default_devices_cache_dir_CFG(struct cmd_context *cmd, struct profile *profile)
{
static char buf[PATH_MAX];
diff --git a/lib/config/config.h b/lib/config/config.h
index 4c8ddac..c62ea20 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -311,5 +311,7 @@ int get_default_allocation_cache_pool_chunk_size_CFG(struct cmd_context *cmd, st
const char *get_default_allocation_cache_policy_CFG(struct cmd_context *cmd, struct profile *profile);
#define get_default_unconfigured_allocation_cache_policy_CFG NULL
uint64_t get_default_allocation_cache_pool_max_chunks_CFG(struct cmd_context *cmd, struct profile *profile);
+int get_default_metadata_pvmetadatasize_CFG(struct cmd_context *cmd, struct profile *profile);
+#define get_default_unconfigured_metadata_pvmetadatasize_CFG NULL
#endif
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index f4f626f..1621608 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -352,16 +352,21 @@ cfg(devices_fw_raid_component_detection_CFG, "fw_raid_component_detection", devi
"detection to execute.\n")
cfg(devices_md_chunk_alignment_CFG, "md_chunk_alignment", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MD_CHUNK_ALIGNMENT, vsn(2, 2, 48), NULL, 0, NULL,
- "Align PV data blocks with md device's stripe-width.\n"
- "This applies if a PV is placed directly on an md device.\n")
-
-cfg(devices_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_DATA_ALIGNMENT, vsn(2, 2, 75), NULL, 0, NULL,
- "Default alignment of the start of a PV data area in MB.\n"
- "If set to 0, a value of 64KiB will be used.\n"
- "Set to 1 for 1MiB, 2 for 2MiB, etc.\n")
+ "Align the start of a PV data area with md device's stripe-width.\n"
+ "This applies if a PV is placed directly on an md device.\n"
+ "default_data_alignment will be overriden if it is not aligned\n"
+ "with the value detected for this setting.\n"
+ "This setting is overriden by data_alignment_detection,\n"
+ "data_alignment, and the --dataalignment option.\n")
+
+cfg(devices_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, FIRST_PE_AT_ONE_MB_IN_MB, vsn(2, 2, 75), NULL, 0, NULL,
+ "Align the start of a PV data area with this number of MiB.\n"
+ "Set to 1 for 1MiB, 2 for 2MiB, etc. Set to 0 to disable.\n"
+ "This setting is overriden by data_alignment and the --dataalignment\n"
+ "option.\n")
cfg(devices_data_alignment_detection_CFG, "data_alignment_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DATA_ALIGNMENT_DETECTION, vsn(2, 2, 51), NULL, 0, NULL,
- "Detect PV data alignment based on sysfs device information.\n"
+ "Align the start of a PV data area with sysfs io properties.\n"
"The start of a PV data area will be a multiple of minimum_io_size or\n"
"optimal_io_size exposed in sysfs. minimum_io_size is the smallest\n"
"request the device can perform without incurring a read-modify-write\n"
@@ -369,25 +374,27 @@ cfg(devices_data_alignment_detection_CFG, "data_alignment_detection", devices_CF
"preferred unit of receiving I/O, e.g. MD stripe width.\n"
"minimum_io_size is used if optimal_io_size is undefined (0).\n"
"If md_chunk_alignment is enabled, that detects the optimal_io_size.\n"
- "This setting takes precedence over md_chunk_alignment.\n")
+ "default_data_alignment and md_chunk_alignment will be overriden\n"
+ "if they are not aligned with the value detected for this setting.\n"
+ "This setting is overriden by data_alignment and the --dataalignment\n"
+ "option.\n")
cfg(devices_data_alignment_CFG, "data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(2, 2, 45), NULL, 0, NULL,
- "Alignment of the start of a PV data area in KiB.\n"
- "If a PV is placed directly on an md device and md_chunk_alignment or\n"
- "data_alignment_detection are enabled, then this setting is ignored.\n"
- "Otherwise, md_chunk_alignment and data_alignment_detection are\n"
- "disabled if this is set. Set to 0 to use the default alignment or the\n"
- "page size, if larger.\n")
+ "Align the start of a PV data area with this number of KiB.\n"
+ "When non-zero, this setting overrides default_data_alignment.\n"
+ "Set to 0 to disable, in which case default_data_alignment\n"
+ "is used to align the first PE in units of MiB.\n"
+ "This setting is overriden by the --dataalignment option.\n")
cfg(devices_data_alignment_offset_detection_CFG, "data_alignment_offset_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DATA_ALIGNMENT_OFFSET_DETECTION, vsn(2, 2, 50), NULL, 0, NULL,
- "Detect PV data alignment offset based on sysfs device information.\n"
- "The start of a PV aligned data area will be shifted by the\n"
+ "Shift the start of an aligned PV data area based on sysfs information.\n"
+ "After a PV data area is aligned, it will be shifted by the\n"
"alignment_offset exposed in sysfs. This offset is often 0, but may\n"
"be non-zero. Certain 4KiB sector drives that compensate for windows\n"
"partitioning will have an alignment_offset of 3584 bytes (sector 7\n"
"is the lowest aligned logical block, the 4KiB sectors start at\n"
"LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).\n"
- "pvcreate --dataalignmentoffset will skip this detection.\n")
+ "This setting is overriden by the --dataalignmentoffset option.\n")
cfg(devices_ignore_suspended_devices_CFG, "ignore_suspended_devices", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_IGNORE_SUSPENDED_DEVICES, vsn(1, 2, 19), NULL, 0, NULL,
"Ignore DM devices that have I/O suspended while scanning devices.\n"
@@ -1606,12 +1613,19 @@ cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, CFG
"and allows you to control which metadata areas are used at the\n"
"individual PV level using pvchange --metadataignore y|n.\n")
-cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 0), NULL, 0, NULL,
- "Approximate number of sectors to use for each metadata copy.\n"
- "VGs with large numbers of PVs or LVs, or VGs containing complex LV\n"
- "structures, may need additional space for VG metadata. The metadata\n"
- "areas are treated as circular buffers, so unused space becomes filled\n"
- "with an archive of the most recent previous versions of the metadata.\n")
+cfg_runtime(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_DEFAULT_COMMENTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(1, 0, 0), 0, NULL,
+ "The default size of the metadata area in units of 512 byte sectors.\n"
+ "The metadata area begins at an offset of the page size from the start\n"
+ "of the device. The first PE is by default at 1 MiB from the start of\n"
+ "the device. The space between these is the default metadata area size.\n"
+ "The actual size of the metadata area may be larger than what is set\n"
+ "here due to default_data_alignment making the first PE a MiB multiple.\n"
+ "The metadata area begins with a 512 byte header and is followed by a\n"
+ "circular buffer used for VG metadata text. The maximum size of the VG\n"
+ "metadata is about half the size of the metadata buffer. VGs with large\n"
+ "numbers of PVs or LVs, or VGs containing complex LV structures, may need\n"
+ "additional space for VG metadata. The --metadatasize option overrides\n"
+ "this setting.\n")
cfg(metadata_pvmetadataignore_CFG, "pvmetadataignore", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_PVMETADATAIGNORE, vsn(2, 2, 69), NULL, 0, NULL,
"Ignore metadata areas on a new PV.\n"
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index f3fcb09..fc12626 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -18,8 +18,18 @@
#include "device_mapper/vdo/vdo_limits.h"
-#define DEFAULT_PE_ALIGN 2048
-#define DEFAULT_PE_ALIGN_OLD 128
+
+/*
+ * By default the first PE is placed at 1 MiB.
+ *
+ * If default_data_alignment is 2, then the first PE
+ * is placed at 2 * 1 MiB.
+ *
+ * If default_data_alignment is 3, then the first PE
+ * is placed at 3 * 1 MiB.
+ */
+#define FIRST_PE_AT_ONE_MB_IN_SECTORS 2048 /* 1 MiB in 512 byte sectors */
+#define FIRST_PE_AT_ONE_MB_IN_MB 1
#define DEFAULT_ARCHIVE_ENABLED 1
#define DEFAULT_BACKUP_ENABLED 1
@@ -180,7 +190,6 @@
#define DEFAULT_RECORD_LVS_HISTORY 0
#define DEFAULT_LVS_HISTORY_RETENTION_TIME 0
#define DEFAULT_PVMETADATAIGNORE 0
-#define DEFAULT_PVMETADATASIZE 255
#define DEFAULT_PVMETADATACOPIES 1
#define DEFAULT_VGMETADATACOPIES 0
#define DEFAULT_LABELSECTOR UINT64_C(1)
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 7fba881..92a1495 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -1791,45 +1791,47 @@ static int _text_pv_initialise(const struct format_type *fmt,
struct pv_create_args *pva,
struct physical_volume *pv)
{
- unsigned long data_alignment = pva->data_alignment;
- unsigned long data_alignment_offset = pva->data_alignment_offset;
- unsigned long adjustment, final_alignment = 0;
-
- if (!data_alignment)
- data_alignment = find_config_tree_int(pv->fmt->cmd, devices_data_alignment_CFG, NULL) * 2;
-
- if (set_pe_align(pv, data_alignment) != data_alignment &&
- data_alignment) {
- log_error("%s: invalid data alignment of "
- "%lu sectors (requested %lu sectors)",
- pv_dev_name(pv), pv->pe_align, data_alignment);
- return 0;
- }
+ uint64_t data_alignment_sectors = pva->data_alignment;
+ uint64_t data_alignment_offset_sectors = pva->data_alignment_offset;
+ uint64_t adjustment;
+ uint64_t final_alignment_sectors = 0;
- if (set_pe_align_offset(pv, data_alignment_offset) != data_alignment_offset &&
- data_alignment_offset) {
- log_error("%s: invalid data alignment offset of "
- "%lu sectors (requested %lu sectors)",
- pv_dev_name(pv), pv->pe_align_offset, data_alignment_offset);
- return 0;
+ log_debug("PV init requested data_alignment_sectors %llu data_alignment_offset_sectors %llu",
+ (unsigned long long)data_alignment_sectors, (unsigned long long)data_alignment_offset_sectors);
+
+ if (!data_alignment_sectors) {
+ data_alignment_sectors = find_config_tree_int(pv->fmt->cmd, devices_data_alignment_CFG, NULL) * 2;
+ if (data_alignment_sectors)
+ log_debug("PV init config data_alignment_sectors %llu",
+ (unsigned long long)data_alignment_sectors);
}
+ /* sets pv->pe_align */
+ set_pe_align(pv, data_alignment_sectors);
+
+ /* sets pv->pe_align_offset */
+ set_pe_align_offset(pv, data_alignment_offset_sectors);
+
if (pv->pe_align < pv->pe_align_offset) {
- log_error("%s: pe_align (%lu sectors) must not be less "
- "than pe_align_offset (%lu sectors)",
- pv_dev_name(pv), pv->pe_align, pv->pe_align_offset);
+ log_error("%s: pe_align (%llu sectors) must not be less than pe_align_offset (%llu sectors)",
+ pv_dev_name(pv), (unsigned long long)pv->pe_align, (unsigned long long)pv->pe_align_offset);
return 0;
}
- final_alignment = pv->pe_align + pv->pe_align_offset;
+ final_alignment_sectors = pv->pe_align + pv->pe_align_offset;
- if (pv->size < final_alignment) {
+ log_debug("PV init final alignment %llu sectors from align %llu align_offset %llu",
+ (unsigned long long)final_alignment_sectors,
+ (unsigned long long)pv->pe_align,
+ (unsigned long long)pv->pe_align_offset);
+
+ if (pv->size < final_alignment_sectors) {
log_error("%s: Data alignment must not exceed device size.",
pv_dev_name(pv));
return 0;
}
- if (pv->size < final_alignment + pva->ba_size) {
+ if (pv->size < final_alignment_sectors + pva->ba_size) {
log_error("%s: Bootloader area with data-aligned start must "
"not exceed device size.", pv_dev_name(pv));
return 0;
@@ -1846,15 +1848,23 @@ static int _text_pv_initialise(const struct format_type *fmt,
* But we still want to support a PV with BA only!
*/
if (pva->ba_size) {
- pv->ba_start = final_alignment;
+ pv->ba_start = final_alignment_sectors;
pv->ba_size = pva->ba_size;
if ((adjustment = pva->ba_size % pv->pe_align))
pv->ba_size += pv->pe_align - adjustment;
if (pv->size < pv->ba_start + pv->ba_size)
pv->ba_size = pv->size - pv->ba_start;
pv->pe_start = pv->ba_start + pv->ba_size;
- } else
- pv->pe_start = final_alignment;
+ log_debug("Setting pe start to %llu sectors after ba start %llu size %llu for %s",
+ (unsigned long long)pv->pe_start,
+ (unsigned long long)pv->ba_start,
+ (unsigned long long)pv->ba_size,
+ pv_dev_name(pv));
+ } else {
+ pv->pe_start = final_alignment_sectors;
+ log_debug("Setting PE start to %llu sectors for %s",
+ (unsigned long long)pv->pe_start, pv_dev_name(pv));
+ }
} else {
/*
* Try to keep the value of PE start set to a firm value if
@@ -1864,16 +1874,19 @@ static int _text_pv_initialise(const struct format_type *fmt,
* if possible.
*/
pv->pe_start = pva->pe_start;
+
+ log_debug("Setting pe start to requested %llu sectors for %s",
+ (unsigned long long)pv->pe_start, pv_dev_name(pv));
+
if (pva->ba_size) {
if ((pva->ba_start && pva->ba_start + pva->ba_size > pva->pe_start) ||
- (pva->pe_start <= final_alignment) ||
- (pva->pe_start - final_alignment < pva->ba_size)) {
- log_error("%s: Bootloader area would overlap "
- "data area.", pv_dev_name(pv));
+ (pva->pe_start <= final_alignment_sectors) ||
+ (pva->pe_start - final_alignment_sectors < pva->ba_size)) {
+ log_error("%s: Bootloader area would overlap data area.", pv_dev_name(pv));
return 0;
}
- pv->ba_start = pva->ba_start ? : final_alignment;
+ pv->ba_start = pva->ba_start ? : final_alignment_sectors;
pv->ba_size = pva->ba_size;
}
}
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
index 7f673cd..763b91b 100644
--- a/lib/metadata/metadata-exported.h
+++ b/lib/metadata/metadata-exported.h
@@ -566,20 +566,20 @@ struct vgnameid_list {
* Values used by pv_create().
*/
struct pv_create_args {
- uint64_t size;
- uint64_t data_alignment;
- uint64_t data_alignment_offset;
+ uint64_t size; /* in sectors */
+ uint64_t data_alignment; /* in sectors */
+ uint64_t data_alignment_offset; /* in sectors */
uint64_t label_sector;
int pvmetadatacopies;
- uint64_t pvmetadatasize;
+ uint64_t pvmetadatasize; /* in sectors */
unsigned metadataignore;
/* used when restoring */
struct id id;
struct id *idp;
- uint64_t ba_start;
- uint64_t ba_size;
- uint64_t pe_start;
+ uint64_t ba_start; /* in sectors */
+ uint64_t ba_size; /* in sectors */
+ uint64_t pe_start; /* in sectors */
uint32_t extent_count;
uint32_t extent_size;
};
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 6c71c74..6a0be85 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -41,36 +41,105 @@ static struct physical_volume *_pv_read(struct cmd_context *cmd,
struct volume_group *vg,
struct lvmcache_info *info);
-static int _alignment_overrides_default(unsigned long data_alignment,
- unsigned long default_pe_align)
+/*
+ * Historically, DEFAULT_PVMETADATASIZE was 255 for many years,
+ * but that value was only used if default_data_alignment was
+ * disabled. Using DEFAULT_PVMETADATASIZE 255, pe_start was
+ * rounded up to 192KB from aligning it with 64K
+ * (DEFAULT_PE_ALIGN_OLD 128 sectors). Given a 4KB mda_start,
+ * and 192KB pe_start, the mda_size between the two was 188KB.
+ * This metadata area size was too small to be a good default,
+ * and disabling default_data_alignment, with no other change,
+ * does not imply that the default mda_size or pe_start should
+ * change.
+ */
+
+int get_default_pvmetadatasize_sectors(void)
{
- return data_alignment && (default_pe_align % data_alignment);
+ int pagesize = lvm_getpagesize();
+
+ /*
+ * This returns the default size of the metadata area in units of
+ * 512 byte sectors.
+ *
+ * We want the default pe_start to consistently be 1 MiB (1024 KiB),
+ * (even if default_data_alignment is disabled.)
+ *
+ * The mda start is at pagesize offset from the start of the device.
+ *
+ * The metadata size is the space between mda start and pe_start.
+ *
+ * So, if set set default metadata size to 1024 KiB - <pagesize> KiB,
+ * it will consistently produce pe_start of 1 MiB.
+ *
+ * pe_start 1024 KiB = 2048 sectors.
+ *
+ * pagesizes:
+ * 4096 = 8 sectors.
+ * 8192 = 16 sectors.
+ * 65536 = 128 sectors.
+ */
+
+ switch (pagesize) {
+ case 4096:
+ return 2040;
+ case 8192:
+ return 2032;
+ case 65536:
+ return 1920;
+ }
+
+ log_warn("Using metadata size 960 KiB for non-standard page size %d.", pagesize);
+ return 1920;
}
-unsigned long set_pe_align(struct physical_volume *pv, unsigned long data_alignment)
+#define ONE_MB_IN_SECTORS 2048 /* 2048 * 512 = 1048576 */
+
+void set_pe_align(struct physical_volume *pv, uint64_t data_alignment_sectors)
{
- unsigned long default_pe_align, temp_pe_align;
+ uint64_t default_data_alignment_mb;
+ uint64_t pe_align_sectors;
+ uint64_t temp_pe_align_sectors;
+ uint32_t page_size_sectors;
if (pv->pe_align)
goto out;
- if (data_alignment) {
- /* Always use specified data_alignment */
- pv->pe_align = data_alignment;
+ if (data_alignment_sectors) {
+ /* Always use specified alignment */
+ log_debug("Requested PE alignment is %llu sectors", (unsigned long long)data_alignment_sectors);
+ pe_align_sectors = data_alignment_sectors;
+ pv->pe_align = data_alignment_sectors;
goto out;
}
- default_pe_align = find_config_tree_int(pv->fmt->cmd, devices_default_data_alignment_CFG, NULL);
+ /*
+ * By default the first PE is placed at 1 MiB.
+ *
+ * If default_data_alignment is 2, then the first PE
+ * is placed at 2 * 1 MiB.
+ *
+ * If default_data_alignment is 3, then the first PE
+ * is placed at 3 * 1 MiB.
+ */
+
+ default_data_alignment_mb = find_config_tree_int(pv->fmt->cmd, devices_default_data_alignment_CFG, NULL);
- if (default_pe_align)
- /* align on 1 MiB multiple */
- default_pe_align *= DEFAULT_PE_ALIGN;
+ if (default_data_alignment_mb)
+ pe_align_sectors = default_data_alignment_mb * FIRST_PE_AT_ONE_MB_IN_SECTORS;
else
- /* align on 64 KiB multiple (old default) */
- default_pe_align = DEFAULT_PE_ALIGN_OLD;
+ pe_align_sectors = FIRST_PE_AT_ONE_MB_IN_SECTORS;
- pv->pe_align = MAX((default_pe_align << SECTOR_SHIFT),
- lvm_getpagesize()) >> SECTOR_SHIFT;
+ pv->pe_align = pe_align_sectors;
+ log_debug("Standard PE alignment is %llu sectors", (unsigned long long)pe_align_sectors);
+
+ page_size_sectors = lvm_getpagesize() >> SECTOR_SHIFT;
+ if (page_size_sectors > pe_align_sectors) {
+ /* This shouldn't happen */
+ log_debug("Increasing PE alignment to page size %u sectors", page_size_sectors);
+ pe_align_sectors = page_size_sectors;
+ pv->pe_align = page_size_sectors;
+ }
if (!pv->dev)
goto out;
@@ -79,9 +148,16 @@ unsigned long set_pe_align(struct physical_volume *pv, unsigned long data_alignm
* Align to stripe-width of underlying md device if present
*/
if (find_config_tree_bool(pv->fmt->cmd, devices_md_chunk_alignment_CFG, NULL)) {
- temp_pe_align = dev_md_stripe_width(pv->fmt->cmd->dev_types, pv->dev);
- if (_alignment_overrides_default(temp_pe_align, default_pe_align))
- pv->pe_align = temp_pe_align;
+ temp_pe_align_sectors = dev_md_stripe_width(pv->fmt->cmd->dev_types, pv->dev);
+
+ if (temp_pe_align_sectors && (pe_align_sectors % temp_pe_align_sectors)) {
+ log_debug("Adjusting PE alignment from %llu sectors to md stripe width %llu sectors for %s",
+ (unsigned long long)pe_align_sectors,
+ (unsigned long long)temp_pe_align_sectors,
+ dev_name(pv->dev));
+ pe_align_sectors = temp_pe_align_sectors;
+ pv->pe_align = temp_pe_align_sectors;
+ }
}
/*
@@ -92,31 +168,42 @@ unsigned long set_pe_align(struct physical_volume *pv, unsigned long data_alignm
* (e.g. MD's stripe width)
*/
if (find_config_tree_bool(pv->fmt->cmd, devices_data_alignment_detection_CFG, NULL)) {
- temp_pe_align = dev_minimum_io_size(pv->fmt->cmd->dev_types, pv->dev);
- if (_alignment_overrides_default(temp_pe_align, default_pe_align))
- pv->pe_align = temp_pe_align;
+ temp_pe_align_sectors = dev_minimum_io_size(pv->fmt->cmd->dev_types, pv->dev);
- temp_pe_align = dev_optimal_io_size(pv->fmt->cmd->dev_types, pv->dev);
- if (_alignment_overrides_default(temp_pe_align, default_pe_align))
- pv->pe_align = temp_pe_align;
+ if (temp_pe_align_sectors && (pe_align_sectors % temp_pe_align_sectors)) {
+ log_debug("Adjusting PE alignment from %llu sectors to mininum io size %llu sectors for %s",
+ (unsigned long long)pe_align_sectors,
+ (unsigned long long)temp_pe_align_sectors,
+ dev_name(pv->dev));
+ pe_align_sectors = temp_pe_align_sectors;
+ pv->pe_align = temp_pe_align_sectors;
+ }
+
+ temp_pe_align_sectors = dev_optimal_io_size(pv->fmt->cmd->dev_types, pv->dev);
+
+ if (temp_pe_align_sectors && (pe_align_sectors % temp_pe_align_sectors)) {
+ log_debug("Adjusting PE alignment from %llu sectors to optimal io size %llu sectors for %s",
+ (unsigned long long)pe_align_sectors,
+ (unsigned long long)temp_pe_align_sectors,
+ dev_name(pv->dev));
+ pe_align_sectors = temp_pe_align_sectors;
+ pv->pe_align = temp_pe_align_sectors;
+ }
}
out:
- log_very_verbose("%s: Setting PE alignment to %lu sectors.",
- dev_name(pv->dev), pv->pe_align);
-
- return pv->pe_align;
+ log_debug("Setting PE alignment to %llu sectors for %s.",
+ (unsigned long long)pv->pe_align, dev_name(pv->dev));
}
-unsigned long set_pe_align_offset(struct physical_volume *pv,
- unsigned long data_alignment_offset)
+void set_pe_align_offset(struct physical_volume *pv, uint64_t data_alignment_offset_sectors)
{
if (pv->pe_align_offset)
goto out;
- if (data_alignment_offset) {
+ if (data_alignment_offset_sectors) {
/* Always use specified data_alignment_offset */
- pv->pe_align_offset = data_alignment_offset;
+ pv->pe_align_offset = data_alignment_offset_sectors;
goto out;
}
@@ -128,14 +215,12 @@ unsigned long set_pe_align_offset(struct physical_volume *pv,
/* must handle a -1 alignment_offset; means dev is misaligned */
if (align_offset < 0)
align_offset = 0;
- pv->pe_align_offset = MAX(pv->pe_align_offset, align_offset);
+ pv->pe_align_offset = align_offset;
}
out:
- log_very_verbose("%s: Setting PE alignment offset to %lu sectors.",
- dev_name(pv->dev), pv->pe_align_offset);
-
- return pv->pe_align_offset;
+ log_debug("Setting PE alignment offset to %llu sectors for %s.",
+ (unsigned long long)pv->pe_align_offset, dev_name(pv->dev));
}
void add_pvl_to_vgs(struct volume_group *vg, struct pv_list *pvl)
@@ -1355,10 +1440,10 @@ void pvcreate_params_set_defaults(struct pvcreate_params *pp)
pp->uuid_str = NULL;
pp->pva.size = 0;
- pp->pva.data_alignment = UINT64_C(0);
- pp->pva.data_alignment_offset = UINT64_C(0);
+ pp->pva.data_alignment = 0;
+ pp->pva.data_alignment_offset = 0;
pp->pva.pvmetadatacopies = DEFAULT_PVMETADATACOPIES;
- pp->pva.pvmetadatasize = DEFAULT_PVMETADATASIZE;
+ pp->pva.pvmetadatasize = get_default_pvmetadatasize_sectors();
pp->pva.label_sector = DEFAULT_LABELSECTOR;
pp->pva.metadataignore = DEFAULT_PVMETADATAIGNORE;
pp->pva.ba_start = 0;
@@ -1413,8 +1498,8 @@ struct physical_volume *pv_create(const struct cmd_context *cmd,
unsigned mda_index;
struct pv_list *pvl;
uint64_t size = pva->size;
- unsigned long data_alignment = pva->data_alignment;
- unsigned long data_alignment_offset = pva->data_alignment_offset;
+ uint64_t data_alignment = pva->data_alignment;
+ uint64_t data_alignment_offset = pva->data_alignment_offset;
unsigned pvmetadatacopies = pva->pvmetadatacopies;
uint64_t pvmetadatasize = pva->pvmetadatasize;
unsigned metadataignore = pva->metadataignore;
@@ -1469,6 +1554,10 @@ struct physical_volume *pv_create(const struct cmd_context *cmd,
pv->fmt = fmt;
pv->vg_name = fmt->orphan_vg_name;
+ /*
+ * Sets pv: pe_align, pe_align_offset, pe_start, pe_size
+ * Does not write to device.
+ */
if (!fmt->ops->pv_initialise(fmt, pva, pv)) {
log_error("Format-specific initialisation of physical "
"volume %s failed.", pv_dev_name(pv));
diff --git a/lib/metadata/metadata.h b/lib/metadata/metadata.h
index 164fba2..f578325 100644
--- a/lib/metadata/metadata.h
+++ b/lib/metadata/metadata.h
@@ -358,9 +358,10 @@ struct format_handler {
/*
* Utility functions
*/
-unsigned long set_pe_align(struct physical_volume *pv, unsigned long data_alignment);
-unsigned long set_pe_align_offset(struct physical_volume *pv,
- unsigned long data_alignment_offset);
+
+int get_default_pvmetadatasize_sectors(void);
+void set_pe_align(struct physical_volume *pv, uint64_t data_alignment);
+void set_pe_align_offset(struct physical_volume *pv, uint64_t data_alignment_offset);
int pv_write_orphan(struct cmd_context *cmd, struct physical_volume *pv);
diff --git a/lib/metadata/pv.h b/lib/metadata/pv.h
index 61aa54e..c162acd 100644
--- a/lib/metadata/pv.h
+++ b/lib/metadata/pv.h
@@ -54,8 +54,8 @@ struct physical_volume {
uint64_t pe_start;
uint32_t pe_count;
uint32_t pe_alloc_count;
- unsigned long pe_align;
- unsigned long pe_align_offset;
+ uint64_t pe_align;
+ uint64_t pe_align_offset;
/* This is true whenever the represented PV has a label associated. */
uint64_t is_labelled:1;
diff --git a/man/pvcreate.8_des b/man/pvcreate.8_des
index 1b00e9e..60205c7 100644
--- a/man/pvcreate.8_des
+++ b/man/pvcreate.8_des
@@ -1,21 +1,78 @@
-pvcreate initializes a PV so that it is recognized as belonging to LVM,
-and allows the PV to be used in a VG. A PV can be a disk partition, whole
-disk, meta device, or loopback file.
-
-For DOS disk partitions, the partition id should be set to 0x8e using
-.BR fdisk (8),
-.BR cfdisk (8),
-or a equivalent. For GUID Partition Table (GPT), the id is
-E6D6D379-F507-44C2-A23C-238F2A3DF928. For
-whole disk devices only
-the partition table must be erased, which will effectively destroy all
-data on that disk. This can be done by zeroing the first sector with:
-
-.BI "dd if=/dev/zero of=" PhysicalVolume " bs=512 count=1"
+pvcreate initializes a Physical Volume (PV) on a device so the device is
+recognized as belonging to LVM. This allows the PV to be used in a Volume
+Group (VG). An LVM disk label is written to the device, and LVM metadata
+areas are initialized. A PV can be placed on a whole device or partition.
Use \fBvgcreate\fP(8) to create a new VG on the PV, or \fBvgextend\fP(8)
-to add the PV to existing VG.
+to add the PV to an existing VG. Use \fBpvremove\fP(8) to remove the LVM
+disk label from the device.
The force option will create a PV without confirmation. Repeating the
force option (\fB-ff\fP) will forcibly create a PV, overriding checks that
normally prevent it, e.g. if the PV is already in a VG.
+
+.B Metadata location, size, and alignment
+
+The LVM disk label begins 512 bytes from the start of the device, and is
+512 bytes in size.
+
+The LVM metadata area begins at an offset (from the start of the device)
+equal to the page size of the machine creating the PV (often 4 KiB.) The
+metadata area contains a 512 byte header and a multi-KiB circular buffer
+that holds text copies of the VG metadata.
+
+With default settings, the first physical extent (PE), which contains LV
+data, is 1 MiB from the start of the device. This location is controlled
+by \fBdefault_data_alignment\fP in lvm.conf, which is set to 1 (MiB) by
+default. The pe_start will be a multiple of this many MiB. This location
+can be checked with:
+.br
+.B pvs -o pe_start
+.I PV
+
+The size of the LVM metadata area is the space between the the start of
+the metadata area and the first PE. When metadata begins at 4 KiB and the
+first PE is at 1024 KiB, the metadata area size is 1020 KiB. This can be
+checked with:
+.br
+.B pvs -o mda_size
+.I PV
+
+The mda_size cannot be increased after pvcreate, so if larger metadata is
+needed, it must be set during pvcreate. Two copies of the VG metadata
+must always fit within the metadata area, so the maximum VG metadata size
+is around half the mda_size. This can be checked with:
+.br
+.B vgs -o mda_free
+.I VG
+
+A larger metadata area can be set with --metadatasize. The resulting
+mda_size may be larger than specified due to default_data_alignment
+placing pe_start on a MiB boundary, and the fact that the metadata area
+extends to the first PE. With metadata starting at 4 KiB and
+default_data_alignment 1 (MiB), setting --metadatasize 2048k results in
+pe_start of 3 MiB and mda_size of 3068 KiB. Alternatively, --metadatasize
+2044k results in pe_start at 2 MiB and mda_size of 2044 KiB.
+
+The alignment of pe_start described above may be automatically overriden
+based on md device properties or device i/o properties reported in sysfs.
+These automatic adjustments can be enabled/disabled using lvm.conf
+settings md_chunk_alignment and data_alignment_offset_detection.
+
+To use a different pe_start alignment, use the --dataalignment option.
+The --metadatasize option would also typically be used in this case
+because the metadata area size also determines the location of pe_start.
+When using these two options together, pe_start is calculated as:
+metadata area start (page size), plus the specified --metadatasize,
+rounded up to the next multiple of --dataalignment.
+With metadata starting at 4 KiB, --metadatasize 2048k, and --dataalignment 128k,
+pe_start is 2176 KiB and mda_size is 2172 KiB.
+The pe_start of 2176 KiB is the nearest even multiple of 128 KiB that
+provides at least 2048 KiB of metadata space.
+Always check the resulting alignment and metadata size when using
+these options.
+
+To shift an aligned pe_start value, use the --dataaligmentoffset option.
+The pe_start alignment is calculated as described above, and then the
+value specified with --dataaligmentoffset is added to produce the final
+pe_start value.
diff --git a/man/vgcreate.8_des b/man/vgcreate.8_des
index a2d7161..bc63660 100644
--- a/man/vgcreate.8_des
+++ b/man/vgcreate.8_des
@@ -2,3 +2,9 @@ vgcreate creates a new VG on block devices. If the devices were not
previously intialized as PVs with \fBpvcreate\fP(8), vgcreate will
inititialize them, making them PVs. The pvcreate options for initializing
devices are also available with vgcreate.
+
+When vgcreate uses an existing PV, that PV's existing values for metadata
+size, PE start, etc, are used, even if different values are specified in
+the vgcreate command. To change these values, first use pvremove on the
+device.
+
diff --git a/test/shell/pe-align.sh b/test/shell/pe-align.sh
new file mode 100644
index 0000000..c547188
--- /dev/null
+++ b/test/shell/pe-align.sh
@@ -0,0 +1,144 @@
+
+#!/usr/bin/env bash
+
+# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+test_description='Test pe alignment and metadata sizes'
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+aux prepare_devs 1
+
+# values depend on page size 4K
+
+# In order of strength:
+# --dataalignmentoffset (modifies all below)
+# --dataalignment (overrides all below)
+# devices/data_alignment (overrides all below)
+# devices/data_alignment_offset_detection (overrides all below)
+# devices/md_chunk_alignment (overrides all below)
+# devices/default_data_alignment
+
+pvcreate "$dev1"
+check pv_field "$dev1" pe_start 1.00m
+check pv_field "$dev1" mda_size 1020.00k
+pvremove "$dev1"
+
+# default align at 1m is effective even with smaller requested metadata
+pvcreate --metadatasize 100k "$dev1"
+check pv_field "$dev1" pe_start 1.00m
+check pv_field "$dev1" mda_size 1020.00k
+pvremove "$dev1"
+
+# default first pe doesn't depend on on these two settings
+pvcreate --config 'devices {default_data_alignment=0 data_alignment=0}' "$dev1"
+check pv_field "$dev1" pe_start 1.00m
+check pv_field "$dev1" mda_size 1020.00k
+pvremove "$dev1"
+
+# same as previous
+pvcreate --config 'devices {default_data_alignment=1 data_alignment=0}' "$dev1"
+check pv_field "$dev1" pe_start 1.00m
+check pv_field "$dev1" mda_size 1020.00k
+pvremove "$dev1"
+
+# same as previous
+pvcreate --config 'devices {default_data_alignment=0 data_alignment=1024}' "$dev1"
+check pv_field "$dev1" pe_start 1.00m
+check pv_field "$dev1" mda_size 1020.00k
+pvremove "$dev1"
+
+# same as previous
+pvcreate --config 'devices {default_data_alignment=1 data_alignment=1024}' "$dev1"
+check pv_field "$dev1" pe_start 1.00m
+check pv_field "$dev1" mda_size 1020.00k
+pvremove "$dev1"
+
+# combine above
+pvcreate --metadatasize 100k --config 'devices {default_data_alignment=0 data_alignment=0}' "$dev1"
+check pv_field "$dev1" pe_start 1.00m
+check pv_field "$dev1" mda_size 1020.00k
+pvremove "$dev1"
+
+pvcreate --metadatasize 2048k "$dev1"
+check pv_field "$dev1" pe_start 3072.00k --units k
+check pv_field "$dev1" mda_size 3068.00k --units k
+pvremove "$dev1"
+
+pvcreate --metadatasize 2044k "$dev1"
+check pv_field "$dev1" pe_start 2048.00k --units k
+check pv_field "$dev1" mda_size 2044.00k --units k
+pvremove "$dev1"
+
+pvcreate --metadatasize 2048k --config 'devices {default_data_alignment=2}' "$dev1"
+check pv_field "$dev1" pe_start 4.00m
+check pv_field "$dev1" mda_size 4092.00k --units k
+pvremove "$dev1"
+
+pvcreate --metadatasize 100k --config 'devices {default_data_alignment=2}' "$dev1"
+check pv_field "$dev1" pe_start 2048.00k --units k
+check pv_field "$dev1" mda_size 2044.00k --units k
+pvremove "$dev1"
+
+pvcreate --metadatasize 2048k --dataalignment 128k "$dev1"
+check pv_field "$dev1" pe_start 2176.00k --units k
+check pv_field "$dev1" mda_size 2172.00k --units k
+pvremove "$dev1"
+
+pvcreate --metadatasize 2048k --dataalignment 128k --dataalignmentoffset 2k "$dev1"
+check pv_field "$dev1" pe_start 2178.00k --units k
+check pv_field "$dev1" mda_size 2174.00k --units k
+pvremove "$dev1"
+
+pvcreate --metadatasize 2048k --dataalignment 128k --config 'devices {default_data_alignment=0}' "$dev1"
+check pv_field "$dev1" pe_start 2176.00k --units k
+check pv_field "$dev1" mda_size 2172.00k --units k
+pvremove "$dev1"
+
+pvcreate --metadatasize 2048k --dataalignment 128k --config 'devices {default_data_alignment=2}' "$dev1"
+check pv_field "$dev1" pe_start 2176.00k --units k
+check pv_field "$dev1" mda_size 2172.00k --units k
+pvremove "$dev1"
+
+pvcreate --metadatasize 2048k --config 'devices {default_data_alignment=2 data_alignment=128}' "$dev1"
+check pv_field "$dev1" pe_start 2176.00k --units k
+check pv_field "$dev1" mda_size 2172.00k --units k
+pvremove "$dev1"
+
+pvcreate --bootloaderareasize 256k "$dev1"
+check pv_field "$dev1" mda_size 1020.00k --units k
+check pv_field "$dev1" ba_start 1024.00k --units k
+check pv_field "$dev1" ba_size 1024.00k --units k
+check pv_field "$dev1" pe_start 2048.00k --units k
+pvremove "$dev1"
+
+pvcreate --dataalignment 128k --bootloaderareasize 256k "$dev1"
+check pv_field "$dev1" mda_size 1020.00k --units k
+check pv_field "$dev1" ba_start 1024.00k --units k
+check pv_field "$dev1" ba_size 256.00k --units k
+check pv_field "$dev1" pe_start 1280.00k --units k
+pvremove "$dev1"
+
+pvcreate --dataalignment 128k --metadatasize 256k "$dev1"
+check pv_field "$dev1" mda_size 380.00k --units k
+check pv_field "$dev1" ba_start 0k --units k
+check pv_field "$dev1" ba_size 0k --units k
+check pv_field "$dev1" pe_start 384.00k --units k
+pvremove "$dev1"
+
+pvcreate --dataalignment 128k --metadatasize 256k --bootloaderareasize 256k "$dev1"
+check pv_field "$dev1" mda_size 380.00k --units k
+check pv_field "$dev1" ba_start 384.00k --units k
+check pv_field "$dev1" ba_size 256.00k --units k
+check pv_field "$dev1" pe_start 640.00k --units k
+pvremove "$dev1"
+
diff --git a/test/shell/pvcreate-bootloaderarea.sh b/test/shell/pvcreate-bootloaderarea.sh
index 2e16a5f..cc31812 100644
--- a/test/shell/pvcreate-bootloaderarea.sh
+++ b/test/shell/pvcreate-bootloaderarea.sh
@@ -20,7 +20,7 @@ aux prepare_devs 1
aux lvmconf 'global/suffix=0' 'global/units="b"'
#COMM 'pvcreate sets/aligns bootloader area correctly'
-pvcreate --dataalignment 262144b --bootloaderareasize 614400b "$dev1"
+pvcreate --metadatasize 255s --dataalignment 262144b --bootloaderareasize 614400b "$dev1"
# ba_start must be aligned based on dataalignment
# pe_start starts at next dataalignment multiple
# ba_size is the whole space in between ba_start and pe_start
@@ -33,7 +33,7 @@ dev_size=$(pvs -o pv_size --noheadings "$dev1")
pv_size=$(( dev_size - 1048576 )) # device size - 1m pe_start = area for data
# try to use the whole data area for bootloader area, remaining data area is zero then (pe_start = pv_size)
-pvcreate --bootloaderareasize ${pv_size}b --dataalignment 1048576b "$dev1"
+pvcreate --metadatasize 255s --bootloaderareasize ${pv_size}b --dataalignment 1048576b "$dev1"
check pv_field "$dev1" pe_start $dev_size
check pv_field "$dev1" ba_start 1048576
check pv_field "$dev1" ba_size $pv_size
@@ -44,13 +44,13 @@ grep "Bootloader area with data-aligned start must not exceed device size" err
# restoring the PV should also restore the bootloader area correctly
pvremove -ff "$dev1"
-pvcreate --dataalignment 256k --bootloaderareasize 600k "$dev1"
+pvcreate --metadatasize 255s --dataalignment 256k --bootloaderareasize 600k "$dev1"
vgcreate $SHARED $vg "$dev1"
vgcfgbackup -f "$TESTDIR/vg_with_ba_backup" "$vg"
pv_uuid=$(get pv_field "$dev1" pv_uuid)
vgremove -ff $vg
pvremove -ff "$dev1"
-pvcreate --dataalignment 256k --restorefile "$TESTDIR/vg_with_ba_backup" --uuid "$pv_uuid" "$dev1"
+pvcreate --metadatasize 255s --dataalignment 256k --restorefile "$TESTDIR/vg_with_ba_backup" --uuid "$pv_uuid" "$dev1"
check pv_field "$dev1" ba_start "262144"
check pv_field "$dev1" ba_size "786432"
check pv_field "$dev1" pe_start "1048576"
diff --git a/test/shell/pvcreate-usage.sh b/test/shell/pvcreate-usage.sh
index 0a6f1ea..a61a2c3 100644
--- a/test/shell/pvcreate-usage.sh
+++ b/test/shell/pvcreate-usage.sh
@@ -34,14 +34,6 @@ grep "Metadata area size too small" err
#COMM 'pvcreate accepts metadatasize that is at least the minimum size'
pvcreate --dataalignment ${MDA_SIZE_MIN}b --metadatasize ${MDA_SIZE_MIN}b "$dev1"
-# x. metadatasize 0, defaults to 255
-# FIXME: unable to check default value, not in reporting cmds
-# should default to 255 according to code
-# check pv_field pv_mda_size 255
-#COMM 'pvcreate accepts metadatasize 0'
-pvcreate --metadatasize 0 "$dev1"
-pvremove "$dev1"
-
#Verify vg_mda_size is smaller pv_mda_size
pvcreate --metadatasize 512k "$dev1"
pvcreate --metadatasize 96k "$dev2"
@@ -95,20 +87,17 @@ not pvcreate --labelsector 1000000000000 "$dev1"
#COMM 'pvcreate basic dataalignment sanity checks'
not pvcreate --dataalignment -1 "$dev1"
not pvcreate --dataalignment 1e "$dev1"
-if test -n "$LVM_TEST_LVM1" ; then
-not pvcreate -M1 --dataalignment 1 "$dev1"
-fi
#COMM 'pvcreate always rounded up to page size for start of device'
#pvcreate --metadatacopies 0 --dataalignment 1 "$dev1"
# amuse shell experts
#check pv_field "$dev1" pe_start $(($(getconf PAGESIZE)/1024))".00k"
-#COMM 'pvcreate sets data offset directly'
-pvcreate --dataalignment 512k "$dev1"
+#COMM 'pvcreate sets data alignment directly'
+pvcreate --dataalignment 512K --config 'metadata {pvmetadatasize=255}' "$dev1"
check pv_field "$dev1" pe_start "512.00k"
-#COMM 'vgcreate $SHARED/vgremove do not modify data offset of existing PV'
+#COMM 'vgcreate/vgremove do not modify data offset of existing PV'
vgcreate $SHARED $vg "$dev1" --config 'devices { data_alignment = 1024 }'
check pv_field "$dev1" pe_start "512.00k"
vgremove $vg --config 'devices { data_alignment = 1024 }'
@@ -125,6 +114,31 @@ case "$PAGESIZE" in
*) pv_align="133.00k" ;;
esac
+# pe_start is a multiple of dataalignment, leaving enough
+# space between mda_start and pe_end for the specified
+# metadata size.
+#
+# With page size 4k, mda_start is rounded up start at 4k.
+# The chosen multiple of data alignment (3.5k) is 38:
+# 3.5k * 38 = 133k for pe_start
+# Space available for metadata between mda_start and pe_end is:
+# 133k - 4k = 129k mda size, which is large enough for the
+# specified mda size of 128k.
+#
+# With page size 8k, mda_start is rouned up to start at 8k.
+# The chosen multiple of data alignment (3.5k) is 39:
+# 3.5k * 39 = 136.5k for pe_start
+# Space available for metadata between mda_start and pe_end is:
+# 136.5k - 8k = 128.5k mda size, which is large enough for the
+# specified mda size of 128k.
+#
+# With page size 64k, mda_start is rouned up to start at 64k.
+# The chosen multiple of data alignment (3.5k) is 55:
+# 3.5k * 55 = 192.5k for pe_start
+# Space available for metadata between mda_start and pe_end is:
+# 192.5k - 64k = 128.5k mda size, which is large enough for the
+# specified mda size of 128k.
+
pvcreate --metadatasize 128k --dataalignment 3.5k "$dev1"
check pv_field "$dev1" pe_start $pv_align
diff --git a/test/shell/topology-support.sh b/test/shell/topology-support.sh
index f8526ad..ffd637f 100644
--- a/test/shell/topology-support.sh
+++ b/test/shell/topology-support.sh
@@ -112,7 +112,8 @@ aux prepare_scsi_debug_dev $DEV_SIZE \
check sysfs "$(< SCSI_DEBUG_DEV)" queue/logical_block_size $LOGICAL_BLOCK_SIZE
check sysfs "$(< SCSI_DEBUG_DEV)" queue/optimal_io_size 786432
-aux prepare_pvs 1 $PER_DEV_SIZE
+aux prepare_devs 1 $PER_DEV_SIZE
+pvcreate --metadatasize 255s "${DEVICES[@]}"
# Kernel (3.19) could provide wrong results - in this case skip
# test with incorrect result - lvm2 can't figure out good values.
diff --git a/tools/args.h b/tools/args.h
index 414d7a8..522cccf 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -84,14 +84,16 @@ arg(binary_ARG, '\0', "binary", 0, 0, 0,
"the \"unknown\" value which denotes that the value could not be determined).\n")
arg(bootloaderareasize_ARG, '\0', "bootloaderareasize", sizemb_VAL, 0, 0,
- "Create a separate bootloader area of specified size besides PV's data\n"
- "area. The bootloader area is an area of reserved space on the PV from\n"
- "which LVM will not allocate any extents and it's kept untouched. This is\n"
- "primarily aimed for use with bootloaders to embed their own data or metadata.\n"
+ "Reserve space for the bootloader between the LVM metadata area and the first PE.\n"
+ "The bootloader area is reserved for bootloaders to embed their own data or\n"
+ "metadata; LVM will not use it.\n"
+ "The bootloader area begins where the first PE would otherwise be located.\n"
+ "The first PE is moved out by the size of the bootloader area, and then moved\n"
+ "out further if necessary to match the data alignment.\n"
"The start of the bootloader area is always aligned, see also --dataalignment\n"
- "and --dataalignmentoffset. The bootloader area size may eventually\n"
- "end up increased due to the alignment, but it's never less than the\n"
- "size that is requested. To see the bootloader area start and size of\n"
+ "and --dataalignmentoffset. The bootloader area may be larger than requested\n"
+ "due to the alignment, but it's never less than the requested size.\n"
+ "To see the bootloader area start and size of\n"
"an existing PV use pvs -o +pv_ba_start,pv_ba_size.\n")
arg(cache_long_ARG, '\0', "cache", 0, 0, 0,
@@ -173,14 +175,14 @@ arg(configtype_ARG, '\0', "typeconfig", configtype_VAL, 0, 0,
"Also see \\fBlvm.conf\\fP(5).\n")
arg(dataalignment_ARG, '\0', "dataalignment", sizekb_VAL, 0, 0,
- "Align the start of the data to a multiple of this number.\n"
- "Also specify an appropriate Physical Extent size when creating a VG.\n"
- "To see the location of the first Physical Extent of an existing PV,\n"
- "use pvs -o +pe_start. In addition, it may be shifted by an alignment offset.\n"
- "See lvm.conf/data_alignment_offset_detection and --dataalignmentoffset.\n")
+ "Align the start of a PV data area with a multiple of this number.\n"
+ "To see the location of the first Physical Extent (PE) of an existing PV,\n"
+ "use pvs -o +pe_start. In addition, it may be shifted by an alignment offset,\n"
+ "see --dataalignmentoffset.\n"
+ "Also specify an appropriate PE size when creating a VG.\n")
arg(dataalignmentoffset_ARG, '\0', "dataalignmentoffset", sizekb_VAL, 0, 0,
- "Shift the start of the data area by this additional offset.\n")
+ "Shift the start of the PV data area by this additional offset.\n")
arg(deduplication_ARG, '\0', "deduplication", bool_VAL, 0, 0,
"Controls whether deduplication is enabled or disable for VDO volume.\n"
@@ -488,8 +490,7 @@ arg(pvmetadatacopies_ARG, '\0', "pvmetadatacopies", pvmetadatacopies_VAL, 0, 0,
"The number of metadata areas to set aside on a PV for storing VG metadata.\n"
"When 2, one copy of the VG metadata is stored at the front of the PV\n"
"and a second copy is stored at the end.\n"
- "When 1, one copy of the VG metadata is stored at the front of the PV\n"
- "(starting in the 5th sector).\n"
+ "When 1, one copy of the VG metadata is stored at the front of the PV.\n"
"When 0, no copies of the VG metadata are stored on the given PV.\n"
"This may be useful in VGs containing many PVs (this places limitations\n"
"on the ability to use vgsplit later.)\n")
diff --git a/tools/toollib.c b/tools/toollib.c
index 2ab4b62..6c38eb2 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -4757,8 +4757,11 @@ int pvcreate_params_from_args(struct cmd_context *cmd, struct pvcreate_params *p
}
pp->pva.pvmetadatasize = arg_uint64_value(cmd, metadatasize_ARG, UINT64_C(0));
- if (!pp->pva.pvmetadatasize)
+ if (!pp->pva.pvmetadatasize) {
pp->pva.pvmetadatasize = find_config_tree_int(cmd, metadata_pvmetadatasize_CFG, NULL);
+ if (!pp->pva.pvmetadatasize)
+ pp->pva.pvmetadatasize = get_default_pvmetadatasize_sectors();
+ }
pp->pva.pvmetadatacopies = arg_int_value(cmd, pvmetadatacopies_ARG, -1);
if (pp->pva.pvmetadatacopies < 0)
5 years, 5 months
master - blk_availability service drop lvmetad
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2d1152103f8fce48923...
Commit: 2d1152103f8fce4892380f75f59dd5013bcd84d3
Parent: 4b5d6de86b3fd3a06b913708e477b603627c8614
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Nov 26 14:51:32 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Nov 26 14:51:32 2018 -0600
blk_availability service drop lvmetad
---
.../blk_availability_systemd_red_hat.service.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/blk_availability_systemd_red_hat.service.in b/scripts/blk_availability_systemd_red_hat.service.in
index 9462072..da332c2 100644
--- a/scripts/blk_availability_systemd_red_hat.service.in
+++ b/scripts/blk_availability_systemd_red_hat.service.in
@@ -1,6 +1,6 @@
[Unit]
Description=Availability of block devices
-After=lvm2-activation.service lvm2-lvmetad.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service rbdmap.service
+After=lvm2-activation.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service rbdmap.service
DefaultDependencies=no
Conflicts=shutdown.target
5 years, 5 months
master - pvscan systemd service for event based activation
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4b5d6de86b3fd3a06b9...
Commit: 4b5d6de86b3fd3a06b913708e477b603627c8614
Parent: 229e63b6388ae384fad08dfbf659b360b95753bc
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Nov 26 12:49:39 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Nov 26 14:33:31 2018 -0600
pvscan systemd service for event based activation
The pvscan systemd service for autoactivation was
mistakenly dropped along with the lvmetad related
services.
The activation generator program now looks at the new
lvm.conf setting "event_activation" (default 1) to
switch between event activation and direct activation.
Previously, the old use_lvmetad setting was used to
switch between event and direct activation.
---
configure.ac | 1 +
lib/config/config_settings.h | 9 +++++++++
man/lvm2-activation-generator.8_main | 4 ++--
scripts/Makefile.in | 1 +
scripts/generator-internals.c | 14 +++++++-------
scripts/lvm2-pvscan.service.in | 14 ++++++++++++++
.../lvm2_activation_generator_systemd_red_hat.c | 13 ++++++-------
7 files changed, 40 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8549a80..ffec809 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1828,6 +1828,7 @@ libdm/dm-tools/Makefile
libdm/libdevmapper.pc
man/Makefile
po/Makefile
+scripts/lvm2-pvscan.service
scripts/blkdeactivate.sh
scripts/blk_availability_init_red_hat
scripts/blk_availability_systemd_red_hat.service
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 29ec980..f4f626f 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -997,6 +997,15 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa
"Previously this was always shown as /dev/vgname/lvname even when that\n"
"was never a valid path in the /dev filesystem.\n")
+cfg(global_event_activation_CFG, "event_activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 3, 1), 0, 0, NULL,
+ "Activate LVs based on system-generated device events.\n"
+ "When a device appears on the system, a system-generated event runs\n"
+ "the pvscan command to activate LVs if the new PV completes the VG.\n"
+ "Use auto_activation_volume_list to select which LVs should be\n"
+ "activated from these events (the default is all.)\n"
+ "When event_activation is disabled, the system will generally run\n"
+ "a direct activation command to activate LVs in complete VGs.\n")
+
cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), 0, vsn(3, 0, 0), NULL,
"This setting is no longer used.\n")
diff --git a/man/lvm2-activation-generator.8_main b/man/lvm2-activation-generator.8_main
index 066751d..ba7fd0d 100644
--- a/man/lvm2-activation-generator.8_main
+++ b/man/lvm2-activation-generator.8_main
@@ -8,10 +8,10 @@ lvm2-activation-generator - generator for systemd units to activate LVM volumes
The lvm2-activation-generator is called by \fBsystemd\fP(1) on boot to
generate systemd units at runtime to activate LVM Logical Volumes (LVs)
-when global/use_lvmetad=0 is set in \fBlvm.conf\fP(5). These units use
+when global/event_activation=0 is set in \fBlvm.conf\fP(5). These units use
\fBvgchange -ay\fP to activate LVs.
-If use_lvmetad=1, the lvm2-activation-generator exits immediately without
+If event_activation=1, the lvm2-activation-generator exits immediately without
generating any systemd units, and LVM fully relies on event-based
activation to activate LVs. In this case, event-generated \fBpvscan
--cache -aay\fP commands activate LVs.
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 27fc201..12d37d0 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -84,6 +84,7 @@ install_systemd_generators:
install_systemd_units: install_dbus_service
$(INSTALL_DIR) $(systemd_unit_dir)
+ $(INSTALL_DATA) lvm2-pvscan.service $(systemd_unit_dir)/lvm2-pvscan@.service
ifeq ("@BUILD_DMEVENTD@", "yes")
$(INSTALL_DATA) dm_event_systemd_red_hat.socket $(systemd_unit_dir)/dm-event.socket
$(INSTALL_DATA) dm_event_systemd_red_hat.service $(systemd_unit_dir)/dm-event.service
diff --git a/scripts/generator-internals.c b/scripts/generator-internals.c
index 5acc969..9619e8c 100644
--- a/scripts/generator-internals.c
+++ b/scripts/generator-internals.c
@@ -93,11 +93,11 @@ static bool _close_child(struct child_process *child)
//----------------------------------------------------------------
// Aquiring config from the lvmconfig process
-#define LVM_CONF_USE_LVMETAD "global/use_lvmetad"
-#define LVM_CONF_USE_LVMPOLLD "global/use_lvmpolld"
+#define LVM_CONF_EVENT_ACTIVATION "global/event_activation"
+#define LVM_CONF_USE_LVMPOLLD "global/use_lvmpolld"
struct config {
- bool use_lvmetad;
+ bool event_activation;
bool sysinit_needed;
};
@@ -153,8 +153,8 @@ static bool _parse_line(const char *line, struct config *cfg)
{
const char *val;
- if (_begins_with(line, "use_lvmetad=", &val)) {
- return _parse_bool(val, &cfg->use_lvmetad);
+ if (_begins_with(line, "event_activation=", &val)) {
+ return _parse_bool(val, &cfg->event_activation);
} else if (_begins_with(line, "use_lvmpolld=", &val)) {
bool r;
@@ -170,14 +170,14 @@ static bool _parse_line(const char *line, struct config *cfg)
static bool _get_config(struct config *cfg, const char *lvmconfig_path)
{
static const char *_argv[] = {
- "lvmconfig", LVM_CONF_USE_LVMETAD, LVM_CONF_USE_LVMPOLLD, NULL
+ "lvmconfig", LVM_CONF_EVENT_ACTIVATION, LVM_CONF_USE_LVMPOLLD, NULL
};
bool r = true;
char buffer[256];
struct child_process child;
- cfg->use_lvmetad = false;
+ cfg->event_activation = false;
cfg->sysinit_needed = true;
if (!_open_child(&child, lvmconfig_path, _argv)) {
diff --git a/scripts/lvm2-pvscan.service.in b/scripts/lvm2-pvscan.service.in
new file mode 100644
index 0000000..93fe062
--- /dev/null
+++ b/scripts/lvm2-pvscan.service.in
@@ -0,0 +1,14 @@
+[Unit]
+Description=LVM event activation on device %i
+Documentation=man:pvscan(8)
+DefaultDependencies=no
+StartLimitInterval=0
+BindsTo=dev-block-%i.device
+Before=shutdown.target
+Conflicts=shutdown.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@SBINDIR@/lvm pvscan --cache --activate ay %i
+ExecStop=@SBINDIR@/lvm pvscan --cache %i
diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c
index 5dc39ae..0e6c05a 100644
--- a/scripts/lvm2_activation_generator_systemd_red_hat.c
+++ b/scripts/lvm2_activation_generator_systemd_red_hat.c
@@ -150,12 +150,11 @@ static int generate_unit(struct generator *gen, int unit)
fputs("# Automatically generated by lvm2-activation-generator.\n"
"#\n"
- "# This unit is responsible for direct activation of LVM2 logical volumes\n"
- "# if lvmetad daemon is not used (global/use_lvmetad=0 lvm.conf setting),\n"
- "# hence volume autoactivation is not applicable.\n"
- "# Direct LVM2 activation requires udev to be settled!\n\n"
+ "# This unit is responsible for direct activation of LVM logical volumes\n"
+ "# if event-based activation not used (global/event_activation=0 in\n"
+ "# lvm.conf). Direct LVM activation requires udev to be settled!\n\n"
"[Unit]\n"
- "Description=Activation of LVM2 logical volumes\n"
+ "Description=LVM direct activation of logical volumes\n"
"Documentation=man:lvm2-activation-generator(8)\n"
"SourcePath=/etc/lvm/lvm.conf\n" "DefaultDependencies=no\n", f);
@@ -217,8 +216,8 @@ static bool _run(int argc, const char **argv)
if (!_get_config(&gen.cfg, LVMCONFIG_PATH))
return false;
- if (gen.cfg.use_lvmetad)
- // If lvmetad used, rely on autoactivation instead of direct activation.
+ if (gen.cfg.event_activation)
+ // If event_activation=1, pvscan --cache -aay does activation.
return true;
/* mark lvm2-activation.*.service as world-accessible */
5 years, 5 months
v2_02_78 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3c5add066135a98a5da...
Commit: 3c5add066135a98a5da3369404079cc5927b6ccc
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2018-11-22 16:47 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2018-11-22 16:47 +0000
annotated tag: v2_02_78 has been created
at 3c5add066135a98a5da3369404079cc5927b6ccc (tag)
tagging 6424bd9e6d0f8ecb3ef007c5a7e93f7cf8ffc75f (commit)
replaces v2_02_76
Release 2.02.78
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJb9t3HAAoJELkRJDHlCQOfstYP+gJaUqJHCW3Wo7isNYv0GNnx
KZhWOL+034S73fxKR0YsWA6U5+mphAinufaSVknnUVybDIrMWee4tQZXNZUWikzy
pTKKVU5J2P/UcynYaKFxehelyTfek3p82VXh+d0q4Itbi8MpJYvnCKykPar+elNG
CFxHuxoIttJyeeTgODUCqrg2PFfgtkflZCVvnD8yVjE20KWHne2I+tBsMvqLJUbO
AE3WU0AfbILlj25Z+g2NXZisnwVpNllsjEqEVYwJeZ/Rpg3ZOQSbValMXSPT3vEr
13n3gEtJ8qUW0vMXj/NzAeO4uXVXXtK47Yofb6ZsRyMlepubagNqddCGd+MnNVVw
bhh9yVpAe1zkkowy++IbdfNbR/I8PQtcCQzdmzNjsFeTA+mV7ATX93LqDRpjDDS8
EiI6hNDyV28/9xxoLjJ/JdbMtn35gMshIq7TnV+kBqsPHiud73FB45nbxCF/uoq3
l9Pf9CWfXOGW960qwlcW+DDv+TZXFeBTZixoptZHxvA94Jr1VuFXcZFVSKesv84T
XCvK7f2PX4YxWhR2J2aUxoOJrNvSkw1fM2xW+gpl3lvCiu3tcD5kyRSfDak9ZIRC
JP4I9teJq+Ab2D+oTi1bxADNj8A0+UMYvbWti+hzDCBV2keF55+2yslyJKyGZu2f
9rpUUZcF/1RyQos7OM3i
=+0tW
-----END PGP SIGNATURE-----
Alasdair Kergon (14):
post-release
forgotten to regenerate last time configure.in was updated
Regenerate configure with 'autoreconf' for --enable-ocf. (2.02.76)
Extend cling allocation policy to recognise PV tags (cling_by_tags).
Support repetition of --addtag and --deltag arguments.
Remove tag length restriction and allow / = ! : # & characters.
Fix _output_field crash from field_id free with DEBUG_MEM. (Phillip Susi)
pre-release
post-release
Fix default /etc/lvm permissions to be 0755. (2.02.66)
Suppress 'No PV label' message when removing several PVs without mdas.
Fix memory leak when VG allocation policy in metadata is invalid.
Fix debug logging of derived flag LCK_CACHE in clvmd.
pre-release
Mike Snitzer (1):
Fix "it's" typo to be "its" in lvconvert error message.
Peter Rajnoha (1):
WHATS_NEW FIXME
Petr Rockai (22):
Add generic infrastructure to internal library to 'set' a property.
Implement lvm_vg_set_property() by calling internal 'set' property function.
Add vg_set_property to the interactive lvm2app test program.
Make value.string const char *, in properties.h, to fix a warning introduced by
Add a new type and function to lvm2app to enumerate lvsegs.
Add the macro and specific 'get' functions for lvsegs.
Add lvm2app function to query lvseg properties.
Add a new type and function to lvm2app to enumerate pvsegs.
Add the macro and specific 'get' functions for pvsegs.
Add lvm2app function to query pvseg properties.
Update interactive tests for lvm2app lvseg and pvseg apis.
The _free_vg that is created as a placeholder when reporting segments in pvs
This patch adds helpers to allow users to lookup a lv or pv handle by
This patch adds helpers to allow users to lookup a lv or pv handle by
Add interactive tests for functions to lookup a pv|lv by name|uuid.
All 'size' values of lvm2app properties should be in bytes.
Disallow certain lvconvert operations that need to both allocate and free
Update WHATS_NEW.
Avoid the automatic MISSING_PV recovery path in commands with special
Fix a failing test (it used a combination of lvconvert parameters that is no
Refactor the percent (mirror sync, snapshot usage) handling code to use
What's new.
Zdenek Kabelac (46):
Scan also 'mount' output for mounted filesystem.
Update fsadm regresion
fsadm fix for downsize of unmounted fs
Add date configurable variable DATE
Preserve const for char pointer
Move va_end(ap) so we do not leave with return -1 without calling it.
Move va_end() so it is also used before error path return
Add missing closedir() - fixes resource leak
Do not call dm_task_destroy with NULL
Move arg_vgnames from local scope
Add missing fclose
Fix resource leak of dlopened pointer
Fix memory leak in error path
Add missing destrustion of cmd_context
Cleanup remove test for NULL
Fix check for empty system_dir
Remove printing of LCK_CACHE
Reset vg pointer after release
Remove dead assignment in _lock_for_cluster
Remove dead assignment in lvm2_main
Remove unused 'i' in _pv_analyze_mda_raw
Remove dead assignment in 'main'
Remove dead assignment in dm_tree_node_add_mirror_target_log
Use one fprintf call for usage print
Fix memory leak in error path
Remove dead assignment in _mirror_emit_segment_line
Remove dead assignment in _step_matcher
Remove dead assignment in wait_for_child
Optimize lookup table read
Check reallocated buffer for NULL before use
Replace snprintf with dm_snprintf
Add missing test for failed pool allocation
Remove check for lv is NULL
Add error path stack traces
Add stack trace for error path
Test uuid for NULL
Remove unneeded test for NULL
Fallback to full rescan for missing device
Optimize second call to strchr with same parameters
Check result of vginfo_from_vgname
Add logging for pipe write() and close() error
Test lv_name is not NULL
Log error from unlink failure
Add backtraces for errors
Check lv_info() success
Check str_list_add() success
5 years, 5 months
v2_02_76 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=04c0ec626ec9eff9150...
Commit: 04c0ec626ec9eff915057829169c5b0c16eb5388
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2018-11-22 16:48 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2018-11-22 16:48 +0000
annotated tag: v2_02_76 has been created
at 04c0ec626ec9eff915057829169c5b0c16eb5388 (tag)
tagging ab3b542a188c9dcf1a170b33f5077bcfd1744098 (commit)
replaces v2_02_74
Release 2.02.76
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJb9t3uAAoJELkRJDHlCQOff8MQAOZ5gCw2dyTDcE85GwgKmDMP
tAudeZynRCF4Mrr4sF9egFKIPKd2OLE4PJntmW/5eCZo78WsbJJl+McHCojtkBc+
e2wFTpvgIAyXiKsQbXnAPlmgSn4boZn6Epf1tql6nR7F6GKBJemcDrLz3eIruQDy
zWnsBkpI2O4ngF0aV//Tx0O6j8b4hVTEH9G/Otk5BVprf35fTE53uORqWR9RgtHu
/HMx/jt6twlX96GfEEdy9gISpT88ZF6XGWTzFBB6TSQWjogG/1Iaz+9YtqdAH7qW
qQ2EE/0eMGJxS+1SrFCUrU02GgZZV6op28Wx/yPfnHZfyyM4NeLxnw9dIc79WZxu
gRuzAIdmyztc+r2+/202To20eoxzaqaskEnijf1h0jveqrtZ+IABhSwkUqoX/qif
FluBRbEiJHZBuX5lq47pAINJS81zTVTifsptSvVUQ7jF5qABaUpxaWCXQxWWOkEq
WPamnZG5rY4GHo7k1xBfDk+HghbGX5WWPVQVZV/XyzN8T/xNglz2Y1v/67XP9jKt
IdD5Gq15fOITIeMI9OXQWLNyNoPuZ6CGkHg51EOJuZrJtbUfOPwgwkF5I+kj83jc
L8IVYsWXOQtXBlfFb42D12nvRd6K+dQvHQQmPXFoahWXvSMI6RD9LLEFBVHagbD4
/q6Slqk+TSjOhTAVfHB1
=MAY1
-----END PGP SIGNATURE-----
Alasdair Kergon (18):
Speed up CRC32 calculations by using a larger lookup table.
was renamed
drop an unnecessary 'stack'
Speed up unquoting of quoted double quotes and backslashes.
Add dm_zalloc and use it and dm_pool_zalloc throughout.
Allow CC to be overridden at build time (for 'scan-build make').
Add --setuuid to dmsetup rename.
restrict last checkin to devs consisting entirely of error target
Don't take write lock in vgchange --refresh, --poll or --monitor.
Add global/metadata_read_only to use unrepaired metadata in read-only cmds.
Use a more-generic name for the new kernel flag so list_devices can share it.
fix header #defines
pre-release
post-release
Update VG metadata only once in vgchange when making multiple changes.
Fix regex optimiser not to ignore RHS of OR nodes in _find_leftmost_common.
lost line
pre-release
Dave Wysochanski (42):
Refactor metadata.[ch] into vg.[ch] for vg functions.
Refactor metadata.[ch] into pv.[ch] for pv functions.
Refactor metadata.[ch] into lv.[ch] for lv functions.
Add lib/metadata/pv.[ch] new files.
Add lib/metadata/vg.[ch] and lib/metadata/lv.[ch].
Add {pv|vg|lv}_attr_dup() functions and refactor 'disp' functions.
Simplify logic to create 'attr' strings.
Add id_format_and_copy() common function and call from _uuid_disp.
Add pv_uuid_dup, vg_uuid_dup, and lv_uuid_dup, and call id_format_and_copy.
Add tags_format_and_copy() common function and call from _tags_disp.
Add pv_tags_dup, vg_tags_dup, lv_tags_dup functions that call tags_format_and_copy.
Add supporting functions vg_name_dup, vg_fmt_dup, vg_system_id_dup.
Make generic GET_*_PROPERTY_FN macros and define secondary macro for vg, pv, lv.
Add 'get' functions for vg fields.
Add pv_mda_size, pv_mda_free, and pv_used functions, call from 'disp' functions.
Add pv_name_dup() and pv_fmt_dup() helper functions.
Add pv 'get' functions for all pv properties.
Add pv_get_property and create generic internal _get_property function.
Update WHATS_NEW for commits related to generic property functions
Fix copyright dates on new files lib/metadata/{lv|vg|pv}.[ch].
Rename 'flags' to 'status' for struct metadata_area.
Add some lv 'get' functions that require no refactoring.
Refactor and add code for (lv) 'lv_path' get function.
Refactor and add code for (lv) 'origin_size' get function.
Refactor and add code for (lv) 'move_pv' get function.
Refactor and add code for (lv) 'convert_lv' get function.
Refactor and add code for (lv) 'lv_kernel_{major|minor}' get functions.
Refactor and add code for (lv) 'mirror_log' get function.
Refactor and add code for (lv) 'modules' get function.
update WHATS_NEW
Fix lv_modules_dup segfault.
Refactor and add code for (lv) 'lv_name' get function.
Refactor and add code for (lv) 'lv_origin' get function.
Add lv_read_ahead and lv_kernel_read_ahead 'get' functions.
Rename fields in lvm_property_type.
Add lv_get_property() internal lvm function.
Add 'is_integer' flag into internal lvm_property_type.
Add lvm_vg_get_property() generic vg property function.
Add lvm_pv_get_property() generic function to obtain value of any pv property.
Add lvm_lv_get_property() generic function to obtain value of any lv propert
Add interactive tests for lvm_{pv|vg|lv}_get_property().
Update WHATS_NEW for lvm2app property functions
Jonathan Earl Brassow (1):
Fix for bug 637936: killing both redundant logs causes deadlock
Mike Snitzer (4):
Convey need for snapshot-merge target in lvconvert error message and man
Never scan a device which is using the error target
Explicitly have grep print the matching filenames (needed to
Fix vgchange to process -a, --refresh, --monitor and --poll like lvchange.
Milan Broz (1):
Restrict lvm1 partial mode.
Peter Rajnoha (4):
Fix memory leak of vg_read while using live copies of metadata in directories.
Allocate buffer for reporting functions dynamically to support long outputs.
Use dm_strdup/dm_free instead of strdup/free.
Clarify error messages when activation fails due to activation filter use.
Petr Rockai (30):
test-utils: Fix a slight bug in the dmeventd-already-running error message.
Add an option to skip some tests in make check (regex based, like T=): eg.
Make lvconvert respect --yes/--force in the inactive log conversion
Implement vgextend --restoremissing (BZ 537913), which makes it possible to
Add a test for vgextend --restoremissing.
Update WHATS_NEW.
Give correct error message when creating a too-small snapshot (BZ 587063)
Update WHATS_NEW.
Limit repeated accesses to broken devices.
Update WHATS_NEW.
Tweak the lvm.conf comment about devices/disable_after_error_count.
Tweak WHATS_NEW for devices/disable_after_error_count.
Add a VERBOSE option to make check (make check VERBOSE=1).
Fixes for the devices/disable_after_error_count documentation.
Implement automatic snapshot extension with dmeventd, and add two new options
Update WHATS_NEW.
Avoid an extraneous orphans unlock in vgextend --restoremissing.
Fix a deadlock in clvmd.
Revert some debug statements that slipped in with last checkin.
Implement dmeventd -R, allowing dmeventd to be restarted without losing
Add a test for BZ 509182 (vgchange --monitor y breaks with max_lv).
Reduce a (huge) timeout in t-mirror-names.
Let's rely on the exit code and do not test for empty output.
Use a more generous timeout for dmeventd in t-lvconvert-repair-dmeventd.
Fix a double close in clvmd.
Update WHATS_NEW.
Add a missed test for dmeventd -R.
Alasdair correctly pointed out that if the two closes are concurrent (I haven't
Add code to the dmeventd snapshot plugin to automatically unmount snapshots
Update WHATS_NEW.
Zdenek Kabelac (51):
Add missing cleanup rule for generated .exported_symbols_generated
Maps fix
Fix leaked pool report
Fix memory leak of config_tree
Replace "can not" with "cannot"
Fix a serious bug in the behavior of fasdm tool when breaked.
Correctly respect --dry-run option for fsadm
Support for passing --yes flag recursively.
Fix assignment of default LVM variable
Fix detection of mounted filesystem.
Fix usage of --yes flag for ReiserFS resize
Add support for noninterctive shell execution
Update script for fsadm testing
Skip fsadm testing until proper installation rules are commited in.
Don't use floor() in _bitset_with_random_bits
Fix linking order for liblvm2cmd
Speedup memory un/locking
Update
Fix strict-aliasing compile warning in partition table scanning
Add coverage test for partition table scanning
Fix clang warning for ntohl(*((uint32_t *)buf))
Print vg_name and do not to access vg->name
Ensure we always have origin defined
Reuse result of previous strchr
Fix potential NULL pointer dereference
Fix missing initilisation to 0
Switch to char* arithmetic from void*
Use 'const' struct id *pvid for device_from_pvid()
rom -> from
ok this seems to be never ending story...
Use const pointer for return value of dm_basename
Fix constness warnings
Fix constness warning for _vg_read_by_vgid() uuid usage
Fix constness warning
Fix constness warning
Use const config node
Remove bufused for calculation
Update C declaration () -> (void)
Use static indentifier for internal functions
Instrument compiler about code unreachability
Fix NULL pointer dereference for too large MDA error path
Hotfix usage of __builtin_unreachable()
Macro uninitialized_var gives warnings in static analysis
Add missing return for NULL passed buffer
Return different status code for fsadm check of mounted filesystem
Add DIAGNOSTICS section to fsadm man page.
Use new status code from fsadm check
Use include make.tmpl
Add given user prefix to make target install_initscripts
Add OCF support
Fix include commit and switch to use DISTCLEAN_TARGETS
5 years, 5 months
v2_02_74 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=59310b51f33660f0196...
Commit: 59310b51f33660f0196642c8424a877368e89682
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2018-11-22 16:50 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2018-11-22 16:50 +0000
annotated tag: v2_02_74 has been created
at 59310b51f33660f0196642c8424a877368e89682 (tag)
tagging abf6c8eb4d9c460bc96b2096f2f4abc122972e1e (commit)
replaces v2_02_65
Release 2.02.74
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJb9t5zAAoJELkRJDHlCQOfMycQALJDWKAjm2dFOacVGdw9zxAs
INJS0REM8eHPH3LLcS4vL3NnqLKWOmjH3UIldBaatZpB4i45Z0HQzqqi5w82cM5Z
CnUA2NIzmIpLIDNaVMWn/yiPphDJreKGikeI25NJJ06JCFURFNhU/XN0ClFeY/HW
UR2vQXSO5dq+BLarS8WJ4lAN5lGwNhOUDUJ4pMgsVTgE0uZB+xIt3vTL5quaJ4vY
IKipiHdpssqatFhE92BEfpJffRjPlfvhxgUiSeK3FCDParft1p2v6EO1UsHCsCOX
rmD1K0I6pPF2gz3q1h8MwQv2cGweWgTNOcU/SFY6nL7eE9tBxfYQ+SP++Rg5oZaJ
a2KDwO8Dx81O3TOxoN2D0ZdyEbau6uOBhcavaEO4e7tIU+FJaH8tUVBMAYcaUQ0X
yY8Qva1dlGlQ5hoUAj1PjOBjB7rbQIhK4uDjshHF9GnPlghQQEW6EahLJJVfdHsS
2oidmNG6VkgZbHupsRgIJBXeWbKBw/1/oR7zd4PfEv9nrTxqWilPmrV2qw+/X1Bj
FGrr0WRM+PaQR8PgpHdhuJkO87qj0mqgl5bbP1uLTSEov1wj0u/b/kerN3rHahh8
Ulnh+eXMuC4gNntQRsmOgtbpHXy+wDO4xTNcEfis81DRMtBz4BIKeoxZlB31L7gn
+KMZpvjrUccT+eTsMiXg
=OrON
-----END PGP SIGNATURE-----
Alasdair Kergon (95):
post-release
Use is_orphan_vg in place of hard-coded prefix tests.
Accept orphan VG names as parameters to lock_vol() and related functions.
Note that orphan lock is always obtained last
Validate orphan and VG_GLOBAL lock order too.
Add is_global_vg and split out from is_orphan_vg.
Install lvmconf script by default.
Generate example.conf so default lvm.conf contents can be configured.
Add install_system_dirs makefile target.
Add make install_initscripts
If unable to obtain snapshot percentage leave value blank on reports.
pre-release
backup->cache
Fix $(INSTALL_SCRIPT)
post-release
Update clustered log kernel module name to log-userspace.
Choose between clustered log versions based on kernel version.
Avoid selecting names under /dev/block if there is an alternative.
Replace strncmp kernel version number checks with proper ones
Don't merge unchanged persistent cache file before dumping if tool scanned.
pre-release
post-release
Various cleanups following recent commits.
Add lv_path to reports to offer full /dev pathname.
In some C++ standards, typeof is not reserved.
pre-release
post-release
Update liblvm2app exported symbols.
actually, let's keep these in same order as in header
Generate liblvm2app and libdevmapper exported symbols from header files.
generate liblvm2cmd exported symbols too
Improve various log messages.
pre-release
Only attempt to guarantee 1 mda ignored if there's at least one mda in the vg.
post-release
suppress useless compiler warning
revert that
Update partial mode warning message.
more metadataignore message/code cleanup
more mda ignore cleanups
improve vgmetadatacopies unmanaged message
Fix --[vg]metadatacopies arg processing
Move dmeventd man page from install_lvm2 to install_device-mapper. (1.02.50)
Fix lvm shell crash when input is entirely whitespace. (Xinwei Hu)
Always pass unsuspended dm devices through persistent filter to other filters.
remove unneeded header
Add printf format attributes to yes_no_prompt & dm_{sn,as}printf and fix a calle
Add parentheses to some libdevmapper.h macro arguments.
Randomly select which mdas to use or ignore.
Fix dmlosetup snprintf %llu compiler warning.
pre-release
fix jumbled args in 'Adjusting' message
shorten mesg
s/flags/mda/
fix code in 2nd mda unignore loop to match 1st loop
.
post-release
Adjust auto-metadata repair and caching logic to try to cope with empty mdas.
Remove superfluous fn prototypes.
Fix redundant declarations and always compile with -Wredundant-decls.
Use __attribute__ consistently throughout.
update configure
Fix dm_create_lockfile error paths - incorrectly unlinked in-use lockfile.
.
pre-release
.
day+1
add copyright notices to new files
Change clvmd to communicate with lvm via a socket in /var/run/lvm. (mbroz)
Never use clvmd singlenode unless explicitly requested with -Isinglenode.
post-release
Fix configure to supply DEFAULT_RUN_DIR to Makefiles.
Drop explicit 'Base' version from exported symbols.
Make liblvm.device-mapper wait for include file generation.
Use #include <> not "" in lvm2app.h which gets installed on the system.
Fix exported_symbols generation to use standard compiler arguments.
revert the 'Base' change - that wasn't the cause of the problem
Fix lib.device-mapper to wait for include too
set DEFAULT_RUN_DIR (missed from earlier checkin?)
Remove superfluous NULL pointer tests before dm_free from dmeventd.
Various small cleanups and fixes related to monitoring.
Don't really change monitoring status when in test mode.
Monitor origin -real device below snapshot instead of overlay device. (brassow)
Fix dev_manager_transient to access -real device not snapshot-origin. (brassow)
Allow internal suspend and resume of origin without its snapshots.
Use 'SINGLENODE' instead of 'dead' in clvmd singlenode messages.
Attempt to fix buildbot failure in t-lvconvert-mirror.sh due to failing to
pre-release
post-release
autoreconf also updates configure.h.in
.
Track recursive filter iteration to avoid refreshing while in use. (2.02.56)
Fix name in msg in last checkin.
Replace alloca with dm_malloc in _aligned_io.
pre-release
Dave Wysochanski (100):
Add pvid_from_devname() lvmcache function.
Add lvmcache_vgname_from_pvid().
Add find_vgname_from_{pvname|pvid} functions.
Update pvchange to always obtain a vg handle for each pv to process.
Add lvm2app interfaces to lookup a vgname from a pvid and pvname.
Test lvm_vgname_from_{pvid|device}.
Update WHATS_NEW
Fix warnings with conversion of uuid.
Remove hack in pvchange to unlock orphan VG.
Remove another pvchange hack involving orphan VG names.
Do not fail lvm_init() if init_logging() generates an errno.
Revert _init_rand() to reset errno - restores original init behavior.
Add device name to output of error messages in raw_read_mda_header().
Change 'filler' to 'flags' in on-disk 'raw_locn' structure.
Add text format specific 'rlocn' ignore flag and access functions.
Add location independent flag and functions to ignore mdas.
Move dev_open / dev_close outside _vg_read_raw_area().
Move dev_open/dev_close outside vgname_from_mda().
Allow raw_read_mda_header to be called from text_label.c.
Ensure in-memory state matches on-disk state of mda ignore bit.
Add mda_locns_match() internal library function for mapping pv/device to VG mda.
Add mda location specific mda_copy constructor.
Use vg_mda_count() in vgdisplay.
Rename fid->metadata_areas to fid->metadata_areas_in_use.
Add metadata_areas_ignored list and functions to manage ignored mdas.
Define new functions and vgs/pvs fields related to mda ignore.
Add --metadataignore to pvchange, allowing for ignoring of metadata areas.
Update pvchange, pvs and vgs man pages for metadata ignore.
Implement ignore of mda if bit set by skipping r/w of metadata.
Add mdas_empty_or_ignored() helper function.
Use mdas_empty_or_ignored() in place of checks for empty mda list.
Update _vg_read and _text_create_text_instance to use fid_add_mda[s].
Refactor vg_commit() to add _vg_commit_mdas().
Before committing each mda, arrange mdas so ignored mdas get committed first.
Add tests for phase 1 of metadata balance - manage per-PV ignore bit.
Define vgmetadatacopies in vgchange man page.
Add mda_copies to VG structures and initialization.
Add vg get/set methods for VG metadata copies.
Make vg->mda_copies persistent in on disk vg metadata.
Add vg_mda_copies display field to 'vgs' command.
Update vgchange tool to accept --vgmetadatacopies.
Implement _vg_adjust_ignored_mdas and call from vg_write() path.
Set vg_mda_copies when pvchange --metadataignore is given.
Add --vgmetadatacopies to vgcreate man page, command, and lvm.conf.
Ensure fid mda lists are populated correctly during vgextend.
Update check in vg_split_mdas to account for ignored mdas list.
Update _vgmerge_single() to move fid->metadata_areas_ignored.
Add --vgmetadatacopies to vgsplit man page and command.
Ensure --metadatacopies parameter gets interpreted based on command.
Allow 'all' and 'unmanaged' values for --vgmetadatacopies.
Update example.conf.in to describe vgmetadatacopies.
Update tests to handle phase 2 (vg based) metadata balance.
Fix compile warning in vgchange.c regarding mda_copies initialization.
Update t-covercmd pvck to take proper device argument.
Update WHATS_NEW for --metadataignore and --vgmetadatacopies changes.
Attempt to fix intermittent failure with non-debug configured vgcfgbackup.
Add more initializations of 'mda->flags' field.
Add error message if backup_to_file fails because of empty in_use mdas list.
Move code into pv_change_metadataignore library function.
Add some log_verbose debug statements related to metadataignore.
Improve logging for metadata ignore by printing device name.
Improve logging for setting --vgmetadatacopies.
Add --metadataignore to pvcreate.
Update pvcreate tests for --metadataignore.
Add pvmetadatacopies to lvm.conf and pvcreate man pages.
Add --metadataignore to vgextend and man pages.
Update nightly tests for vgextend --metadataignore.
Update nightly tests for vgextend --metadataignore.
Only attempt to guarantee 1 mda ignored if there's at least one mda in the vg.
Refactor vg_remove_check to place pv removal into separate function.
Check for missing_pv in vg_remove loop.
Update metadata-balance test for --vgmetadatacopies 0.
Minor changes to man pages for --metadataignore.
Test failed commit of mda on new pv - failed vgextend.
Add warning to vgextend and pvchange if metadataignore given on cmdline.
Add prompt if using --metadataignore argument with vgmetadatacopies.
Add --force to pvchange, and allow override of prompt involving metadataignore.
Shorten prompt for pvchange and vgextend.
Init mda->list in mda_copy.
Pass metadataignore to pv_create, pv_setup, _mda_setup, and add_mda.
Remove unnecessary list of includes in liblvm files.
Add log_error when strdup fails in {vg|lv}_change_tag().
Update WHATS_NEW
Update comments about memory handling in lvm2app.h.
More comment updates in lvm2app.h.
Minor man page updates related to metadataignore and vgmetadatacopies.
Clarify help text for vg_mda_count.
Remove unneeded "active" variable in vgchange_monitoring().
Remove irrelevant comments relating to vg_mda_copies.
Add vg_mda_size and vg_mda_free functions.
Add 'flags' field to columns.h and define FIELD_MODIFIABLE.
Remove explicit double quotes from columns.h 'id' entries.
Add macro definitions to report infrastructure for character array length.
Add properties.[ch] to lib/report, defined based on columns.h.
Define GET_NUM_PROPERTY_FN macro to simplify numeric property 'get' functions.
Add implmentation for simple numeric 'get' property functions.
Define GET_NUM_PROPERTY_FN macro to simplify numeric property 'get' functions.
Update WHATS_NEW
Update configure for snitm changes
Update vg_mda_free 'get' function to multiply by SECTOR_SIZE.
Fabio M. Di Nitto (3):
Add dm_create_lockfile to libdm to handle pidfiles for all daemons.
Fix clvmd init script return code when executed as non-root user.
Based on auto-detection or user requested cluster managers for clvmd,
Joe Thornber (19):
Report generators for unit tests and memory checks. Configure with
Move tests from old-tests/regex to unit-tests/regex. unit-tests will
Wire the regex tests up to the reports
Add a unit test for the recent changes to dm_bit_get_next()
[UNIT-TESTS] add test for the recent dm_bitset_equal() function
[UNIT-TEST] test for recent dm_bit_and() function
[REGEX] add a fingerprinting facility to allow test code to compare dfas
[REPORT-GENERATORS] cut down stylsheet.css to what we actually use
[REGEX] another matcher_t test with a larger set of regexes, only interested in the fingerprint
[REGEX] reduce the number of charset nodes that are produced
[REGEX] factor _calc_state() out of _calc_states()
[REGEX] remove the state_queue structure.
[REGEX] calculate dfa states on demand
[REGEX] matcher_t unit test now takes a flag to turn on fingerprinting
[REGEX] add a unit test for regexes containing chars with value over x80
[REGEX] Parse regexes that contain chars with value > 0x80
[REGEX] fix bug in matcher that was causing segfault with chars of 0x80 and over.
[MM] Make valgrind aware of the pool allocators
[REGEX] fix a long standing off-by-one error (found by valgrind-pool)
Jonathan Earl Brassow (26):
daemons/cmirrord/functions.c (part of cmirrord) was referencing
Add error checking for calls to sprintf - it can fail for more
Mirrors can be layered - as in the case of an converting 2-way
The function that runs to compress a stacked mirror after
Committing Taka's patch... He found a problem during
update WHATS_NEW file with entry for simultaneous mirror image and
Fix for bz608048 from Taka...
Fix for bug 607347: failing both redundant mirror log legs...
Finish fix for bug 607347: failing both redundant mirror log legs...
Failed to test for the case where a log was requested to be removed
Fix for bugs: 612248 & 612291 Split mirror issues
Fix for bug 612311: Split of linear provides no error msg
Fix reversal of LV list before performing a split mirror.
Fix for bug 614164: No check for existing name when splitting mirror
It's not enough to check for the kernel module in the case of cluster
Building without the '--enable-cmirrord' option means that
Initial import of document describing LVM's policies
Disallow mirrored logs in cluster mirrors.
Taka's fix for handling failure of all mirrored log devices and
A misunderstanding of the return value of 'dm_bit' has been causing a data
Fix for bug 619221 - log device splitting regression
Fix for bug 612291: dm devices of split off mirror images are not removed
Fix for bug 596453: multiple mirror image failures cause lvm repair...
This patch fixes a potential for I/O to hang and LVM commands
This patch fixes a problem where the mirror polling process
This patch fixes an issue where cluster mirror write I/O
Mike Snitzer (14):
Document 'clear' in dmsetup man page.
Add --type parameter description to the lvcreate man page.
Cleanup sentences of the example provided in the vgimportclone man page
Use more standard naming for PVs and VG in vgimportclone example.
Avoid changing aligned pe_start as a side-effect of very verbose logging.
Require logical volume(s) to be explicitly named for lvconvert --merge.
Require --restorefile when using pvcreate --uuid.
Change default alignment of pe_start to 1MB.
fix t-pvcreate-operation-md.sh to require kernel.org Linux >= 2.6.33 for
Add some v1 to v2 metadata upgrade testing.
Update heuristic used for default and detected data alignment.
Switch to using configure --with-default-data-alignment=<NUM> to
Verify that pvcreate --dataalignment really does override the topology
Make example.conf description for 'default_data_alignment' more generic.
Mikulas Patocka (1):
Fix scripts/relpath.awk to work with mawk
Milan Broz (32):
Replace lvm.conf instead of truncating it.
Use mv -f for replace config in test.
Fix topology test after last changes to not leak loop devices.
Require partial option in lvchange --refresh for partials LVs.
Fix clvmd initscript restart command to start clvmd if not yet running.
Fix restart of clvmd using -S switch
Fix segfault in clvmd -R if no response from daemon received.
Remove C++ private keyword from headers.
Fix lvm2cmd example in documentation.
Clean up cluster lock mode and flags definition.
Fix exit code when requesting help using documented -o help option.
Let running clvmd process time to reexec.
Use flexible data[] in cmirrord request to prevent abort in runtime size checks.
Fix "allocated" warning typo.
Fix clvmd init script status
Fix vgremove to allow removal of VG with missing PVs. (2.02.52)
Remove superfluous suspended device counter from clvmd.
Fix another segfault in clvmd -R if no response from daemon received.
Change the pvcreate swap/md logic
Remove assumption that --yes must be used only in --force mode
Fix file descriptor leak in swap signature detection
Detect LUKS signature in pvcreate
Fix wrong use of LCK_WRITE
Fix pvmove --abort to work even for empty pvmove LV
Fix pvmove --abort <dev> return code
Update configure after last change.
Fix timestamp.
Fix return type qualifier to avoid compiler warning.
Fix previous const removal.
Currently tests require SI units enabled and data alignment to 1MiB.
Do not run singlenode clvmd tests if support for singlenode not compiled in.
Fix handling of partial VG for lvm1 format metadata
Peter Rajnoha (24):
Use expected union semun for arguments in selected semaphore operations.
Fix incorrect memory pool deallocation while using vg_read for files.
Add support for dm-mod module autoload.
Use early udev synchronisation and update of dev nodes for clustered mirrors.
Fix udev rules to handle spurious events properly.
Use "nowatch" udev rule for known inappropriate devices.
Add more verbose messages while checking volume_list and hosttags settings.
Addendum for previous patch - show VG/LV name everywhere so the messages
Revert unsuccessful table load preparation in combined "create, load and resume" scenario.
Add check for kernel semaphore support and disable udev_sync if not available.
Use built-in rules for device aliases: block/ < dm- < disk/ < mapper/ < other.
Recognise and give preference to md device partitions (blkext major).
WHATS_NEW_DM
Reinstate detection of inappropriate uevent with DISK_RO set and suppress it.
Fix udev rules to support udev database content generated by older rules.
dm-mod autoloading support is in kernel 2.6.36 actually.
WHATS_NEW_DM
Fix dm-mod autoloading logic to not assume control node is set correctly.
Reinitialize archive and backup handling on toolcontext refresh.
Add random suffix to archive file names to prevent races when being created.
Use dynamic allocation for metadata's tag buffer (removes 4096 char. limit).
Revert to old glibc behaviour for vsnprintf used in emit_to_buffer function.
"goto_bad" should be used in alloc_printed_tags function, not "goto bad".
Add escape sequence for ':' and '@' found in device names used as PVs.
Petr Rockai (16):
Skip t-pvcreate-operation-md if mdadm fails to create the required device.
Account for mirror transient status when doing lvconvert --repair.
t-lvconvert-repair-transient hangs on .33 and on RHEL6 kernel -> disable
Add a test of wait_for_locks behaviour (adapted from an original by Dave).
Refactor the handles_missing_pv logic in lvchange.
Minor shell style cleanup.
Maintain memlock balance in clvmd.
.
Restore the "removemissing" behaviour of lvconvert --repair --use-policies.
.
Don't fail t-pvcreate-operation-md if mdadm is broken.
Make vgck warn about missing PVs.
Do not create a clustered volume group in t-nomda-missing.
Reduce severity of the "mirror transient status" log message (this was never
Never scan internal LVM devices.
Update WHATS_NEW.
Takahiro Yasui (1):
Fix wrong number of mirror log at allocate policy
Zdenek Kabelac (63):
Return ECMD_FAILED for break in process_each_lv() and process_each_segment_in_lv()
API change for args of process_each_lv_in_vg()
Replicator: libdm support
Replicator: support deactivate of replicator-dev nodes
Replicator: check open_count for parents of presuspend_node
Replicator: base lvm2 support
Replicator: new files for Replicator target
Replicator: check replicator segment
Replicator: extend _lv_each_dependency() with dependencies for Replicator devices
Replicator: extend volume_group with list of VGs and flag
Replicator: add sorted cmd_vg list
Replicator: add find_replicator_vgs
Hmm - fixing cvs import mistake
Right directory name for replicator files.
Remove files from wrong directory
Add toolcontext.h header file.
Replicator: add read and release VGs for rsites
Replicator: use cmd_vg list for _process_one_vg()
Replicator: use cmd_vg for process_each_lv_in_vg()
Replicator: lock_lv_vol() finds missing VGs
Replicator: activate checks for missing vgs
Replicator: update _create_partial_dtree()
Replicator: VG with cmd_missing_vgs does not generate output
Replicator: add replicator to dtree
Replicator: update activate code for vgchange
Update Copyright date for resently modifed files
Fix copy&paste detection of kernel release version.
Use absolute paths in commands
Use INSTALL_DIR to create directories
Fix wrong usage of exec_prefix from previous patch introducing LVM_PATH define
Update WHATS_NEW for last commit
Use "" instead of <> for configure.h and libdevmapper.h
Update lvresize/extend/reduce manpages with --nofsck, --resizefs options
Add man page for dmeventd
Add man pages for lvmconf and unsupported lvmsadc and lvmsar tools.
Adding section number for lvm.conf manpages.
Better WHATS_NEW message - as we still have not fixed 'make exec_prefix' build
Fix typo: premitted -> permitted
Fix typo: "INTERNAL ERROR" -> "INTERNAL_ERROR"
Add few missing information about what is this script doing.
Preload libc locale messages.
Fix typo reported in Debian bugzilla #586043
Cleanups for configure:
Minor optimalization of _test_word.
Do not log backtrace in valid _lv_resume() code path
Small update of memlock debug messages.
Set return value 0 for 'dmsetup -c -o help'
Update for dmsetup
Revert previous commit as it would return also for incorrect syntax.
Fix format string from patch apply mistake
Do not use VPATH in include/Makefile
Visually better align lines which are executed as a result of true
Using count=0 is sufficient for creation of zeroed files.
Add shell function to trim spaces.
Minor speedup of lock test -
Fix return status 0 for "dmsetup info -c -o help".
Clean generated files .exported_symbols_generated, example.conf for distclean.
Wait for node creation before displaying debug info in dmsetup.
Use void parameter for function definition.
Fix constness warning in archive_file structure from archive.c.
Fix const warning in dev_manager_info() and _dev_manager_lv_rmnodes().
Fix 'void*' arithmetic warning in some functions from libdm-iface.c.
Fix 'void*' arithmetic warnings in dbg_malloc.c.
5 years, 5 months
v2_02_65 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c3e6117f097ff1fd792...
Commit: c3e6117f097ff1fd7926b29b05d3a26b4cfe848c
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2018-11-22 16:51 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2018-11-22 16:51 +0000
annotated tag: v2_02_65 has been created
at c3e6117f097ff1fd7926b29b05d3a26b4cfe848c (tag)
tagging 3eb97ffa2589c0ec1932916ecf6fb37f7ceabc9f (commit)
replaces v2_02_42
Release 2.02.65
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJb9t6PAAoJELkRJDHlCQOfoREQALnCd7ktuL//zrj00juXqFU3
LopdRKksLTw6kbmF+VdGKvthnMD4rFaIV2qJycu+SkKBlajQLZi5JgI66AqGmC3D
Pmn+fLErHA0qMIRf+QxUraO8MzulHCepOAYWCBrT4Re0zpdlKBZedhwSHWac6WFa
W6WqURGwQmzJq92Ir6RrAEJ57OXzJFW9254cm95y3OV9GmQlCZSB6GfFMZrtiw83
SoZbga2k11dVlR7NwcOIL90LWzQ0OFqq9LAKXRCwSxV2Bb300EEvUlvAndURm5/1
FWGGwREHrguChQwZs6UgMaEV3awcgGVo2zIDgqLsuPUz7OFK9N8ktt/yQTWN25BW
fVz5VgGuLD7h0i0DWkommRbWETtHD2LAEQtJRAzEKgM4XTuPn1n4Q7lb8ivP5ppp
PFr6FCYDO0HhuLACO25TNBfbp0+Rhy633urvlxXNb31c/FbA/rTQE7qCVlcVBw4I
eZWF889mQCgmFHExQdJFZmSPjgWNGYKKYVW4N+RToOq+/FSyaXcwr0JViU7LXnx5
KW3vBB8DMuzlCgju7yz71dWpWIPxXFBWpUDlMMK6zjoN4/llvXiIB6a5PPswxyfG
JyG89v0z5/yG9lLoLcJg1lWY8wT5kgvD1I+XuvGsDmaj13w2kpws0oBQ7u3012fj
o6u28ppqexnbIA+RElC7
=KHQ4
-----END PGP SIGNATURE-----
Alasdair Kergon (378):
post-release
Use lvm-types.h
Add libdm subdir to begin merging the device-mapper tree.
Split out dm-logging.h from log.h
Split out lvm-logging.h from log.h.
Separate out globals from the logging code.
separate lvm-globals
drop explicit libdevmapper.h
Add dm-logging.h ready for libdevmapper.
remove ancient debian dir
libdevmapper version - will change once the merger's settled in
first attempt at merging configure
autoreconf
drop configure --with-dmdir
dmeventd plugins move
dm+lvm2 macros
no DMDIR
autoreconf
add libdevmapper-event.h
export DM_LIB_VERSION
further progress
autoreconf
Use simple x.y.z library version in libdevmapper.pc
autoreconf
Rename a couple of variables that matched function names.
more tweaking to get things to compile - dmlib.h for log fns, list.h
add list fns
Right, a simple build (without options) is working again.
more tweaks for dmeventd - not finished yet
more missing bits
more fixes
dmeventd
clvmd
make install_device-mapper
quick review of docs
First test release of the merged code base.
no need for libdevmapper.h on system any more
clarify
some makefile fixes for liblvm2cmd & remove some hardcoded .so
post-release (retrospective)
Generate clvmd init script at configuration time for Red Hat-based distros.
regenerate
generate init script
Add tinfo to termcap search path for pld-linux.
Don't skip updating pvid hash when lvmcache_info struct got swapped.
Suppress 'duplicate PV' message when it's only a cache update not a real
Fix uninitialised lv_count in vgdisplay -c
Use dm_snprintf to avoid duplicating the snprintf compatibility code.
lvm2cmdline.h:31: warning: declaration of `is_static' shadows a global declaration
Display a 'dev_size' of zero for missing devices in reports.
Add an "all" field which expands to all fields of the report type.
Add <report_type>_all to help text.
More fields can cause segfaults with orphans.
...and a few more uninitialised dummy fields.
pre-release
Add stuff people missed.
and another one missing
post-release
Rename vg_read() to vg_read_internal(). (mornfall)
Introduce as-yet-unused _vg_lock_and_read() and associated header file
Properly enforce cluster locking in as-yet-unused _vg_lock_and_read. (mornfall)
Replace internal vg_check_status() implementation. (mornfall)
Introduce as-yet-unused replacement vg_read() and vg_read_for_update()
Add as-yet-unused vg_read_error() and vg_might_exist(). (mornfall)
If kernel supports only one dm major number, use in place of any supplied.
Index cached vgmetadata by vgid not vgname to cope with duplicate vgnames. (dwyso)
Mention the restriction on file descriptors at invocation on the lvm man page.
Provide da and mda locations in debug message when writing text format label.
Fix interrupt unblocking after vgcreate, for example: drop_cached_metadata()
Add --dataalignment to pvcreate to specify alignment of data area. (mbroz)
Add system_dir parameter to create_toolcontext() and call it system_dir
Move tools/version.h to lib/misc/lvm-version.h.
Use pkgconfig to obtain corosync library details during configuration. (kabi)
autoreconf (using fedora 10 for this now)
fsadm cleanups & release prep
.
Attempt cleanup in child before execing new binary in exec_cmd()
.
Fix last check-ins: seg can be NULL.
pre-release
post-release
Add missing 'device-mapper' internal subdir build dependency.
fix typo reported by "A. Costa" <agcosta(a)gis.net>
Fix linux configure --enable-debug to exclude -O2.
Add sparse devices: lvcreate -s --virtualoriginsize (hidden zero origin).
better variable name for snapshot counting
Revert:
Missing entries.
Pre-release cleanups.
Reinstate version in liblvm2cmd.so soname. (2.02.44)
Rename liblvm.so to liblvm2app.so and use configure --enable-applib.
post-release
Attempt to load dm-zero module if zero target needed but not present. (mbroz)
0->NULL (mbroz)
Fix counting of virtual origin LVs in vg_validate. (mbroz)
Skip virtual origins in process_each_lv_in_vg(). (mbroz)
Make --snapshot optional with lvcreate --virtualsize.
Suppress 'removed' messages displayed when internal LVs are removed.
Rename internal vorigin LV to match visible LV.
Remove /dev/vgname/lvname symlink automatically if LV is no longer visible.
When creating new LV, double-check that name is not already in use.
Handle multi-extent mirror log allocation when smallest PV has only 1 extent.
Remove verbose 'visited' messages.
Make mempool optional in dm_split_lvm_name()
Add subsystem, vg_name, lv_name, lv_layer fields to dmsetup reports.
Add splitname.
test commit
test commit
test commit
Abort operation if automatic metadata correction in lvconvert fails.
Abort if automatic metadata correction fails when reading VG to update it.
revert last patch - let's do a release first
pre-release
pre-release tidy up
update date
post-release
clarification
Add device number to more log messages during activation.
Fix whitespace in linear target line to fix identical table line detection.
.
Permit several segment types to be registered by a single shared object.
Add dm_log_with_errno and dm_log_with_errno_init, deprecating the old
Fix dev name mismatch in vgcreate man page example.
Make cmd->cmd_line const.
Exclude VG_GLOBAL from vg_write_lock_held so scans open devs read-only again. (mbroz)
pre-release
New LOG_MESG macro to fix file/line number logging for memory leaks after
pre-release clarification
pre-release
post-release
Revert broken commit:
Use log_error macro consistently throughout in place of log_err.
Store any errno and error messages issued while processing each command.
Add lvm_errno and lvm_errmsg to liblvm to obtain failure information.
Add log_errno to set a specific errno and replace log_error in due course.
Fix so only log_error and log_fatal set EUNCLASSIFIED.
Return EINVALID_CMD_LINE not success when invalid VG name format is used.
Add an API version number, LVM_LIBAPI, to the VERSION string.
Use newly-independent LVM_LIBAPI in liblvm soname. E.g. liblvm2app.so.2.1.
fix dir in generated file list for cflow
Add liblvm2app Makefile installation targets.
check in the correct pkgconfig file
All LV locks are non-blocking so remove LCK_NONBLOCK from separate macros.
remove no-longer-needed NONBLOCK
Add global/wait_for_locks to lvm.conf so blocking on locks can be disabled.
pre-release
pre-release
clean up a bit for release
post-release
Remove pv_t, vg_t & lv_t handles from lib. Only liblvm uses them.
renamed include files
Fix lvm2app.pc installation filename.
Fix configure script to handle multiple clvmd selections.
corosync not cman...
Prepare for udev synchronisation code. (options don't work yet)
add not-yet-working udev options
configure --udevdir
Add libdevmapper functions to support synchronisation with udev.
another fixme
Add udevcomplete and --noudevwait to dmsetup.
Set cookies in activation code and wait for udev to complete processing.
dummy makefile for now to keep builds happy
lvchange --noudevsync
deal with error-related FIXMEs
cleanup some ignored return values & 'stack's
Manage without dm_udev_cleanup?
Only create LV symlinks on ACTIVATE not PRELOAD.
Add warnings to check udev did what it was meant to.
Add udev checks.
Add default udev rules.
Add activation/udev_sync to lvm.conf.
detect udev mk_link problems
Additional logging
pre-release
pre-release
post-release
Rewrite clvmd configuration code.
change clogd to cmirrord
rename clogd dir to cmirrord
clogd->cmirrord
Add lots of missing stack debug messages to tools.
More cmirror makefile fixes from Fabio.
pre-release
dm release cleanup
missing (C) reminders
pre-release cleanup
post-release
Remove test/api which should only be under 'make test'.
Update lvm2_monitoring script.
drop -ing suffix
Enable dmeventd monitoring section of config file by default.
Fix dmeventd _temporary_log_fn parameters. (2.02.50)
Handle any path supplied to dm_task_set_name() by looking up in /dev/mapper.
remove unused var & rename fn
ensure dm_strdup succeeds
pre-release
pre-release
missing dm_snprintf
Fix log fn prototype.
post-release
Add global/si_unit_consistency to enable cleaned-up use of units in output.
Treat input units of both 's' and 'S' as 512-byte sectors. (2.02.49)
Consolidate LV allocation into alloc_lv().
Provide alternative implementation of obsolete siginterrupt().
Don't attempt to deactivate an LV if any of its snapshots are in use.
Generalise polldaemon code by changing mirror-specific variable names.
Don't attempt to restart pvmoves when deactivating LVs in vgchange.
look up pvmove by pvmove LV when PVMOVE flag is set
Distinguish between powers of 1000 and powers of 1024 in unit suffixes.
Factor out poll_mirror_progress and introduce progress_t.
Make poll_mirror_progress a function that can be replaced.
Introduce percent_range_t and centralise snapshot full/mirror in-sync checks.
Add percent_range to copy_percent too.
Allow for a build directory separate from the source.
Only include selinux libs in libdevmapper.pc when selinux build enabled.
Correct example.conf to indicate that lvm2 not lvm1 is the default format.
More makefile cleaning up and fixing. (gentoo)
linking parms missing from o->so conversion.
Extra libs must be appended, not defined first.
More build cleanups (linker parameter ordering).
Attempt to build dmeventd.static.
.
Remember to clear 'global lock held during cache refresh' state after use.
Fix clvmd segfault when refresh_toolcontext fails. (brassow, bz 506986)
Cleanup mimagetmp LV if allocation fails for new lvconvert mimage.
Permit snapshots of mirrors. (brassow)
pre-release
add copyright lines
.
post-release
Insert some missing stack macros into activation code.
Fix hash lookup segfault when keys compared are different lengths.
Tidy some uses of arg_count and introduce arg_is_set.
Add support for querying a device's inactive table.
.
pre-release
.
post-release
pre-release
.
Post-release.
Log failure type and recognise type 'F' (flush) in dmeventd mirror plugin.
Internal errors triggering abort cannot be suppressed. (kabi)
Use _LOG_FATAL when aborting on an internal error.
Add missing items to WHATS_NEW files.
.
Revert so-called "redundant" log until after next release.
disable 'redundant' tests
pre-release
post-release
Fix allocation code not to stop at the first area of a PV that fits.
pre-release
Note some problems still to be addressed.
post-release
Misc compilation clean-ups.
Clean up include files.
more build fixes
And more fixes for cmirror build.
Signal handling FIXMEs.
remove no-longer-used files
remove no-longer-used header
remove more compiler warnings
Remove mknod() and add FIXMEs.
Deal with a few more compiler warnings.
Add libdevmapper-event-lvm2.so to serialise dmeventd plugin liblvm2cmd use.
pre-release
fix lib include
missing header
post-release
pre-release
Fix dmeventd snapshot plugin build dependency.
Remove pointless versioned symlinks to dmeventd plugin libraries.
pre-release
post-release
use lvm2app to refer to library now
Extend core allocation code in preparation for mirrored log areas.
Misc cleanups in the new mlock code, incl. improving some variable names
.
some missing debug messages
pre-release
pre-release cleanups
post-release
Introduce is_missing_pv().
Look up missing PVs by uuid not dev_name in _pvs_single to avoid invalid stat.
replace existing_pv with existing_pvl
Remove unnecessary full_scan parameter from get_vgids and get_vgnames calls.
Only do one full device scan during each read of text format metadata.
fix last checkin
Suppress repeated errors about the same missing PV uuids.
autoreconf & add missing WHATS_NEW entry
Fix libdevmapper-event pkgconfig version string to match libdevmapper.
Avoid duplicate definitions.
Allow dynamic extension of array of areas selected as allocation candidates.
Introduce pv_area_used into allocation algorithm and add debug messages.
improve a few comments in last check-in
add debug output and attempt to control which device gets log as intended perhaps
add debug mesgs and attempt to control which device is used for log as perhaps intended
.
add debug mesg
more diagnostics
more diagnostics
Add some assertions to allocation code.
Use INTERNAL_ERROR definition consistently in internal error messages.
.
Allow ALLOC_ANYWHERE to split contiguous areas.
Fix --alloc contiguous policy only to allocate one set of parallel areas.
Attempt to fix non-ALLOC_ANYWHERE allocation code after recent changes broke
remove unused var
Change most remaining log_error WARNING messages to log_warn.
Improve vg_validate to detect some loops in lists.
Improve vg_validate to detect some loops in lists.
Limit number of error messages when checking LV segments.
initialise log_allocated to 0
Avoid endless loop if lv->segments list is corrupted
Try to fix tracking of whether or not log extents need allocating.
temporarily downgrade the 'open while suspended' error till we fix it properly
A few more log_error to log_warn changes for mirrors.
remove compiler warning
Display PVs created during tests
Disable broken test.
Fix is_partitioned_dev not to attempt to reopen device.
disable another broken check in a test
Fix incorrect removal of symlinks after LV deactivation fails.
Issue a message if the new type of deactivation failure happens.
Only fail if the top-level LV fails to be deactivated - allow deactivation
Fix pvmove allocation to take existing parallel stripes into account.
suppress bogus compiler warning
missing ?:
another incorrect test that should have been failing before
And another test that should have been failing - normal allocation policy
Permit mimage LVs to be striped in lvcreate and lvresize.
Don't ignore error if resuming any LV fails in resume_lvs.
Add activation/polling_interval to lvm.conf as --interval default.
Add --stripes to lvconvert too.
Use typedefs for toollib process_each functions.
Only pass visible LVs to tools in cmdline VG name/tag expansions without -a
pre-release
.
pre-release
pre-release
fix broken 'make install' for lvm_dump.sh
touch file
post-release
Change daemon lock filename from lvm2_monitor to lvm2-monitor for consistency.
Speed up dm_bit_get_next with ffs().
Simplify dm_bitset_create. (ejt)
fix last commit
Add dm_bit_and. (ejt)
missed files from last commit
Move function up file
typo in comment
Add dm_bitset_equal to libdevmapper.
Add a regex optimisation pass for shared character prefixes.
add -r to print out closer to original regex format
Still not satisfactory...
isprint
fix leftmost rotation
Fix rightmost rotation, and use LEFT and RIGHT to make symmetry more obvious.
Don't walk rightmost through NULL pointers.
Move regex printing code from test to main tree (may use in debug messages).
avoid ORs rightmost
Cache bitset locations to speed up _calc_states. (kabi)
don't optimise anything with TARGET_TRANS to avoid intefering with the matcher's counting
add comments
Fix lvconvert error message when existing mirrored LV is not found.
Mention how to get PV to LV mappings.
Remove no-longer-used arg_ptr_value.
.
.
change awk path
pre-release
typo
post-release
Fix truncated total size displayed by pvscan.
Fix static build.
Use -d to control level of messages sent to syslog by dmeventd.
pre-release
Christine Caulfield (23):
Fix a starup race in clvmd that could result in huge waits for the first command to be processed.
Add a corosync/DLM cluster service to clvmd.
Mention --with-clvmd=corosync in ./configure
Allow clvmd to be built with all cluster managers & select one on cmdline.
Allow clvmd to start up if its lockspace already exists.
Add option to /etc/sysconfig/cluster to select cluster type for clvmd.
Remove duplicate cpg_initialize from clvmd startup.
Add a fully-functional get_cluster_name() to clvmd corosync interface.
Fix error returns in clvmd-corosync interface to DLM.
Fix unlocks in clvmd-corosync.
Block SIGINT & SIGTERM in clvmd subthreads so they don't delay shutdown.
Make sure clvmd-corosync releases the lockspace when it exits.
Fix clvmd-corosync to match the new corosync API.
Document the -I option to clvmd
Fix locking in clvmd
Fix compilation warning in clvmd.c
Add some code to clvmd to look in the corosync confdb to see what cluster
Stop clvmd from automatically doing lock conversions. Now, if a lock
Add LCK_CONVERT flag I missed on the last checkin.
Make clvmd return 0 on success rather than 1.
Make clvmd -V return zero status rather than 1.
Fix a thread race in clvmd that could cause lockups on very busy systems
Add -S command to clvmd, so it can restart itself and still
Dave Wysochanski (362):
Fix vgdisplay return code and exit status.
Fix lvhange and lvcreate man pages to properly describe permissions option.
Make man pages consistent with either-or options (use "|" everywhere).
More man page cleanup - convert "+/-" to "+|-"
Fix "lvremove -f vgname" when vgname contains snapshots.
Fix vgcreate race which could allow two parallel vgcreates to succeed,
Fix test-utils.h for rhel4 backward compatability.
Add generic function to read /dev/urandom, used in uuid calculation.
Make _init_rand() thread safe - use rand_r() instead of rand().
Add liblvm interactive test infrastructure to build.
Replace _apply_settings() after create_toolcontext() with equivalent inline.
Remove init_debug() calls immediately after create_toolcontext() call.
Remove init_verbose() calls immediately after create_toolcontext() calls.
Remove handles_missing_pvs assignment after call to create_toolcontext().
Move init_test() from _apply_settings into _init_logging().
Remove archive_enable() calls after create_toolcontext() calls.
Remove backup_enable() calls after create_toolcontext() calls.
Remove redundant set_activation() call after create_toolcontext() calls.
Remove redundant init_msg_prefix() and init_cmd_name().
Move initialization of cmd->fmt into init_formats().
*** empty log message ***
Create _init_globals() and call from bottom of create_toolcontext().
Fix segfault when invalid field given in reporting commands.
Rename 'cmd' to 'clvmd_cmd' to remove ambiguity.
Move arg_* functions from toollib.c to lvmcmdline.c.
Remove struct arg * from struct cmd_context and create_toolcontext().
Create global is_static() to eliminate from the library init function.
Add pv_mda_size to 'pvs' and vg_mda_size to 'vgs'.
Add pv_mda_size to pvs and vg_mda_size to vgs.
Fix pvs segfault when run with orphan PV and vg_mda_size or vg_mda_free fields
Fix fsadm lvresize for filesystem block sizes != 1024.
Add skeleton of fsadm nightly test but skip (doesn't work yet).
Rename _parse_options() to _parse_fields() for naming consistency.
Add --rows option to pvs, vgs, lvs man pages.
Add --nameprefixes to pvs, vgs, lvs man pages.
Add missing --segments to pvs man pg.
Add --unquoted to pvs, vgs, lvs man pages.
Rename get_vgs() to get_vgnames() and clarify related error messages.
Move locking_type reading inside init_locking().
Update vgchange and vgmknodes man pages to include --refresh.
Rename liblvm to liblvm-internal.
Add new liblvm build directory and move lvm_base.c.
Move lvm.h from lib to liblvm.
Add DSO generation for new LVM application library.
Remove unnecessary linker flags for liblvm.
Fix liblvm version symlink.
Add missing liblvm/.exported_symbols
Fix error messages when PV uuid or pe_start reading fails.
Remove unnecessary includes in lvm_base.c.
Fix some distclean rules.
Fix some clean rules, fix previous distclean checkin.
Fix whitespace in t-mdata-strings.sh
Add libdevmapper to test/api building.
Remove some trailing whitespace so git won't complain.
Update columns.h comment to describe macro args.
Fix error path in vg_make_handle().
Use liblvm.so instead of .a
Fixup whitespace.
Fixup whitespace.
Update columns.h comment.
Validate chunksize and originsize for snapshots.
Add tests to check vgcreate --physicalextentsize and field vg_extent_size.
Add tests to check pv_mda_size and vg_mda_size.
Update tests for region_size.
Add test for seg_start, seg_count, seg_start_pe
Update t-read-ahead.sh to validate lv_read_ahead and lv_kernel_read_ahead.
Remove NON_BLOCKING lock flag from tools and set a policy to auto-set.
Update test-utils to cope with ":" in device names and allow configurable names.
Add test - lvconvert from linear (on multiple PVs) to mirror.
Add vgrename test to check for existence of new vg.
Add vg_lock_newname() library function.
Update vgrename to use vg_lock_newname.
Update vgcreate to use new vg_lock_newname().
Update vgsplit to use new vg_reserve_newname() function.
Update WHATS_NEW
In the new _vg_read_for_update(), we always do the check for CLUSTERED vg
Cleanup pvs, vgs, and lvs "-o" section in man pages (rhbz 500861).
Convert the straight instances of vg_lock_and_read to new vg_read(_for_update).
Fix incomplete revert for lvconvert.
Convert the straight instances of vg_lock_and_read to new vg_read(_for_update).
Rework the toollib interface (process_each_*) on top of new vg_read.
Convert vgreduce to use vg_read_for_update.
Convert vgrename to vg_read_for_update.
Don't segfault in vg_release when vg->cmd is NULL.
Convert vgsplit to use vg_read_for_update.
Add lvmcache_init() to polldaemon initialization.
Fix t-inconsistent-metadata.sh.
Update WHATS_NEW for vg_read commits
Fix vg_read() error paths to properly release upon vg_read_error().
Fix compile warning in lvmcmdline.c - use C99 PRIu64 for uint64_t.
Remove LOCK_KEEP and READ_CHECK_EXISTENCE from vgsplit.
Remove unneeded LOCK_KEEP from vg_read() interface.
Remove READ_CHECK_EXISTENCE and vg_might_exist().
Remove unneeded LOCK_NONBLOCKING from vg_read() API.
Update WHATS_NEW for vgread cleanup
Make destroy_toolcontext() better able to handle NULL pointers.
Fix segfault in persistent_filter_dump() if lvm init fails.
Add t-lvm-init.sh - test lvm init routines and error paths.
Refactor a couple log_error() statements in prep for larger log_error() patch.
Make exit paths more robust when some init function fails.
.
Fix memory leak in vgsplit when re-reading the VG.
Update t-vgcreate-usage.sh to check for default vg properties.
Add defines for default vgcreate parameters.
Update vg_change_pesize() to contain all validity checks.
Remove unused 'cmd' from vg_change_pesize().
Rename vg_change_pesize to vg_set_extent_size and use vg_t.
Add vg_set_max_lv() liblvm function and move vgchange logic inside.
Add vg_set_max_pv() liblvm function and move vgchange logic inside.
Add vg_set_alloc_policy() liblvm function and move vgchange logic inside.
Change vg_create() to take only minimal parameters and obtain a lock.
Update WHATS_NEW for recent vgcreate changes
Remove unnecessary parameters from vg_remove_single().
Remove force parameter from vg_remove_single, now the liblvm function.
Move orphan lock inside vg_remove_single.
Move orphan lock obtain/release inside vg_extend().
Change lock ordering of vgcfgrestore to be consistent with other tools.
Update WHATS_NEW for vgremove and ORPAHN_LOCK refactoring
Remove unused code vg_lock_and_read() and related flags.
Remove READ_REQUIRE_RESIZEABLE from vgextend by moving check inside vg_extend.
Refactor vgsplit - move move_pvs_used_by_lv and move_pv inside library.
Remove READ_REQUIRE_RESIZEABLE flag from vgsplit.
Remove READ_REQUIRE_RESIZEABLE flag from vg_read() interface - no users.
Define handles to liblvm objects for pv, vg, lv, lvseg, pvseg.
Add default cmd->cmd_line initialization for liblvm lvm_create().
Add lvm_vg_* APIs to create and modify VGs.
Add VG APIs to liblvm/.exported_symbols.
Add liblvm test case for creating of a vg.
Add a few negative tests which should fail cleanly if pv, vg, lvs don't exist.
Fix vgck and vgremove segfault if non-existent vg given.
Fix pvremove test breakage.
Fix FAILED_INCONSISTENT case in vg_backup_single - typeo on 'if' condition.
Check for certain vg_read errors in _process_one_vg iterator.
Fix memory leak in _process_one_vg error path.
Fix memory leak in process_each_pv path.
Change default errno value to 0 (no error) and add prototypes in lvm.h
Remove extraneous messages for extent_size and alloc_policy upon vgcreate.
Remove 'is already' message from vg_set_* functions.
Fix compile warnings in vgcreate liblvm api unit test case.
Rename test/api/vgcreate.c to vgtest.c to reduce filename conflicts in tree.
Fix build environment of test/api: Make it usable for more than one test case.
Export lvm_errno and lvm_errmsg in liblvm.
Fix lvm_vg_close() when locking fails.
Update test/api/vgtest.c to use lvm_errno and lvm_errmsg.
Update api/test/vgtest.c error handling.
Add lvm_vg_open() to open an existing VG for reading or writing.
Add a couple lvm_vg_open() calls to vgtest.c.
Update lvm_vg_create to use NULL / non-NULL return for the time being.
Remove lvseg_t and pvseg_t typedefs from liblvm/lvm.h.
Add list structure definitions for liblvm objects.
Add lvm_vg_list_{pvs|lvs} - return lists of pv/lv handles for a vg.
Add lvm_{pv|vg|lv}_get_{uuid|name}.
Update test/api/test.c for simple tests involving pv/vg/lv name/uuid attributes.
Update WHATS_NEW for liblvm commits
Update test/api/test.c to not segfault if null lists of pvs/lvs returned.
Remove redundant validate_name in vgreduce.
Add lvm_list_vg_names and lvm_list_vg_ids liblvm functions.
Add lvm_scan_vgs liblvm fn to scan the system for LVM metadata.
Add tests for lvm_vg_name_list, lvm_vg_id_list and lvm_scan_vgs.
Revert previous patch that moved VG_ORPHAN lock inside vg_extend.
Update lvm_vg_extend() to obtain VG_ORPHAN.
Eliminate compile warning introduced by previous commit.
Remove unneeded pv_create wrapper function.
Move bulk of pvcreate logic into library.
Allow pvcreate_single to be called with NULL for default pvcreate params.
Change pvcreate_single to return pv_t and update function description.
Move ORPHAN_VG lock outside pvcreate_single.
Update lvm_vg_extend to do an implicit pvcreate on the device.
Remove use of void * from pvcreate_single.
Refactor _lvcreate - move *_ARG into _lvcreate_params and get 'cmd' from 'vg'.
Refactor extents calculations / updates in _lvcreate.
Move percent_t from struct lvcreate_params to struct lvcreate_cmdline_params.
Move 'size' from lvcreate_params into lvcreate_cmdline_params.
Comment lvcreate_params struct.
Move pvs and pv_count fields from lvcreate_params to lvcreate_cmdline_params.
Move _lvcreate into the internal library and rename to lv_create_single.
Move extents_from_size from lvcreate into internal library so we can reuse.
Add lvm_vg_create_lv_linear liblvm function.
Update test/api/test.c to handle read/write open modes.
Update test/api/test.c to call lvm_vg_create_lv_linear.
Update WHATS_NEW for recent checkins
Rename vg_size to vgsize to avoid naming conflicts.
Refactor a few report field calculations into separate functions.
Use vg_size in vg_set_extent_size.
Add most all liblvm 'get' functions needed for anaconda.
Update test/api/test.c for liblvm 'get' functions.
Update test/api/test.c - correct list_vg_names and list_vg_ids.
Add lvm_vg_remove_lv liblvm function.
Update test/api/test.c to call lvm_lv_remove.
Rename lvm_vg_get_free_count to lvm_vg_get_free_extent_count.
Rename lvm_list_vg_ids to lvm_list_vg_uuids.
Rename lvm_vg_get_free to lvm_vg_get_free_size.
Update lvm.h handle and handle list comments.
Update lvm.h - comments describing function behavior, divide into sections.
Rename lvm_scan_vgs to lvm_scan.
A few more lvm.h updates that got missed.
Update liblvm status return codes to be consistent.
Update a few liblvm calls with log_errno.
Update test/api/*.c to use consistent liblvm error returns.
Implement lvm_lv_activate and lvm_lv_deactivate liblvm calls.
Add lvm_lv_is_active and lvm_lv_is_suspended.
Update test/api/test.c to call lv_deactivate and lv_activate.
Update test/api/test.c to display lvm_lv_is_active and lvm_lv_is_suspended.
Update WHATS_NEW for latest liblvm changes
More liblvm header file cleanups.
Update display.c to use vg_free(vg) instead of duplicating the calculation.
Rename lvm_reload_config to lvm_config_reload.
Update error return and comments for lvm_list_vg_names/uuids.
Add vg_reduce to metadata.c and metadata-exported.h
Add lvm_vg_reduce to liblvm2app
Update test/api/vgtest.c to include lvm_vg_reduce.
Update test/api/test.c to include lvm_vg_reduce and lvm_vg_extend.
Add skeletons of lvm_lv_resize and lvm_pv_resize - not yet implemented.
Refactor _override_settings to take the new config string as input.
Rename _override_settings into override_config_tree_from_string and move.
Add lvm_config_override - allow caller to override config, similar to --config.
Update return code for lvm_config_reload.
Add config_reload and config_override to test.c, change prompt.
Remove unnecessary
's from log_error in liblvm.
Update WHATS_NEW for latest liblvm changes
Add warning to lvm.h stating API development in progress.
Update lvm.h to address feeback.
Rename lvm_create to lvm_init and lvm_destroy to lvm_quit.
Use dm_malloc and dm_free in liblvm instead of malloc/free.
Add lvm_library_get_version() and update unit tests to display version.
Fix lvm.h formatting.
Update lvm.h - remove remaining FIXMEs, note limitations of a few functions.
Add lvm_vg_get_seqno, updating lvm.h and unit test.
Update interactive unit test for liblvm - add vg_write, general cleanup.
Update interactive unit test - fix silly vg_close error.
Add an open_mode to the vg struct for liblvm - enforce read / write semantics.
Add doxygen mainpage tag to lvm.h
Remove unneeded struct on return from lvm_lv_create_linear.
Don't include lvm-version.h in exported liblvm file!
Move FIXME from user visible lvm2app.h to lvm_vg.c
Update test/api/test.c to call lvm_vg_create and lvm_vg_remove.
Remove useless _pv_write wrapper.
Update man pages to clarify usage of PE ranges.
Fix vgextend error path - if ORPHAN lock fails, unlock and release vg.
Update WHATS_NEW for recent checkins.
Make lvm2app vg_t handle definition consistent with lvm_t.
Make lvm2app lv_t handle definition consistent with lvm_t.
Make lvm2app pv_t handle definition consistent with lvm_t.
Update WHATS_NEW
Fix error paths for vgcfgrestore when locking fails.
Add alphabetical vgname ordering tests for vgsplit, vgmerge, vgrename.
Fix vgsplit test to require -M on ordering of vgnames.
Refactor vgsplit to move existing_vg logic in a separate 'if' statement.
Refactor vgsplit - remove bad2 label.
Refactor vgsplit - add 'lock_vg_from_first' flag.
Refactor vgsplit - create _vgsplit_to function which creates or opens dest vg.
Refactor vgsplit - create _vgsplit_from function to open source vg.
Refactor vgsplit: _vgsplit_from or _vgsplit_to failure cleanup depends on order.
Refactor vgsplit - reorder _vgsplit_from and _vgsplit_to based on flag.
Change vgsplit behavior to open/lock first vg based on alphabetical ordering.
Refactor vgmerge - introduce lock_vg_from_first flag.
Refactor vgmerge - create _vgmerge_from and _vgmerge_to.
Refactor vgmerge - combine _vgmerge_to and _vgmerge_from into _vgmerge_vg_read.
Change vgmerge behavior to open/lock first vg based on alphabetical ordering.
Refactor vgrename into vg_rename_old and vg_rename_new.
Update vgrename to take into account vgname lock ordering.
Enforce an alphabetical lock ordering for vgname locks.
Rename internal library function vg_remove to vg_remove_mdas.
Split vg_remove_single into 2 functions - the second part commits to disk.
Update vg_remove_single_* functions to use the removed_pvs list.
Update lvm_vg_write() to handle the deferred commit of lvm_vg_write().
Update lvm2app vgtest to take vgname and devices as parameters.
Restore umask when device node creation fails.
Add lvm2app.sh to nightly testsuite.
Remove 'test' interative api unit tests from 'TARGET' line.
Fix path to test/api/vgtest in nightly testsuite.
Add daemons/cmirrord files to git - somehow got messed up with cvs rename.
Restore umask when device node creation fails.
Add lvm2app.sh to nightly testsuite.
Remove 'test' interative api unit tests from 'TARGET' line.
Fix path to test/api/vgtest in nightly testsuite.
Update lvm2app unit test vgtest - fix remove bug.
Add max_pv and max_lv vg 'get' lvm2app exports.
Update lvm and vgs man pages to clarify 'partial' is a VG missing PVs.
Add most relevant vg_attr fields as lvm2app 'get' functions.
Use vg_is_exported(vg) macro everywhere.
Fix build failure when enabling dmeventd and applib.
Fix process_each_vg / _process_one_vg when vg_read() returns FAILED_LOCKING.
Add vg_is_resizeable() and cleanup references.
Fix lvm2app test to run under test/api subdirectory only when configured.
Trivial cleanup to lvcreate man page - use virtualsize in example.
Update nightly tests to deal with unit changes.
Refactor vg_extend - add vg_extend_single_pv.
Add pvcreate_params to vg_extend_single_pv.
Add pvcreate_params to vg_extend.
Allow calling fill_default_pvcreate_params from tools.
Refactor pvcreate - split pvcreate_validate_params into recovery/non-recovery.
Refactor vgcreate/vgextend validation of vgname/pvname(s).
Move pvcreate_validate_params into toollib to allow calling from mutiple tools.
Add implicit pvcreate support to vgcreate and vgextend.
Update vgcreate and vgextend man pages to clarify implicit pvcreate.
Add implicit tests for implicit pvcreate during vgcreate and vgextend.
Update help messages for vgextend / vgcreate to mention PHYSICAL DEVICE OPTIONS.
Add --pvmetadatacopies as a synonym for --metadatacopies in various commands.
Add --pvmetadatacopies as a synonym for --metadatacopies in various commands.
Cleanup comment and some whitespace.
Minor fix to vgcreate/vgextend man pages for PHYSICAL DEVICE OPTIONS.
Update lvcreate/lvconvert man pages to explain PhysicalVolume parameter.
Document --all option in man pages, cleanup {pv|vg|lv}{s|display} man pages.
Add to vgcreate and vgextend nightly tests.
Add vg_mda_count library function.
Add vg_set_clustered() - move logic from vgchange.
Update vgcreate to call vg_set_clustered().
Update vgsplit to call vg_set_clustered().
Rename pvcreate_params processing functions to better match <object><action>.
Add vgcreate_params_set_defaults().
Rename fill_vg_create_params to vgcreate_params_set_from_args.
Rename validate_vg_create_params to vgcreate_params_validate.
Remove old, and now incorrect, vgextend man page description of pvcreate options.
Remove unnecessary / duplicate dm_list macros and functions.
Fix setting of readahead in lvcreate.
Add tests to check for readahead value in lvcreate.
Update a few more uint64_t's related to the 64-bit status change.
Fix activated/deactivated log_verbose message
Correct 'void *' usage in pvcreate_single.
Remove useless memory allocation for pv->vg_name in _alloc_pv().
Call _alloc_pv() inside _pv_read() and clean up error paths.
Remove unnecessary "dmsetup resume" after "dmsetup create".
Add copy constructor for struct metadata_area.
Fix off by 512 sizes for lvm2app.
Export lvm_pv_get_size(), lvm_pv_get_free(), lvm_pv_get_dev_size in lvm2app.
Update simple lvm2app unit test for new size apis.
Update lvm2app.h comments to remove hidden VG comment list vgnames/vgids.
Add get_{pv|vg|lv}_field() nightly test helper functions.
Add nightly test to cover vg/lv tags add/delete.
Refactor _vgchange_tag() to vg_change_tag() library function.
Refactor vgcreate to call new vg_change_tag() function.
Refactor lvchange_tag() to call lv_change_tag() library function.
Add dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag()
Add tag_list_copy() supporting function inside lvm2app.
Add lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag().
Add lvm_lv_get_tags(), lvm_lv_add_tag(), and lvm_lv_remove_tag().
Update lvm2app interactive unit test for vg/lv tags.
Update doxygen comments for lvm2app.h.
Add Doxygen file for lvm2app to generate documentation from lvm2app.h.
Update WHATS_NEW.
Add pvchange -u --all to testsuite.
Avoid scanning all pvs in the system if operating on a device with mdas.
Update WHATS_NEW for last checkin.
Add pv to vg->pvs after check for maximum value of vg->extent_count.
Refactor _read_pv() code that updates vg->extent_count and vg->free_count.
Refactor format1 vg->pvs list add and vg->pv_count.
Add add_pvl_to_vgs() - helper function to add a pv to a vg list.
Update WHATS_NEW
Check for duplicate paths (pvids) on the commandline of vgcreate.
Remove unnecessary parameter from import_pool_pvs().
Move increment of vg->pv_count from import_pool_vg() to import_pool_pvs().
Add del_pvl_from_vgs() and move prototypes into metadata-exported.h
Call add_pvl_to_vgs() and del_pvl_from_vgs() from more places.
Use del_pvl_from_vgs() in vgreduce paths.
Add pv->vg to solidify link between a pv and a vg.
Update WHATS_NEW
Fix teardown in t-pvcreate-operation-md.sh nightly test.
Add missing readline linkage to lvm2app test.
Use vg->vgmem to allocate vg/lv/pv string properties instead of dm_malloc/fr
Change lvm2app version number from 1 to 2.
Add device creation to basic nightly test.
Fabio M. Di Nitto (1):
Fix clvmd init script stop function to not deactive non-clustered volume groups.
Jonathan Earl Brassow (52):
Initial import of the cluster log daemon from the 'cluster' repository.
- Updating cluster log with latest code changes/bug fixes before
Rebasing the cluster log daemon code from the most current
After rebasing the cluster logging code, adjustments need to be
Making adjustments to go along with the changes to the kernel.
Remove old custom list macros and replace with libdevmapper list
Cluster log daemon (clogd): use LVM bitops in place of ext2 bitops
cluster log daemon (clogd): Add to LVM build system
update WHATS_NEW
mirror table generating code: Properly handle 'block_on_errors' and 'cluster' features
configure script: A couple unwanted changes snuck in.
Cluster log server (clogd): Add new build files.
cluster log daemon (clogd): Adjust for kernel CTR arg reordering
'_emit_areas_line' returns 1 for success and 0 for failure. This always
I saw this in a bug report:
Clarify message:
s/=/==/ Typo was causing sub test to always return success.
The patch fixes some lvconvert issues (WRT mirror <-> mirror).
- forgot to update WHATS_NEW along with bug fix for keeping
This patch adds the capability to split off a mirror legs.
udpate WHATS_NEW file for --splitmirror checkin
Add the new mirror log type "redundant". The options are now:
update comment
Found 2 problems with my previous check-in:
Testsuite updates and fixes for recently added features.
Add new test cases for mirrors that are under snapshots.
Off-by-one count was causing not all the mirror table parameters
At some point "clustered_[core|disk]" was changed to "clustered-[core|disk]".
udpate WHATS_NEW*
When moving the cluster log server into the LVM tree, the in memory
Make the intermachine communication structures architecture independant
initial cmirrord man page
Initial version of the cmirrord init script
Use tabs, not spaces.
Fix some compiler warnings.
Fill in a little more on the man page for cmirrord
a little more information for the cmirrord man page
Was using dm_list_iterate_items when I should have been using
Adding a new mimage (leg/copy) to a mirror behaves differently
Add ability to create mirrored logs for mirror LVs.
For the mirror repair tests, we should use --ignoremonitoring because
We only need one extent for the mirror log. So, when specifying
Arguments to the --mirrorlog option are described in the synopsis as
Disallow the primary mirror image from being removed when the
Disallow the addition of mirror images while a mirror up-convert
The following tests in the testsuite have race conditions:
Patch to fix bug 586021 and mantain historical behavior of
Fix comment from last commit. Additionally, there is no need
Don't attempt to convert the log type of an LV if the LV
Test all combinations of mirror conversion, both while the LV
If we are checking if '--nosync' was called with the mirror argument,
Disallow toggling the cluster attribute of a volume group if there
Mike Snitzer (68):
Switch status from 32-bit to 64-bit
Add a [--poll {y|n}] flag to vgchange and lvchange to control whether
Return error to dm_tree_preload_children() and
Return error to dm_tree_suspend_children() callers.
Return error to dm_tree_deactivate_children() callers.
Add missing 'stack;' for all suspend_lv and resume_lv callers.
Add missing 'stack;' for all activate_lv and deactivate_lv callers.
Use snapshot metadata usage to determine if snapshot is empty
update WHATS_NEW and WHATS_NEW_DM with previous commits' changes
. update documentation for --poll in the vgchange and lvchange man pages
Change background polldaemon's process name to "(lvm2)".
remove unused variable 'i' that was recently introduced in lv_add_segment
Reset _vgs_locked in lvmcache_init()
remove errant comment fragment
Only allow one return from poll_daemon(). If a child polldaemon was
Add 'SNAPSHOT_MERGE' lv_segment 'status' flag.
Add support for "snapshot-merge" target.
Conditionally push down either the "snapshot-origin" or
Merging device is loaded with "-cow" suffix and with base name of the
Add --merge support to lvconvert to start merging a snapshot into its
Do not allow merging over mounted logical volumes.
Report merging snapshot as 'S' instead of 's':
When there is merging snapshot, report percentage on the origin LV.
Background poll for lvconvert --merge command.
Start background polling of merging stores on:
Reload origin if merging has stopped.
When turning merging origin into non-merging origin, there is bad sequence:
Merge on activate support.
Update lvconvert manpage for snapshot --merge
Add snapshot merge wrappers to abstract the associations and flags used
Rename segment and lv status flag from SNAPSHOT_MERGE to MERGING.
update WHATS_NEW and WHATS_NEW_DM to include snapshot-merge changes
Improve target type compatibility checking in _percent_run().
Detect case of both merging_store and cow_store supplied in
Change dev_manager_mirror_percent()'s 'struct logical_volume *' to be
update test/t-pvcreate-operation-md.sh attempt loading raid0.ko if raid0
Add a common way to establish a scsi_debug-based 4K drive for use by an
test/t-topology-support.sh requires scsi_debug from >= 2.6.31
add test/t-snapshot-merge.sh to provide coverage of snapshot-merge support
Add t-topology-support.sh and t-snapshot-merge.sh tests.
Preload the origin prior to suspend IFF snapshot(s) still exist after a
Removed inactive_table check from _lv_has_target_type. This check
Eliminate extra ioctls just to check open_count in _add_new_lv_to_dtree.
Default to checking LV's progress before waiting in _wait_for_single_lv.
move WHATS_NEW entries whose changes were made after 2.02.60 to 2.02.61
Add %ORIGIN support to lv{create,extend,reduce,resize} --extents option
Prepare for _get_lvconvert_vg() reuse as part of a larger lvconvert.c
lvconvert --merge @tag support
Switch lvconvert_single() over to using get_vg_lock_and_logical_volume()
Add multiple snapshot lv 'lvconvert --merge @tag' support via process_each_lv().
Remove false "failed to find tree node for <lv>" error from _cached_info().
Add 'fail_if_percent_unsupported' arg to _percent() and _percent_run().
Add 'fail_if_percent_unsupported' arg to _percent() and _percent_run().
Refactor snapshot-merge deptree and device removal to support info-by-uuid
Do not reload origin again in lv_remove_single() if it had a merging
Handle a misaligned device that reports a -1 alignment_offset.
testsuite: get stacktrace if test drops core
Don't allow resizing of internal logical volumes.
Improve activation monitoring option processing
Revert having clvmd consult the lvm.conf "activation/monitoring".
Fix clvmd cluster propagation of dmeventd monitoring mode.
Use a real socket for singlenode clvmd to fix clvmd's high cpu load.
Do not allow {vg|lv}change --ignoremonitoring if on clustered VG.
Add additional test to start the snapshot merge (which had just failed
Re-enable t-topology-support.sh
When removing a snapshot avoid preloading the origin if the
Remove redundant check in _lvs_single now that the caller
Disallow the direct removal of a merging snapshot.
Mikulas Patocka (2):
Don't kill the parent if debugging.
A missing space in the error message.
Milan Broz (195):
Fix lvm2.static build.
Remove status=noxfer from test, not all dd versions support this (RHEL4 for example).
Fail add tree node when requested major/minor is used.
Calculate mirror log size instead of hardcoding 1 extent size.
Do not issue write behind lv size.
Fix "Calculate mirror log size" commit, the le_count should be always set.
Fix lvmdump /sys listing to include virtual devices directory.
Fix problems with static build
Use tools.h in for lvm-static.
Fix pvs segfault when pv mda attributes requested for not available PV.
Separate PV label attributes which do not need parse metadata when reporting.
Fix lvm.static build dependence (to properly propagate changes in libdevmapper).
Comment out pvcreate pagesize alignment test for now.
Fix validation of dataalignment value introduced in previous commit.
Try to avoid full rescan if label scan is enough.
pe_start can be overwritten in VG metadata, so it is not PV label-only field.
vgname_from_mda now tries to parse for vgname even
Fix possible increasing in memory allocation if refreshing_context
Fix clvmd build after liblvm commit.
Fix lv_count when manipulating with snapshots and max_lv is set.
Fix warning in previous commit.
Fix segfault for vgcfgrestore on VG with missing PVs.
fix some issues when compiling with -D DEBUG_POOL
Add some more special chars for device name test.
Do not use pointer from released memory pool (cmd->cmd_line).
Allocate new pv->vg_name from pool, it can be destroyed later.
Fix debug pool grow object to properly support delta=0
Fix memory pool leak.
Use pv from newly read_vg to avoid possible use of not initialized memory.
Enable use of cached metadata for pvs & pvdisplay.
Fix mirror log convert validation question.
Always return exit error status when locking of volume group fails.
Properly copy the whole pv structure for later use.
Helper function to catch memory pool leaks.
Introduce memory pool per volume group.
Properly release VG memory pool in activation code and clvmd.
Properly release VG memory pool in archiver code.
Properly release VG memory pool in metadata manipulation code.
Properly release VG memory pool in all CLI tools.
Fix dmsetup.static build.
Add MMC device type to filters.
Fix pvs -a for segmented output
Fix pvseg report for orphan PVs and other devices.
Tidy lv_hash[_lock] use inside clvmd.
Move metadata backup call after vg_commit.
Alloc PV internal structure from VG mempool if possible.
Fix remote metadata backup for clvmd
Clean a lot of extra extra whitespaces.
Fix vgreduce --removemissing failure exit code.
Fix pool leak in lvmcache_read_vg error path.
Use zalloc in initialization of device manager (to zero pvmove mirror count).
Fix PV datalign when for values starting prior to MDA area.
Do not use generic install if running install_device-mapper.
Fix device-mapper static build targets.
Introduce lvm2_install target.
Fix previous commit (scripts/Makefile targets order)
Fix first_seg() call for empty segment list.
Remove snapshot_count from VG and use function instead.
Fix snapshot segment import to not use duplicate segments & replace.
Remove vg->lv_count and use counter function.
Tidy format1 import LV function.
Introduce link_lv_to_vg and unlink_lv_from_vg functions.
Fix lv_is_visible to handle virtual origin.
Introduce lv_set_visible & lv_set_invisible and use lv_is_visible always.
Merge lv_is_displayable and lv_is_visible.
Remove unneeded import parameter from lv_create_empty.
Check max_lv on only place and force the check only for new volume.
vgcfgrestore should not quietly fail when backup file has missing PVs.
Use PV UUID in hash for device name when exporting metadata.
If pvmove fails activating mirror volume, try restore to previous state.
Fix compilation warning.
Use lvconvert --repair in dmeventd DSO (mornfall)
Fix lvconvert check for multiple-segment mirrors (mornfall)
Add infrastructure for queriying for remote locks.
Use suspend with flush when device size was changed during table preload.
Use lock query instead of activate_lv_excl
Use readahead of underlying device and not default (smaller) one.
Fix readahead test.
Fix locking query compatibility with old external locking libraries.
Temporary disable one of lvconvert tests.
Fix readahead calculation problems.
Fix log allocation segfault (fix previous commits).
Fix convert polling to ignore LV with different UUID.
Fix rename of active snapshot with virtual origin.
Build shared parts with 'make' command (mpatocka)
WHATS_NEW!
Use lvconvert --repair instead of vgreduce in mirror dmeventd DSO (mornfall)
Fix double releasing of vg when repairing of vg is requested.
Suspend virtual origin before real snapshot.
Fix various problems in tests
Round readahead more inteligently and print warning.
Fix the same readahead rounding in lvcreate.
Support crypt segment in libdevmapper tree.
Unlock vg when requested automatic update failed.
Unlock VG in recover_vg if metadata read failed.
Fix compiler warning.
Re-instate partial activation support in clustered mode. (mornfall)
Fix WHATS_NEW - Allow metadata correction even when PVs are missing.
Fix memory leaks in toolcontext error path.
Fix lvconvert to not poll mirror if no conversion in progress.
Destroy toolcontext on exit in clvmd (fixes memory pool leaks).
Do not fork daemon when dmeventd cannot be found.
Suggest use lvchange --resync when up converting not yet synced mirror.
Add WHATS_NEW items.
Properly destroy toolcontext.
Fix backward compatibility for major:minor query.
Fix segment import functions to print segment name and logical volume name.
Fix confusing metadata syntax error messages.
Fix and precise metadata read errors for segment areas.
Enable use of new multi-segment registration for static registration too.
Fix uuid warning in pvcreate to use terminated (and dash formatted) UUID string.
Fix global locking in PV reporting commands (2.02.49).
Do not run mdadm tests if MD module is not loaded.
Return fail if lv_deactivate did not removed device from kernel.
Recognise DRBD device part and handle it similar to MD devices.
Fix lvcreate processing of %PVS argument.
Fix compilation warning:
Fix install_device-mapper Makefile target to not build dmeventd plugins.
Fix pvmove region_size overflow for very large PVs.
Never activate hidden volumes directly in vgchange.
Revert vg_read_internal change, clvmd cannot use vg_read now. (2.02.55)
Fix memory lock imbalance in locking code.
Return error status if vgchange fails to activate some volume.
Refresh device filters before full device rescan in lvmcache.
Move persistent filter dump to more appropriate place.
Do not try to unlock VG which is not locked.
Add missing vg_release to pvs and pvdisplay to fix memory leak.
Use locking_type 3 (compiled in cluster locking) in lvmconf.
Do not allow creating mirrors of more than 8 images.
Fix memory leak in lv_info_by_lvid
Fix tools to report error when stopped by user.
Print error if VG already exist.
Fix pvmove test mode to not fail and do not poll.
Fix memory lock imbalance in lv_suspend if already suspended.
Remove newly created log volume if initial deactivation fails.
Get rid of hardcoded 0xffdf cluster lock flag.
Get rid of magic masks in cluster locking code.
Get rid of magic masks in cluster locking code - clvmd part.
Allow implicit "convert" to the same lock mode.
Allow implicit lock conversion for pre/post callbacks.
Never ever use distributed lock for LV in non-clustered VG.
Add memlock information to do_lock_lv debug output.
Allow manipulation with precommited metadata even when a PV is missing.
Fix missing include.
Use more descriptive variable name for temporary layer lv.
Call explicitly suspend for temporary mirror layer.
Remove missing flag if PV reappeared and is empty.
Drop metadata cache after device was autorepaired and removed from VG.
Explicitly use non-clustered vgcreate in test.
Fix previous vgcreate commit to not call unpaired unlock.
Resume volumes in reverse order to preserve memlock pairing.
Do not set precommitted flag in cache when precommitted metadata does not exist.
Properly decode flags even for VG locks.
Move processing of VG locks to separate function (similar to LV locks).
Add possibility to handle precommitted metadata in lvmcache.
Proper mask lock mode for vg lock.
Propagate commit and revert metadata event to other nodes in cluster.
Use fixed buffer to prevent stack overflow in persistent filter dump.
Remove empty "repaired" devices if empty in lvconvert.
Rename mirror_device_fault_policy to mirror_image_fault policy
Fix clvmd automatic target module loading crash.
Never scan suspended devices in clvmd.
Move error message to locking constructor and print
Fix exported symbols for lvm2 dmeventd wrapper.
Fix syslog prefix in the first message (dmeventd->lvm).
Switch memory debugging off for now if compiled with dmeventd,
Document undocumented commits which fixed some bugs.
Fix syntax error in cmirror init script
Fix return code of info callbacks.
Unlock shared lock if activation calls failed.
Add some missing vg_revrts calls when pvmove aborts.
Always query device by using uuid only and not name in clvmd.
Fix pvmove abort when temporary mirror fails to be cluster-aware.
Always query device by uuid only.
Remove lvs_in_vg_activated_by_uuid_only call.
Add --showkeys parameter description into dmsetup man page.
Add --help dmsetup option as the synonym for help command.
Fix clvmd Makefile to not overwrite LIBS from template definition
Fix pvcreate device check.
Disable long living process flag in lvm2app.
Use hash table for quick lv reference when reading metadata.
Remove vg_validate call when parsing cached metadata.
Optimise PV segments search.
Do not traverse PV segment list twice.
Fix all segments memory is allocated from vg private mempool.
Always use blocking lock for VGs and orphan locks.
Wipe dm-ioctl parameters in memory after use.
Mask LCK_HOLD flag in cluster VG locks for compatibility reasons.
Remove -n argument from vgcfgrestore.
Currently if clvmd is running and user issues vgscan,
Do not print encryption key in message debug output.
Skip also special lvm devices in scan (if ignore suspended is used).
Fix device_is_usable to properly detect only internal LV names.
Fix empty layer detection is scan devices.
Another one internal device layer fix...
Peter Rajnoha (73):
Fix segfault when using -U, -G and -M options in dmsetup.
Fix wrong arg in lv_is_virtual_origin call while creating snapshots.
Fix a typo in udev rule (splitname, NOT namesplit)
'--noudevsync' -- update relevant man pages
Add --noudevsync option for relevant LVM tools.
Add --noudevsync option for relevant LVM tools.
Forgotten '%s' in one of _mk_link warning messages.
Detect udev problems in _rename_dev_node.
Fix failure situations in dm_task_run for udev sync.
Add 'udevcomplete_all' command for dmsetup. Export DM_COOKIE_MAGIC in libdevmapper.h.
Add 'udevcookies' command for dmsetup.
Rename template rule file 11-dm-permissions.rules to 12-dm-permissions.rules.
Remove 11-dm-permissions.rules (is now in 12-dm-permissions.rules).
Fix semaphore includes in dmsetup for udev sync.
Use new blkid instead of vol_id in udev rules.
Fix Makefile to take into account dmsetup's reconfiguration.
Add y|--yes option for dmsetup to provide a default 'YES' answer to questions.
Add libudev configuration check.
Check that udev is running and set internal state appropriately.
Add one define that is necessary for older (experimental) libudev to work.
Several changes in udev rules:
Add manpage entry for dmsetup's udevcomplete_all and udevcookies commands.
Move dm_cookie_supported check into dm_udev_get_sync_supprt function.
Add some advisory comments for users in 12-dm-permissions.rules.
Add more hints in 12-dm-permissions.rules. Add 'dmsetup splitname' and 'y|--yes' to dmsetup manpage.
Use the same default umask for /dev dirs (DM_DEV_DIR_UMASK).
Just a cleanup from previous commit. We don't need pvname local var in _activate_lvs_in_vg anymore...
Add udev flags support in libdevmapper and provide 'dmsetup udevflags' command to decode them.
Use udev flags support in LVM and provide dm_tree_add_new_dev_with_udev_flags wrapper for dm_tree_add_new_dev.
Use udev flags in the rules and cleanup the rules:
Add manpage entry for dmsetup udevflags.
Rename 11-lvm.rules to 11-dm-lvm.rules and 12-dm-disk.rules to 13-dm-disk.rules.
Several changes to udev support code:
Cleanup of previous commit with latest changes in udev support code.
More cleanup in udev rules:
Remove 'last_rule' from udev rules.
Support udev flags even when udev_sync is disabled or not compiled in.
Give better message for pvmove when all data on source PV is skipped.
WHATS_NEW for previous commit.
Disable udev rules on change event with DISK_RO=1.
Add --noudevrules option for dmsetup to disable /dev node management by udev.
Add activation/udev_rules config option in lvm.conf.
Always set environment variables for an LVM2 device in 11-dm-lvm.rules.
Add support to disable udev checking: DM_UDEV_DISABLE_CHECKING=1 env. variable.
Add support to disable udev checking: LVM_UDEV_DISABLE_CHECKING=1 env. var.
Enable udev_sync and udev_rules in lvm.conf by default while running tests.
Define {DM, LVM}_UDEV_DISABLE_CHECKING=1 env. variables for tests.
Show a warning message when libudev not found and we're using --enable-udev_sync.
Substitute UDEV_SYNC value for use in the other files and show a warning message when libudev not found and using udev_sync.
This is related to liblvm and its lvm_list_vg_names() and lvm_list_vg_uuids() functions
Rename "stat" to "status" in dmeventd_snapshot.c.
Several changes in dmsetup and libdevmapper:
Don't use LVM_UDEV_DISABLE_CHECKING environment variable anymore.
Use udev transactions in testsuite.
Update man page for dmsetup: --udevcookie, udevcreatecookie and udevreleasecookie.
Remove hard-coded rule to skip _mimage devices in 11-dm-lvm.rules.
Add LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable to suppress error
Add support for ioctl's DM_UEVENT_GENERATED_FLAG.
Strictly require libudev if udev_sync is used.
Autoreconf.
Export and use only valid cookie value in test suite.
UDEV_SYNC_SUPPORT, not UDEV_SYNC!
Use UUIDs instead of names while processing event handlers.
Allow VGs with active LVs to be renamed.
Do not reset position in metadata ring buffer on vgrename and vgcfgrestore.
Set appropriate udev flags for reserved LVs.
Also include udev libs in libdevmapper.pc when udev_sync is enabled.
Add support for new IMPORT{db} udev rule.
Don't run any complex initialisation for the "version" lvm2 command.
And be consistent with return code as well (previous commit).
Synchronize "remove" dm task while reverting unsuccessful "create" dm task
Specify exactly which ioctl doesn't have a cookie set (for better debugging).
Add new --sysinit option for vgchange and lvchange.
Petr Rockai (130):
Use $(abs_top_builddir) instead of @DMDIR@ and update paths appropriately.
Also report the tests that have been skipped, at the end of harness.sh.
Fix typo.
Set LD_LIBRARY_PATH in init.sh, as it is required to run dmsetup now as well,
Explicitly check after lvremove -ff vg that it did its job. By jstava.
Use separate locking directory for each of the tests, as they never share a
Add bz186013 check -- lvcreate rejects an invalid regionsize (jstava).
bz429342 lvcreate --nosync
add bz264241 check
Minor code and documentation cleanups and changes by jstava.
Fix t-pool-labels to pass again after the vgdisplay error return fix from
Include libdm in lcov reports.
Import a bunch of new tests by jstava. Mostly everything pass, they however
Add a bunch of sub-tests aimed at testing various bugzillas, by jstava.
Document current state of inconsistent metadata behaviour of a few commands in
Fix some checks in lvm-utils.sh. Note that "$(test ...)" is always empty, since
A C implementation of "not" that handles fatal signals rather more
Re-implement the test harness in C. This lets us pass through signals and
Only fail when tests have failed, but not when they have been just skipped.
Fix test output collection in harness.c.
In testsuite's not.c, print a notice when program dies of a fatal signal.
Detect and wipe swap signatures in pvcreate.
Some extra (paranoid) checks on dev_is_{md,swap} result.
Missed file from previous checkin.
Do not include MISSING_PVs in allocation maps.
A more thorough PV equality test (that also copes better with MISSING_PVs) in
Refuse adding missing PVs in create_pv_list in toollib when allocatable_only is
Implement, test and document (first iteration of) lvconvert --repair.
Avoid scanning non-PV devices in functional tests, otherwise lvconvert --repair
Update WHATS_NEW wrt a recent patch.
Complain when lvconvert --repair is used on non-mirror LV.
Allow metadata correction even when PVs are missing.
- Ignore suspended devices during repair (Milan).
Get rid of the mdadm presence check in t-000-basic: no actual test uses
Refuse to open VG with MISSING_PVs for update unless handles_missing_pvs is set.
Take just a read lock when activating in lvchange.
Remove lockingfailed().
Port process_each_pv to new vg_read.
Fix bad prototype from previous checkin.
Un-export vg_read_internal.
Fix warning.
Update synopsis in lvconvert manpage to mention --repair.
Allow LV suspend while --ignorelockingfailure is in force.
Add test for RHBZ 481793 (passing, thanks to vg_read changes checked in
Slightly refactor mirror log conversions in lvconvert.
Make lvconvert honour log mirror options combined with downconversion.
Refactor file locking, lifting the flock wrapper code into separate
Make lvchange --refresh only take a read lock on volume group.
Implement write lock prioritisation for file locking and make it default.
Do not override the distclean target in liblvm's Makefile, it annoys make and
Handle metadata with unknown segment types more gracefully.
Fix the "const discarded" warnings introduced in the unknown segment patch.
Only announce mirror monitoring to syslog after initialisation succeeds.
Rudimentary support for running testsuite in a builddir != srcdir situation.
Issue an Internal error message whenever _memlock_count drops below 0.
Add an extra memlock_inc() to _remove_mirror_images to properly balance
Fix another bug in memlock handling, this time the "global" dmeventd memlock
What's new.
Fix the dmeventd LD_LIBRARY_PATH in the testsuite.
Add a missing #include (fix compiler warning).
Un-export vg_read_internal.
The double resume in remove_mirror_images does not happen *always*. Only call
In case we refuse to continue due to missing PVs, print a hint about using
Add a basic test for snapshots of mirrors, thanks to Jon Brassow.
More fixes for the testsuite in the $(builddir) != $(srcdir) situation.
Fix test/api to work with srcdir != builddir.
Don't fail in the builddir == srcdir case, though. (testsuite)
The sourcedir instances of the test scripts are not PHONY.
Optionally abort on internal errors (and leverage this option in the
If aborting due to an internal error, always print the message causing this.
#define an INTERNAL_ERROR macro and use it throughout LVM.
Revert unintended change that slipped in with last checkin.
Also clean up MISSING devices in --removemissing --force in vgreduce.
Fix removal of multiple devices from a mirror (+ regression test).
Revert another unintended change that snuck in.
In lvconvert --repair --use-policies, for the allocate policies, return success
Allow vgremove of a VG with PVs missing.
Make lvconvert --repair --use-policies exit with success when no action is needed.
In testsuite, catch also failures that happen in the middle of a pipeline.
Relax a check on blkid exit value, which seems to be different in different
Add _mlog devices to dependency trees using UUID, not name, in activation.
Add infrastructure for running the functional testsuite with locking_type set
Skip locking_type 3 tests instead of failing when system-wide clvmd is running.
Run both locking_type 1 and 3 tests (forgot to uncomment locking_type 1 before
Also honour abort_on_internal_errors when log_fn is set.
When a scsi_debug modprobe fails, skip the test instead of failing it.
Enforce distinct-PV allocation of snapshot/origin pairs in vgsplit test.
Work around a problem in t-mirror-lvconvert: different PV order on the
Re-run failing tests with log/verbose=4 (-vvvv) to help with debugging.
Do not pass NULL to setenv in the test harness.
Put back the `lvconvert -m+1 --mirrorlog disk' test in t-lvconvert-mirror.sh.
Move a fragile testcase toward the end of t-mirror-lvconvert.sh.
Keep the testsuite stats correct in spite of failed-test repetition.
In test harness, use fwrite(3) in place of write(2) to avoid mixing fd-level
Refactor the test utilities, dropping the legacy test-lib.sh and curtailing
Avoid spurious skips in the testsuite due to obsoleted
Set ulimit -c to unlimited to allow coredumps to be collected and analysed in
Fix a mis-override of $PWD in test-utils.sh.
Don't forget to cd into $TESTDIR in test-utils.sh / prepare_testdir.
Do not pollute /tmp with testing byproducts.
Add a new helper script for the testsuite, that makes checking for various
Explode t-mirror-basic into a number of smaller tests.
Absorb t-mirror-lvconvert-usage into t-lvconvert-mirror.
More testsuite helpers for check.sh.
For the testsuite, set a default polling interval to 0 in lvm.conf. Cuts down
Fix t-lvcreate-usage, as lvcreate ... -i1 no longer prints "Redundant stripes
Make it easy to run just a subset of tests by saying `make check T="regex"`.
Disable the rather-dangerous prepare_scsi_debug_dev in the testsuite.
Optionally disable the verbose repeat of a failed test (export
Fix a reversed exit status from test harness.
Process all core dumps that exist upon a test failure (this would hopefully
Add check_cluster and check_local targets in addition to just "check".
SIGTERM testing clvmd before SIGKILL-ing it.
Allow incomplete mirror restore in lvconvert --repair upon insufficient space.
What's new.
Add a "should" alongside "not" to the test utilities. When a "should" command
Suppress duplicate error messages about read failures and missing devices.
What's new.
Add some basic provisions for automated testing of dmeventd.
Add a basic test for dmeventd triggering lvconvert --repair. Needs improvement.
Improve the "check" testing utility: slightly refactor and provide
The "should" testing utility should actually only give a warning when the
Rename t-partial-activate to t-activate-partial (more activation tests coming).
Add a test for activation in presence of missing devices. This partially covers
Revert the huge device creation in t-lvconvert-mirror and downgrade the
A fairly extensive refactor of the mirror testing code. The exhaustive
Revert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
Bump the debug.log level from 4 to 9 (the numbering is different from verbose).
Run tests in alphabetical (and thus stable across machines) order.
Chop up the big t-lvconvert-mirror-basic loop across 4 separate test scripts
Zdenek Kabelac (64):
mlockall() -> mlock()
Use '_' prefix for local static variable.
Unconditionaly ignore also Virtual Dynamically-linked Shared Object
Use mlock() only on 'r' memory maps
Update comments for selecting maps
Remove const modifier for struct volume_group* from process_each_lv_in_vg().
Move declaration of struct dm_info info to declaration block.
Updates .so links for plugins
Fixing compilation warning: implicit declaration of function ���umask���
Avoid hard sed replacement - i.e. quick test change in make.tmpl
Add $(LIB_STATIC) to TARGETS so it's cleaned in the same way
Use $(top_srcdir) for sources and add cscope.out to distclean targets.
distclean fixes
Update cflow file generation - support build dir and use $(top_srcdir)
Fixing another set of distclean problems where we left some generated files
Split long line in Makefile and keep $abs_top_buildir as shell variable
Avoid modification of .in files outside man directory.
Oops, avoid returning errors from shell to makefile for builddir == srcdir
Fix also error code from clean:
Remove mlockall() form dmeventd
Fix resouce leak in error path
Release pool in the same reversed order
Updated syslog messages
Force C locale
Update memlock
Count only readable size for memlock stats.
Update for dmeventd changes.
Use .commands created in builddir for symlink installation.
Install generated 10-dm.rules from builddir.
Update for make install.
Missed to convert T -> SCRIPTS
Set ret value to success initially.
Better debug message for Un/Locked memory size.
Fix lcov target
Distcleanup config files only in toplevel directory.
As lcov module is not installed with GD.pm dependency we need
Using 'not' if the test 'should' fail.
Add cleandir target.
Use vpath instead of VPATH.
INSTALL rules updates
Update install rules for udev.
Use C locales and use_mlockall for clvmd.
Add error diagnostic for setenv failure.
Added awk script relpath.awk to calculate relative paths.
Fix double DESTDIR usage for infodir and mandir.
Install symbolic .so links with relative paths between usrlibdir and libdir.
Make matcher_t and parse_t compilable
Small indent change
Show string with invalid pattern
Release pools for regex if there is error during processing
Initialise _vginfos list staticaly so there is no problem with using uninitialised
Install plugins to subdirs
Add dm_list_splice() to join two lists.
Headerfile <pthread.h> is no longer needed here
Link liblvm2cmd.so with devmapper-event and devmapper libs.
Link libdevmapper-event.so with libdevmapper.so.
Plugins do not use pthread or lvm2cmd directly.
Skip unneeded 'cat' command execution.
Use Require.private: field for devmapper-event.pc
Add UDEV_PC and SELINUX_PC substituted variables
Switch to use Requires.private for devmapper.pc and lvm2app.pc
Add pkgconfigdir for placement of .pc files
Use /bin/bash for scripts with bashisms
For lcov target there is no need to include source file dependencies
Zden��k Kabel���� (20):
* minor compilator warning fix for improper function declaration.
removed redundant redeclaration of init_indent() and init_msg_prefix() from lvm-logging.h
minor compiler warning fix for function declaration prototype
cleaner const char* usage for last_path_component()
fix missing const char*
daemons depends on liblvm2cmd - fixes parallel builds
add simple test for dev node usability (detect devices mounted with nodev)
operate on test subdirectory instead on main /dev
Replace _dm_snprintf with EMIT_PARAMS macro for creating target lines
add support for ext4 resize in fsadm
Remove external dependency on the 'cut' command in fsadm
Fixed bug where lvresize option -t was not properly passed to fsadm.
Do not create some dm and lvm static librarie when they are not requested
Avoid referencing files from DESTDIR during build process
Do not query nonexistent devices for readahead.
Use 'lvm lvresize' instead of 'lvresize' in fsadm.
Minor replace of of ${top_srcdir} with $(top_srcdir) for lcov target
Run distclean also for daemons/cmirrord
Remove daemons/clogd from distclean dirs (replaced with cmirrord)
Update distclean target for rename clogd to cmirrord. (2.02.52)
fabbione (8):
Remove unwanted Makefiles and don't purge lvm2.po that's
Fix --with-clvmd=all to deal with the case where no cluster managers are available.
Drop clogd Makefile from CVS since it's always autogenerated from Makefile.in
Fix cmirrod build directory while we wait to do a proper rename of the
Merge Debian patch 05 debian: keep libdm-abi consistent.
Disable realtime support by default.
configure.in: don't set default file owner and group
- fix whitespaces all over (tabs/spaces)
mpatocka (4):
Suppress warning on 64-bit big-endian computers (Sparc 64).
Change exit() to _exit() in the child process. exit flushes stdio file buffers,
WHATS_NEW
Pass struct cmd_context as a first argument to init_multiple_segtypes.
prajnoha (6):
Added displayable_lvs_in_vg and lv_is_displayable functions to deal with
Fix vgrename using UUID in case there are VGs with the same name.
Fix incorrect return value in help function.
Add "--refresh" functionality to vgchange and vgmknodes.
Add "--refresh" functionality to vgchange and vgmknodes.
Add checks for device names in dmsetup and show proper error messages.
snitzer (27):
Add vgimportclone and install it and the man page by default.
Fix rpmlint in clvmd initscript
Fix 'service-default-enabled' rpmlint in clvmd initscript
Various vgimportclone fixes:
Use the MD device's stripe-width, instead of chunk_size, to align the
Allow commandline sizes to be specified in terms of bytes and sectors.
Reword the WHATS_NEW commandline sizes update.
Continue to make --units and --size consistent (in code and man pages):
Add extended device (blkext) and MD partition (mdp) types to filters.
Check MD devices for a partition table during device scan.
Cast MAJOR() and MINOR() to int when used with "%d" in dm_snprintf() call.
Cast MINOR() in _md_sysfs_attribute_snprintf()'s dm_snprintf() call.
Formalize pe_start policy as split between .pv_setup and .pv_write.
Fix _mda_setup() to not check first mda's size before pe_align rounding.
Remove legacy support for preserving pe_start if a PV already has data
Preserve pe_start in .pv_setup and .pv_write if pe_start was supplied.
Add --dataalignmentoffset to pvcreate to shift start of aligned data area
Revert 'preserve_pe_start' related code in _text_pv_setup
Disable the "new pe_start policy"
Fix compile warnings from recently added log_very_verbose() in _text_pv_write()
Add devices/data_alignment_offset_detection to lvm.conf.
Add devices/data_alignment_detection to lvm.conf.
Improve ability to lookup primary device associated with a partition
Retrieve MD sysfs attributes for MD partitions
Fix error handling of device-related stat() calls to be ENOENT aware.
Added basic pvcreate --dataalignmentoffset testing to t-pvcreate-usage.sh
Fix pvcreate on a partition (regressed in 2.02.51).
taka (6):
Fix error message when adding metadata directory to internal list fails.
Fix size and error message of memory allocation at backup initialization.
Remove old metadata backup file after renaming vg.
Restore log_suppress state when metadata backup file is up-to-date.
Fix error message when archive initialization fails.
Save and restore the previous logging level when log level is changed.
twoerner (2):
Added files lib/lvm.h and lib/lvm_base.c:
Fix include/.symlinks for lvm2.h to lvm.h renaming
zkabelac (50):
Add fflush for the case the log is redirected to the buffered file.
Export functions out_inc_indent(), out_dec_indent() for creating
Update for outnl and indent functions
minor code comment update
minor whitespace indentation
skip cast from (void*)
minor indent change
Fix coredump and memory leak for 'dmsetup help -c'
Fix unlocking vg in some pvresize and toollib error paths.
Destroy allocated mempool in _vg_read_orphans() error path.
Cleanup returns for void functions.
Fix typo fsdam -> fsadm (closes bug 552721)
Just add '.' at the end of error message.
Show all fields for 'dmsetup info -c -o all'.
Error message prints unrecognized key.
Use offsetof() macro and avoid defining dummy static union for FIELD() macro.
Add macros outsize() for out_size() and outhint() for out_hint() that check
Export function out_text_with_comment() and add outfc() macro that checks
Use macro outsize() with check for error return value.
Add few const modifiers.
orig_status preserves 64bit status.
lvol%d is generated for NULL name in lv_create_empty().
Move initialization of the 'cmd' member of the struct alloc_handle
Cleanup gcc warning: null argument where non-null required (arg.2)
Cleanup gcc warning: cast from function call of type 'struct dm_list *'
Cleanup gcc warning: cast discards qualifiers from pointer target type
Cleanup const compiler warning
Update entry for few previous gcc cleanup commits.
Reset released pointer and counters.
Log entry for the last lvmcmdline.c commit
* add more 'const' - fixes gcc constness warning
Cleanup float arithmetic gcc warning.
Fix dm_report_field_uint64 to really use 64bit.
* update for last 3 commits
Use dm_report_field_int32 instead of dm_report_field_uint64 for printing '-1'
Update
Usage of AC_PROG_SED and AC_PROG_MKDIR_P requires autoconf version 2.61.
Use datarootdir and fix warning during configure process:
Use $(top_builddir) for inclusion of make.tmpl in Makefiles.
Replace CFLOW_CMD only in make.tmpl and use it as variable elsewhere.
Use consistently $() instead of ${} for all Makefile variables,
This patch moves inclusion of the make.tmpl before DEFS modification,
As fsadm is installed by default - it's a common practice to rather
Introduce LVMINTERNAL_LIBS
Readline linking update
Pthread linking change
Removes -rdynamic from linking of lvm.static and dmeventd.static.
This patch add SELINUX_LIBS and STATIC_LIBS variables.
Use DL_LIBS, remove -ldl from global LIBS and link -ldl only when needed.
Use UDEV_LIBS, and link -ludev only when needed.
5 years, 5 months