diff --git a/pkg/driver/controller.go b/pkg/driver/controller.go index 0ce1c8b0..06bcf67d 100644 --- a/pkg/driver/controller.go +++ b/pkg/driver/controller.go @@ -553,20 +553,17 @@ func (cs *controller) ControllerExpandVolume( * to the specified volume ID is already larger than or equal to the target * capacity of the expansion request, the plugin should reply 0 OK. */ - if volsize >= updatedSize { - return csipayload.NewControllerExpandVolumeResponseBuilder(). - WithCapacityBytes(volsize). - Build(), nil - } - - if err := lvm.ResizeVolume(vol, updatedSize); err != nil { - return nil, status.Errorf( - codes.Internal, - "failed to handle ControllerExpandVolumeRequest for %s, {%s}", - volumeID, - err.Error(), - ) + if volsize < updatedSize { + if err := lvm.ResizeVolume(vol, updatedSize); err != nil { + return nil, status.Errorf( + codes.Internal, + "failed to handle ControllerExpandVolumeRequest for %s, {%s}", + volumeID, + err.Error(), + ) + } } + return csipayload.NewControllerExpandVolumeResponseBuilder(). WithCapacityBytes(updatedSize). WithNodeExpansionRequired(true).