0

I've got a corrupt btrfs partition, and also because of its low speed, I am thinking of 'converting' it to ext4, how can I convert a root partition from btrfs to ext4 without loosing the ability to boot, .. I am willing to do it manually, but I am not sure how to do it, or is there a better option ?

 # btrfsck /dev/sda1
root 257 inode 3064 errors 400
root 257 inode 43998 errors 400
root 257 inode 44001 errors 400
root 257 inode 44003 errors 400
root 257 inode 44007 errors 400
root 257 inode 100607 errors 400
found 1677811712 bytes used err is 1
total csum bytes: 1430484
total tree bytes: 201265152
total fs tree bytes: 186617856
btree space waste bytes: 51677064
file data blocks allocated: 1636151296
 referenced 2796367872
Btrfs Btrfs v0.19

/etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=f46eee48-3256-4e22-9928-4743074ba775 /               btrfs   defaults,subvol=@,compress-force 0       1
# /home was on /dev/sda1 during installation
UUID=f46eee48-3256-4e22-9928-4743074ba775 /home           btrfs   defaults,subvol=@home,compress-force 0       2
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

This will not work, since it was a btrfs partition all along:

How can I convert my root partition from BTRFS to EXT4?

sharp12345
  • 197
  • 2
  • 5
  • Since btrfs keeps 2 copies of the metadata by default, I'd go with a `btrfs scrub start`, wait for it to complete, and then redo `btrfsck` to see whether the errors have gone away. Anyway [btrfsck is read-only by default](https://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg31533.html) so there is no harm in redoing it. – ignis Mar 31 '14 at 08:01
  • Also note that you should have `0 0` in fstab, since btrfs [does not need to be fsck'ed on every boot nor after an unclean shutdown](https://btrfs.wiki.kernel.org/index.php/FAQ#What.27s_the_difference_between_btrfsck_and_fsck.btrfs) – ignis Mar 31 '14 at 08:02

0 Answers0