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
```
This commit is contained in:
Mehran Kholdi 2021-07-01 21:53:00 +04:30
parent eff26e8c3e
commit 6d8c7738f3
1 changed files with 2 additions and 1 deletions

View File

@ -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[