Skip to content

Commit

Permalink
Add --metadatasize on pvcreate.
Browse files Browse the repository at this point in the history
If the caller did a CreatePV and then a CreateLV, then the explicitly
created PV would not have the  metadatasize that we wanted (128MiB).

Change here is to just add the --metadatasize=128MiB to the
'lvm pvcreate' call.
  • Loading branch information
Scott Moser committed Oct 20, 2020
1 parent 3b158b9 commit 0b8990d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion linux/lvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ func (ls *linuxLVM) CreatePV(name string) (disko.PV, error) {
return nilPV, err
}

err = runCommandSettled("lvm", "pvcreate", "--zero=y", path)
err = runCommandSettled("lvm", "pvcreate", "--zero=y",
fmt.Sprintf("--metadatasize=%dB", pvMetaDataSize), path)

if err != nil {
return nilPV, err
Expand Down

0 comments on commit 0b8990d

Please sign in to comment.