0

I have a disc with a few hundred gigs of relatively unimportant data which I've converted from ext4 to btrfs. The conversion has produced a new empty btrfs partition with a snapshot called "ext2_saved" (yes ext2 not ext4...?). Within the folder ext2_saved I find a file named image.

I now want to copy the files from the old ext4 filesystem into the new btrfs filesystem, but despite extensive googling I can't find a way to do this. I would assume I have to mount the image file somehow but mount loop doesn't work. I haven't got a blank HDD to dd it to but I can order one if this is an option.

Edit: I've now rolled back the conversion which was successful. I now have the following partition:

Device     Boot Start        End    Sectors Size Id Type
/dev/sdb1        2048 4294967294 4294965247   2T 83 Linux

But when I try to mount this I get "wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error."

Any ideas...?

4
  • It's weird that the filesystem is empty. See if this helps: btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3/… Commented May 18, 2020 at 10:39
  • I've replied by editing above, won't let me post what I need in this comment box!
    – jlparsons
    Commented May 18, 2020 at 13:12
  • What command are you using to mount the filesystem? Commented May 18, 2020 at 14:18
  • I don't recall now but similar to mount -o loop /path/to/image /mnt/disk
    – jlparsons
    Commented May 18, 2020 at 16:05

1 Answer 1

0

Conclusion;

Still not sure what had gone wrong, but it turned out that converting MBR to GPT on the disk and then running a fsck -y on the volume fixed it. I was then able to mount the partition and copy off the data.

Lesson; playing with converting filesystems is fun but occasionally frustrating.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .