I want to convert the 3TB 80% full ext4 block device into btrfs and I want to estimate the risks involved in the process.
If I accidentally lose power to the system during the conversion, will I lose the data?
In my two-year experience with btrfs, the file system proved only to be
moderately safe during the power loss accidents – it destroyed some of
my data, if the power was lost two or more times in the row.
Best Answer
The data loose most possible due controller write operation failure to disk, while its possible that whole disk partition table would be corrupted.
As it was said, make a backup prior, but the conversion operation it self is designed so, that NO ORIGINAL DATA is touched. Btrfs makes snapshot of original FS version and uses free blocks to make further operations.
If you will create fresh ext4 FS on 100GB partition and run
then unmount and run conversion:
then mount run df again, and you will see something like this:
The rest of space is used by primary FS snapshot. Only system administrator will decide when it is safe to remove snapshot and allow original data to be overwritten.
To recover free space and make the conversion permanent, do:
That's it :)