koverstreet / bcachefs

Other
662 stars 70 forks source link

Surprising size calculation with read-only devices #715

Open Lykos153 opened 1 month ago

Lykos153 commented 1 month ago

What I noticed (which may or may not be related to #713), is that the calculation of the filesystem´s Size and Used is somewhat surprising for me:

After initially setting device 2 to ro (because I suspeced it to maybe soon fail), neither Size nor Used changed and I was able to continue normally.

Then after adding another device, Size jumped to the sum of the capacity of all rw devices but Used didn't change (I think it was capped at Size) which, because the new device was smaller than device 2, meant that my file system was suddenly full even though there was actually more free space than before.

What I did then was setting device 2 to rw and then immediately back to ro which fixed Size to include all devices.

I think the expected behavior for me would be for Size to be the sum of the capacity of all ro drives plus the sum of all used space on ro drives.