From 6d8c7738f3552a4d4f2820d8bd90f65838b9ab3d Mon Sep 17 00:00:00 2001 From: Mehran Kholdi Date: Thu, 1 Jul 2021 21:53:00 +0430 Subject: [PATCH] Do not create volumes smaller than 16MiB XFS fails in formatting the volume with the following error: ``` agsize (2560 blocks) too small, need at least 4096 blocks ``` --- rawfile_servicer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rawfile_servicer.py b/rawfile_servicer.py index 11a88d2..0f28f3d 100644 --- a/rawfile_servicer.py +++ b/rawfile_servicer.py @@ -166,7 +166,8 @@ class RawFileControllerServicer(csi_pb2_grpc.ControllerServicer): # "PANIC! This should be handled by bd2fs!", # ) - size = request.capacity_range.required_bytes + MIN_SIZE = 16 * 1024 * 1024 # 16MiB: can't format xfs with smaller volumes + size = max(MIN_SIZE, request.capacity_range.required_bytes) try: node_name = request.accessibility_requirements.preferred[0].segments[