Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
769 B · 22 lines
Python
at main
1234567891011121314151617181920212223from pathlib import Path
VM_NAME = 'topolvm-stratis-test'VM_SOCK_DIR = Path(f'~/.lima/{VM_NAME}/sock').expanduser()
SIZE_GIB = 1024 * 1024 * 1024
# Thin pool sizes are truncated down to be sized by a integer number of "data# blocks", so we need to apply the inverse transformation to the expected# overhead.def _round_up_to_data_blocks(n: int) -> int: # 2Ki sectors per data block, 512 bytes per sector BYTES_PER_DATA_BLOCK = 2 * 1024 * 512 return n + (BYTES_PER_DATA_BLOCK - n % BYTES_PER_DATA_BLOCK)
SIZE_TEST_POOL = 16 * SIZE_GIB# The base usage is derived from:# stratis-predict-usage pool --device-size $((16*1024*1024*1024)) | jq .used# This used to be 532 MiB with v1 pools.SIZE_TEST_POOL_OVERHEAD = _round_up_to_data_blocks(978325504)