Skip to content

Commit

Permalink
refactor: rename growRootFileSystem to growFileSystem
Browse files Browse the repository at this point in the history
since it does more than growing only the root file system
it additionally grows the partition used by  topolvm/lvms
operator
  • Loading branch information
anjannath committed Jul 31, 2024
1 parent 7155747 commit 2f814b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/crc/machine/disks.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func ocpGetPVShiftSizeGiB(diskSize int, pvSize int) int {
return diskSize - constants.DefaultDiskSize
}

func growRootFileSystem(ctx context.Context, startConfig types.StartConfig, vm *virtualMachine, sshRunner *crcssh.Runner) error {
func growFileSystem(ctx context.Context, startConfig types.StartConfig, vm *virtualMachine, sshRunner *crcssh.Runner) error {
if startConfig.Preset == crcPreset.OpenShift {
sizeToMove := ocpGetPVShiftSizeGiB(startConfig.DiskSize, startConfig.PersistentVolumeSize)
if err := moveTopolvmPartition(ctx, sizeToMove, vm, sshRunner); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/crc/machine/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func (client *client) Start(ctx context.Context, startConfig types.StartConfig)
}

// Trigger disk resize, this will be a no-op if no disk size change is needed
if err := growRootFileSystem(ctx, startConfig, vm, sshRunner); err != nil {
if err := growFileSystem(ctx, startConfig, vm, sshRunner); err != nil {
return nil, errors.Wrap(err, "Error updating filesystem size")
}

Expand Down

0 comments on commit 2f814b3

Please sign in to comment.