btrfs-convert: whats minimum free space requirement?
Hi.
Just wanted to check whether do we have any numbers on whats the minimum free space requirement on source file system for btrfs-convert to work?
ex: Like 5% of ext3/4 free space is needed for
btrfs-convert to succeed?
Cheers.
Lakshmipathi.G
Quoted 17 lines · Qu Wenruo
Quoted 2 lines
ex: Like 5% of ext3/4 free space is needed for
btrfs-convert to succeed?That's hard to say.
It's not only dependent on how much free space is here, but also how continuous the free space is.
In convert, it needs the following continuous space at least:
1) 64K for temporary btrfs super block
2) 4M for system chunk
3) 32M for metadata chunk.Further more, we want to keep chunks at reasonable size, that's to say we want each used data space on old fs is covered by a chunk >= 32M.
Quoted 7 lines
For worst case, if the free space in old fs is so scattered, either we can't find continuous for sys/meta chunk, or used data space is so scattered that we can't find free space after rounding up data chunks, then we can't do convert.
Thanks,
Qu
Thanks for the details, Qu.
I was thinking about adding a free-space check (based on total blocks/free block stat from source superblock) before btrfs-convert begins, looks like its more complex than i thought.
Cheers.
Lakshmipathi.G
Quoted 11 lines · Qu Wenruo
Quoted 3 lines
I was thinking about adding a free-space check (based on total blocks/free block stat from source superblock) before btrfs-convert begins, looks like its more complex than i thought.
BTW, it's already done, since it's complex, btrfs-convert will try to calculate it early on, so even it fails to find the needed space, it will not screw up the old fs.
Thanks,
QuQuoted 1 line
oh, I didn't realize that, thanks. Will test/try with little free space and check the returning error messages.
Cheers.
Lakshmipathi.G