Skip to content

Commit ea0568a

Browse files
Scott Mosersmoser
authored andcommitted
Create VGs with metadata size of 128MiB.
The default metadata size (vg_mda_size) is 4MiB. We have had experience where this is limiting. So just bump the size to 128MiB.
1 parent bc919ab commit ea0568a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

linux/lvm.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ func (ls *linuxLVM) HasPV(name string) bool {
201201
}
202202

203203
func (ls *linuxLVM) CreateVG(name string, pvs ...disko.PV) (disko.VG, error) {
204-
cmd := []string{"lvm", "vgcreate", "--zero=y", name}
204+
mdSize := 128 * disko.Mebibyte // nolint:gomnd
205+
cmd := []string{"lvm", "vgcreate",
206+
fmt.Sprintf("--metadatasize=%dB", mdSize),
207+
"--zero=y", name}
208+
205209
for _, p := range pvs {
206210
cmd = append(cmd, p.Path)
207211
}

0 commit comments

Comments
 (0)