osbuild2: need specify unit for lvm logical volumes
When creating the logical volumes for the `LVM2CreateStage` we need to explicitly specify the unit byte (`B`) since lvcreate defaults to megabytes.
This commit is contained in:
parent
a9ef16a95e
commit
9bdb67de8d
1 changed files with 3 additions and 1 deletions
|
|
@ -67,7 +67,9 @@ func GenDeviceCreationStages(pt *disk.PartitionTable, filename string) []*Stage
|
|||
volumes := make([]LogicalVolume, len(ent.LogicalVolumes))
|
||||
for idx, lv := range ent.LogicalVolumes {
|
||||
volumes[idx].Name = lv.Name
|
||||
volumes[idx].Size = fmt.Sprintf("%d", lv.Size)
|
||||
// NB: we need to specify the size in bytes, since lvcreate
|
||||
// defaults to megabytes
|
||||
volumes[idx].Size = fmt.Sprintf("%dB", lv.Size)
|
||||
}
|
||||
|
||||
stage := NewLVM2CreateStage(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue