-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Description
bor@bor-Latitude-E5450:~/src/python-btrfs$ git describe HEAD
v11
bor@bor-Latitude-E5450:~/src/python-btrfs$ ./bin/btrfs-space-calculator -m raid0 -d raid5 3T 1T 2T
Traceback (most recent call last):
File "./bin/btrfs-space-calculator", line 189, in <module>
main()
File "./bin/btrfs-space-calculator", line 158, in main
usage = btrfs.fs_usage.FsUsage(fs)
File "/home/bor/src/python-btrfs/bin/btrfs/fs_usage.py", line 449, in __init__
dev_extent_length = btrfs.volumes.chunk_to_dev_extent_length(chunk)
File "/home/bor/src/python-btrfs/bin/btrfs/volumes.py", line 212, in chunk_to_dev_extent_length
return chunk_length_to_dev_extent_length(chunk.type, chunk.num_stripes, chunk.length)
File "/home/bor/src/python-btrfs/bin/btrfs/volumes.py", line 192, in chunk_length_to_dev_extent_length
dev_extent_length = raw_data_bytes // num_data_stripes
ZeroDivisionError: integer division or modulo by zero
bor@bor-Latitude-E5450:~/src/python-btrfs$ ./bin/btrfs-space-calculator -m raid0 -d raid6 3T 1T 2T
Target metadata profile: RAID0
Target data profile: RAID6
Mixed block groups: False
Total raw filesystem size: 5.46TiB
Device sizes:
Device 1: 2.73TiB
Device 2: 931.32GiB
Device 3: 1.82TiB
Metadata to data ratio: 1:200
Estimated virtual space to use for metadata: 5.00GiB
Estimated virtual space to use for data: 929.66GiB
Total unallocatable raw amount: 2.73TiB
Unallocatable raw bytes per device:
Device 1: 1.82TiB
Device 2: 0.00B
Device 3: 931.32GiB
bor@bor-Latitude-E5450:~/src/python-btrfs$
It does not matter whether I use raid5 for data or metadata. Other profiles seem to work after quick testing.