Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wish to convert my current /home partition to BTRFS (or other file systems) without losing data if possible, what steps should I take for this? is it safe?

share|improve this question

1 Answer

up vote 9 down vote accepted

If you install btrfs-tools with sudo apt-get install btrfs-tools, then the btrfs-convert command is made available to you.

First run an fsck:

sudo fsck.ext3 -f /dev/xxx

Then, convert!

sudo btrfs-convert /dev/xxx

To rollabck, run:

sudo btrfs-convert -r /dev/xxx

To clean up a bit of space, and make the conversion permanent, delete /ext2_saved/image on the partition.

Of course, while this is a relatively safe procedure as only 1 MB needs to be moved, and the original Ext2/3/4 FS is available as an image, it is up to you to decide whether to back up. As with any filesystem operations, there is an inherent risk of data loss.

Your data stays in place, as well as your Ext4 metadata. However, the first 1 MB is moved, and a series of BTRFS metadata is created within Ext4 free space.

Partial ref: https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.