You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnil, status.Error(codes.Internal, fmt.Sprintf("ControllerExpandVolume error checking format for device %s: %v", devicePath, err))
410
+
}
411
+
ifformat=="" {
412
+
// Block volume
413
+
gotSizeGb, err:=getBlockSizeGb(devicePath)
414
+
iferr!=nil {
415
+
returnnil, status.Error(codes.Internal, fmt.Sprintf("ControllerExpandVolume error when getting size of block volume at path %s: %v", devicePath, err))
416
+
}
417
+
ifgotSizeGb!=common.BytesToGb(reqBytes) {
418
+
returnnil, status.Errorf(codes.Internal, "ControllerExpandVolume resize requested for %v but after resize volume was size %v", common.BytesToGb(reqBytes), gotSizeGb)
419
+
}
420
+
} else {
421
+
// Some sort of formatted volume
422
+
gotSizeGb, err:=getFSSizeGb(volumePath)
423
+
iferr!=nil {
424
+
returnnil, status.Errorf(codes.Internal, "ControllerExpandVolume resize could not get fs size of %s: %v", volumePath, err)
425
+
}
426
+
ifgotSizeGb!=common.BytesToGb(reqBytes) {
427
+
returnnil, status.Errorf(codes.Internal, "ControllerExpandVolume resize requested for size %v but after resize volume was size %v", common.BytesToGb(reqBytes), gotSizeGb)
0 commit comments