1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Set pv_min_size to 2048KB to exclude floppy drives.

Previously was 512.
This commit is contained in:
Alasdair Kergon 2011-04-28 17:33:34 +00:00
parent 86ba564a9e
commit 2c56f60db4
4 changed files with 13 additions and 7 deletions

View File

@ -6,6 +6,9 @@
#
# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
# the environment variable LVM_SYSTEM_DIR before running the tools.
#
# N.B. Take care that each setting only appears once if uncommenting
# example settings in this file.
# This section allows you to configure which block devices should
@ -155,12 +158,15 @@ devices {
# Allow use of pvcreate --uuid without requiring --restorefile.
require_restorefile_with_uuid = 1
# Minimal size (in KB) of the block device which can be used as a PV.
# In clustered environment all nodes have to use the same value.
# Minimum size (in KB) of block devices which can be used as PVs.
# In a clustered environment all nodes must use the same value.
# Any value smaller than 512KB is ignored.
# Example: Ignore devices smaller than 2MB (i.e. floppy drives).
# pv_min_size = 2048
pv_min_size = 512
# Ignore devices smaller than 2MB such as floppy drives.
pv_min_size = 2048
# The original built-in setting was 512 up to and including version 2.02.84.
# pv_min_size = 512
# Issue discards to a logical volumes's underlying physical volume(s) when
# the logical volume is no longer using the physical volumes' space (e.g.

View File

@ -325,7 +325,7 @@ static int _process_config(struct cmd_context *cmd)
pv_min_kb, DEFAULT_PV_MIN_SIZE_KB);
pv_min_kb = DEFAULT_PV_MIN_SIZE_KB;
}
/* lvm internally works with device size in 512b sectors */
/* LVM stores sizes internally in units of 512-byte sectors. */
init_pv_min_size((uint64_t)pv_min_kb * (1024 >> SECTOR_SHIFT));
return 1;

View File

@ -39,6 +39,7 @@
#define DEFAULT_DATA_ALIGNMENT_OFFSET_DETECTION 1
#define DEFAULT_DATA_ALIGNMENT_DETECTION 1
#define DEFAULT_ISSUE_DISCARDS 0
#define DEFAULT_PV_MIN_SIZE_KB 2048
#define DEFAULT_LOCKING_LIB "liblvm2clusterlock.so"
#define DEFAULT_FALLBACK_TO_LOCAL_LOCKING 1

View File

@ -18,7 +18,6 @@
#define VERBOSE_BASE_LEVEL _LOG_WARN
#define SECURITY_LEVEL 0
#define DEFAULT_PV_MIN_SIZE_KB 512 /* 512 KB */
void init_verbose(int level);
void init_test(int level);