From 5ee428cad6eced0bb98e1932e91dc93164a1b8d9 Mon Sep 17 00:00:00 2001 From: sinhaashish Date: Thu, 19 Sep 2024 11:39:20 +0000 Subject: [PATCH] fix(reservation): update reservation on volume resize Signed-off-by: sinhaashish --- pkg/zfs/zfs_util.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/zfs/zfs_util.go b/pkg/zfs/zfs_util.go index 2c9b331e2..1c59c7131 100644 --- a/pkg/zfs/zfs_util.go +++ b/pkg/zfs/zfs_util.go @@ -299,6 +299,11 @@ func buildVolumeResizeArgs(vol *apis.ZFSVolume) []string { ZFSVolArg = append(ZFSVolArg, volsizeProperty) } + if vol.Spec.ThinProvision == "no" { + reservationProperty := "reservation=" + vol.Spec.Capacity + ZFSVolArg = append(ZFSVolArg, "-o", reservationProperty) + } + ZFSVolArg = append(ZFSVolArg, volume) return ZFSVolArg