mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
Add resize check for XFS formatted FS
Lock out parellel requests against same volumeID Remove pod after resize and validation in E2E Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
8e437244de
commit
7c8e66e427
@ -815,14 +815,13 @@ func cleanupRBDImageMetadataStash(path string) error {
|
||||
}
|
||||
|
||||
// resizeRBDImage resizes the given volume to new size
|
||||
func resizeRBDImage(ctx context.Context, rbdVol *rbdVolume, cr *util.Credentials) error {
|
||||
func resizeRBDImage(rbdVol *rbdVolume, newSize int64, cr *util.Credentials) error {
|
||||
var output []byte
|
||||
|
||||
mon := rbdVol.Monitors
|
||||
image := rbdVol.RbdImageName
|
||||
volSzMiB := fmt.Sprintf("%dM", rbdVol.VolSize)
|
||||
volSzMiB := fmt.Sprintf("%dM", newSize)
|
||||
|
||||
klog.V(4).Infof(util.Log(ctx, "rbd: resize %s size %s using mon %s, pool %s "), image, volSzMiB, mon, rbdVol.Pool)
|
||||
args := []string{"resize", image, "--size", volSzMiB, "--pool", rbdVol.Pool, "--id", cr.ID, "-m", mon, "--keyfile=" + cr.KeyFile}
|
||||
output, err := execCommand("rbd", args)
|
||||
|
||||
|
Reference in New Issue
Block a user