convert ext4 to btrfs (vserver)

I wanted to convert my file system from ext4 to btrfs btrfs-convert /dev/sda1
works without problems
only the mounting is not possible
in live system mount /dev/sda1 /mnt
on a Arch Linux Server
Hetzner Cloud

Tried multiple times with no luck

Can you share the exact mount command you are using and the output?

Have you tried?

mount -t btrfs /dev/sda1 /mnt

failes with errors reproduced now:

doesn't work @dalto

mkfs.btrfs /dev/sda1 Needs to be done before mounting the drive right? > deletes all data on the disk

I believe that will format it.

What are you trying to accomplish here?

I only accomplish a converted filesystem from ext4 to btrfs, without losing data. But it doesn’t work for me.

Well, if your goal is to not lose data, you definitely shouldn't run mkfs.

It looks to me like the conversion was....imperfect. That being said, I am not expert so you might want to wait for someone else or post on the btrfs forum/list for help.

1 Like

okay all good, @dalto I stay at ext4 because I have no luck on this; tried fstransform also dosen't work because it fills up the drives and end up with errors

i hope you made a backup before you ran convert.
If you did, why don't you just delete the partition and recreate it as btrfs?

if you did not make a backup, and the convert screwed up, the data is lost anyway.

of course, have made a Snapshot

it is a very risky expedition converting a ext4 to btrfs. it is better that you back all info up and then do a fresh reinstall

Would be complex to backup files from a vserver I stay on ext4.

Forum kindly sponsored by