while this is possible… i am not sure to recommend this 😀

also make sure there is still some space on the partition to be converted.

root@debian9:/# btrfs-convert /dev/sdb6
create btrfs filesystem:
        blocksize: 4096
        nodesize:  16384
        features:  extref, skinny-metadata (default)
ERROR: unable to create initial ctree: No space left on device
WARNING: an error occurred during conversion, filesystem is partially created but not finalized and not mountable

i was able to remount the partition and delete some files.

if there is space… transformation should work 😀

btrfs-convert /dev/sdb6
create btrfs filesystem:
        blocksize: 4096
        nodesize:  16384
        features:  extref, skinny-metadata (default)
creating ext2 image file
creating btrfs metadatacopy inodes [o] [         0/        13]

so the once ext3 partition is now btrfs… wohoo! 😀

root@debian9:/# lsblk -fs
NAME  FSTYPE LABEL UUID                                 MOUNTPOINT
sdb6  btrfs  ext3  bc584588-19fd-4a10-b880-25bbe3b95bfc

there will be a folder created:

root@debian9:~# ll /mnt/ext3_btrfs_converted/ext2_saved
total 248M
drwxr-xr-x 1 root root 10 Jul 7 17:03 .
drwxr-xr-x 1 root root 98 Jul 7 17:03 ..
-r-------- 1 root root 10G Jul 7 17:03 image

the image file is a backup of the prior ext3 partition.

you can reverse back to ext3 via:

btrfs-convert -r /dev/sdb6
rollback complete

all files still there…

root@debian9:~# ll /mnt/ext3
total 84K
drwxr-xr-x  3 root root 4.0K Jul  7 17:03 .
drwxr-xr-x 13 root root 4.0K Jul  7 17:03 ..
drwx------  2 root root  16K Jul  7 17:02 lost+found
-rw-r--r--  1 root root  50K Jun 28 17:01 Richard-Stallman.jpg
-rw-r--r--  1 root root   12 Jul  7 14:48 stuff.txt

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin