[lvm-devel] master - profiles: remove default.profile and add {command, metadata}_profile_template.profile

Peter Rajnoha prajnoha at fedoraproject.org
Wed May 21 10:37:25 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=23f9c45a1bd610c455eb24a1264c07b27cd89fd2
Commit:        23f9c45a1bd610c455eb24a1264c07b27cd89fd2
Parent:        c34c33d9ba69f1458932e468caa10846ebb4e970
Author:        Peter Rajnoha <prajnoha at redhat.com>
AuthorDate:    Wed May 21 12:32:12 2014 +0200
Committer:     Peter Rajnoha <prajnoha at redhat.com>
CommitterDate: Wed May 21 12:36:52 2014 +0200

profiles: remove default.profile and add {command,metadata}_profile_template.profile

The "default.profile" name was misleading. It's actually a helper
*template* that can be used for copying and further editing to create
a new profile.

Also, we have separate command and metadata profiles now so the templates
are separated as well - we can't mix profile settings from one group with
another - such profile is rejected by lvm tools.
---
 WHATS_NEW                                 |    1 +
 conf/Makefile.in                          |    6 ++--
 conf/command_profile_template.profile.in  |   46 +++++++++++++++++++++++++
 conf/default.profile.in                   |   53 -----------------------------
 conf/metadata_profile_template.profile.in |   24 +++++++++++++
 configure                                 |    5 ++-
 configure.in                              |    3 +-
 spec/packages.inc                         |    3 +-
 8 files changed, 81 insertions(+), 60 deletions(-)

diff --git a/WHATS_NEW b/WHATS_NEW
index 7f50eb1..61753d6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.107 - 
 ==================================
+  Remove default.profile and add {command,metadata}_profile_template.profile.
   Use proper umask for systemd units generated by lvm2-activation-generator.
   Check for failing mirror_remove_missing() function.
   Prompt before converting volumes to thin pool and thin pool metadata.
diff --git a/conf/Makefile.in b/conf/Makefile.in
index 3f66621..54852e2 100644
--- a/conf/Makefile.in
+++ b/conf/Makefile.in
@@ -18,8 +18,8 @@ top_builddir = @top_builddir@
 CONFSRC=example.conf
 CONFDEST=lvm.conf
 
-DEFAULT_PROFILE=default.profile
-PROFILES=$(DEFAULT_PROFILE) $(srcdir)/thin-performance.profile
+PROFILE_TEMPLATES=command_profile_template.profile metadata_profile_template.profile
+PROFILES=$(PROFILE_TEMPLATES) $(srcdir)/thin-performance.profile
 
 include $(top_builddir)/make.tmpl
 
@@ -37,4 +37,4 @@ install_lvm2: install_conf install_profiles
 
 install: install_lvm2
 
