From d52f9a9a57313ff3f252f5c57f6f7cfe96f9a389 Mon Sep 17 00:00:00 2001 From: Alexandre Buisine Date: Wed, 16 Oct 2024 12:57:54 +0200 Subject: [PATCH] fix(reservation): while expanding, with refquota setting (#595) Signed-off-by: Alexandre Buisine --- pkg/zfs/zfs_util.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/zfs/zfs_util.go b/pkg/zfs/zfs_util.go index 77f59dd3c..f0ed321f0 100644 --- a/pkg/zfs/zfs_util.go +++ b/pkg/zfs/zfs_util.go @@ -297,6 +297,10 @@ func buildVolumeResizeArgs(vol *apis.ZFSVolume) []string { ZFSVolArg = append(ZFSVolArg, volsizeProperty) } + if vol.Spec.ThinProvision == "no" { + ZFSVolArg = append(ZFSVolArg, "-o", reservationProperty(vol.Spec.QuotaType, vol.Spec.Capacity)) + } + ZFSVolArg = append(ZFSVolArg, volume) return ZFSVolArg