summaryrefslogtreecommitdiff
path: root/tools/vgcreate.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2019-08-01 10:06:47 -0500
committerDavid Teigland <teigland@redhat.com>2019-08-01 10:06:47 -0500
commit0404539edb25e4a9d3456bb3e6b402aa2767af6b (patch)
treee46b137a78e7071cbd9372c39dbcdd4f35fc16aa /tools/vgcreate.c
parentc1996c78c18ee0b555e4f7eba16858d8dd4fa0a1 (diff)
downloadlvm2-0404539edb25e4a9d3456bb3e6b402aa2767af6b.tar.gz
vgcreate/vgextend: restrict PVs with mixed block sizes
Avoid having PVs with different logical block sizes in the same VG. This prevents LVs from having mixed block sizes, which can produce file system errors. The new config setting devices/allow_mixed_block_sizes (default 0) can be changed to 1 to return to the unrestricted mode.
Diffstat (limited to 'tools/vgcreate.c')
-rw-r--r--tools/vgcreate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/vgcreate.c b/tools/vgcreate.c
index d594ec110..09b6a6c95 100644
--- a/tools/vgcreate.c
+++ b/tools/vgcreate.c
@@ -47,6 +47,8 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
/* Don't create a new PV on top of an existing PV like pvcreate does. */
pp.preserve_existing = 1;
+ pp.check_consistent_block_size = 1;
+
if (!vgcreate_params_set_defaults(cmd, &vp_def, NULL))
return EINVALID_CMD_LINE;
vp_def.vg_name = vg_name;