-DISTCLEAN_TARGETS += $(CONFSRC) $(DEFAULT_PROFILE)
+DISTCLEAN_TARGETS += $(CONFSRC) $(PROFILE_TEMPLATES)
diff --git a/conf/command_profile_template.profile.in b/conf/command_profile_template.profile.in
new file mode 100644
index 0000000..36d4343
--- /dev/null
+++ b/conf/command_profile_template.profile.in
@@ -0,0 +1,46 @@
+# This is a command profile template for the LVM2 system.
+#
+# It contains all configuration settings that are customizable by command
+# profiles. To create a new command profile, select the settings you want
+# to customize and add them in a new file named <profile_name>.profile.
+# Then install the new profile in a directory as defined by config/profile_dir
+# setting found in @DEFAULT_SYS_DIR@/lvm.conf file.
+#
+# Command profiles can be referenced by using the --commandprofile option then.
+#
+# Refer to 'man lvm.conf' for further information about profiles and
+# general configuration file layout.
+#
+global {
+	units="h"
+	si_unit_consistency=1
+	suffix=1
+	lvdisplay_shows_full_device_path=0
+}
+report {
+	aligned=1
+	buffered=1
+	headings=1
+	separator=" "
+	prefixes=0
+	quoted=1
+	colums_as_rows=0
+	devtypes_sort="devtype_name"
+	devtypes_cols="devtype_name,devtype_max_partitions,devtype_description"
+	devtypes_cols_verbose="devtype_name,devtype_max_partitions,devtype_description"
+	lvs_sort="vg_name,lv_name"
+	lvs_cols="lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
+	lvs_cols_verbose="lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile"
+	vgs_sort="vg_name"
+	vgs_cols="vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
+	vgs_cols_verbose="vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
+	pvs_sort="pv_name"
+	pvs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
+	pvs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
+	segs_sort="vg_name,lv_name,seg_start"
+	segs_cols="lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
+	segs_cols_verbose="lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
+	pvsegs_sort="pv_name,pvseg_start"
+	pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
+	pvsegs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
+}
diff --git a/conf/default.profile.in b/conf/default.profile.in
deleted file mode 100644
index cc0279b..0000000
--- a/conf/default.profile.in
+++ /dev/null
@@ -1,53 +0,0 @@
-# This is a default profile for the LVM2 system.
-# It contains all configuration settings that are customizable by profiles.
-#
-# To create a new profile, select the settings you want to customize
-# and put them in a new file named <profile_name>.profile. Then put this
-# file in a directory as defined by config/profile_dir setting found in
-# @DEFAULT_SYS_DIR@/lvm.conf file.
-#
-# Refer to 'man lvm.conf' for further information about profiles and file layout.
-
-allocation {
-	thin_pool_zero=1
-	thin_pool_discards="passdown"
-	thin_pool_chunk_size_policy="generic"
-#	thin_pool_chunk_size=64
-}
-global {
-	units="h"
-	si_unit_consistency=1
-	suffix=1
-	lvdisplay_shows_full_device_path=0
-}
-activation {
-	thin_pool_autoextend_threshold=100
-	thin_pool_autoextend_percent=20
-}
-report {
-	aligned=1
-	buffered=1
-	headings=1
-	separator=" "
-	prefixes=0
-	quoted=1
-	colums_as_rows=0
-	devtypes_sort="devtype_name"
-	devtypes_cols="devtype_name,devtype_max_partitions,devtype_description"
-	devtypes_cols_verbose="devtype_name,devtype_max_partitions,devtype_description"
-	lvs_sort="vg_name,lv_name"
-	lvs_cols="lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,move_pv,mirror_log,copy_percent,convert_lv"
-	lvs_cols_verbose="lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile"
-	vgs_sort="vg_name"
-	vgs_cols="vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
-	vgs_cols_verbose="vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
-	pvs_sort="pv_name"
-	pvs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
-	pvs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
-	segs_sort="vg_name,lv_name,seg_start"
-	segs_cols="lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
-	segs_cols_verbose="lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
-	pvsegs_sort="pv_name,pvseg_start"
-	pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
-	pvsegs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
-}
diff --git a/conf/metadata_profile_template.profile.in b/conf/metadata_profile_template.profile.in
new file mode 100644
index 0000000..81633b2
--- /dev/null
+++ b/conf/metadata_profile_template.profile.in
@@ -0,0 +1,24 @@
+# This is a metadata profile template for the LVM2 system.
+#
+# It contains all configuration settings that are customizable by metadata
+# profiles. To create a new metadata profile, select the settings you want
+# to customize and add them in a new file named <profile_name>.profile.
+# Then install the new profile in a directory as defined by config/profile_dir
+# setting found in @DEFAULT_SYS_DIR@/lvm.conf file.
+#
+# Metadata profiles can be referenced by using the --metadataprofile LVM2
+# command line option.
+#
+# Refer to 'man lvm.conf' for further information about profiles and
+# general configuration file layout.
+#
+allocation {
+	thin_pool_zero=1
+	thin_pool_discards="passdown"
+	thin_pool_chunk_size_policy="generic"
+#	thin_pool_chunk_size=64
+}
+activation {
+	thin_pool_autoextend_threshold=100
+	thin_pool_autoextend_percent=20
+}
diff --git a/configure b/configure
index dd5ec64..49a89c2 100755
--- a/configure
+++ b/configure
@@ -11530,7 +11530,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
 
 
 ################################################################################
-ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile conf/Makefile conf/example.conf conf/default.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile python/Makefile python/setup.py scripts/blkdeactivate.s
 h scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat at .service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
+ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile conf/Makefile conf/example.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile lib/cache_segtype/Makefile libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile
  python/Makefile python/setup.py scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cluster_activation_red_hat.sh scripts/lvm2_cluster_activation_systemd_red_hat.service scripts/lvm2_clvmd_systemd_red_hat.service scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat at .service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -12241,7 +12241,8 @@ do
     "daemons/lvmetad/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/lvmetad/Makefile" ;;
     "conf/Makefile") CONFIG_FILES="$CONFIG_FILES conf/Makefile" ;;
     "conf/example.conf") CONFIG_FILES="$CONFIG_FILES conf/example.conf" ;;
-    "conf/default.profile") CONFIG_FILES="$CONFIG_FILES conf/default.profile" ;;
+    "conf/command_profile_template.profile") CONFIG_FILES="$CONFIG_FILES conf/command_profile_template.profile" ;;
+    "conf/metadata_profile_template.profile") CONFIG_FILES="$CONFIG_FILES conf/metadata_profile_template.profile" ;;
     "include/.symlinks") CONFIG_FILES="$CONFIG_FILES include/.symlinks" ;;
     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
diff --git a/configure.in b/configure.in
index 3a8e5d9..6fbba27 100644
--- a/configure.in
+++ b/configure.in
@@ -1783,7 +1783,8 @@ daemons/dmeventd/plugins/thin/Makefile
 daemons/lvmetad/Makefile
 conf/Makefile
 conf/example.conf
-conf/default.profile
+conf/command_profile_template.profile
+conf/metadata_profile_template.profile
 include/.symlinks
 include/Makefile
 lib/Makefile
diff --git a/spec/packages.inc b/spec/packages.inc
index e70f6ad..4862430 100644
--- a/spec/packages.inc
+++ b/spec/packages.inc
@@ -148,7 +148,8 @@ fi
 %dir %{_sysconfdir}/lvm
 %ghost %{_sysconfdir}/lvm/cache/.cache
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/default.profile
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/command_profile_template.profile
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/metadata_profile_template.profile
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/profile/thin-performance.profile
 %dir %{_sysconfdir}/lvm/backup
 %dir %{_sysconfdir}/lvm/cache




More information about the lvm-devel mailing list