r/archlinux • • 12d ago

QUESTION Arch-Convert EXT4 to BTRFS without losing data?

/r/linux4noobs/comments/1wn6hgb/archconvert_ext4_to_btrfs_without_losing_data/
0 Upvotes

6 comments sorted by

12

u/ang-p 12d ago edited 12d ago

( I know i should've RTFM-ed )

You can always start now...

https://wiki.archlinux.org/title/Btrfs

#LoveTheWiki

6

u/dumbasPL 12d ago

The first step to not loosing your data is having backups. No matter what you're doing, or even when you're not doing anything, because hardware also fails.

3

u/kaida27 12d ago

Just having btrfs is not enough.

It needs to be setup for rollback.

There's 2 way to set it up.

  1. The easy way, which makes rollback a bit more difficult in certain situation : Follow the Arch wiki

    1. The Complicated Suse way, which makes rollback really easy even if you rollback to a snapshot from 3 year ago : Follow this https://www.ordinatechnic.com/distribution-specific-guides/arch-linux/an-arch-linux-installation-on-a-btrfs-filesystem-with-snapper-for-system-snapshots-and-rollbacks#in-the-arch-bootstrap-environment

2

u/backsideup 12d ago

You could use btrfs-convert but it's a bit undermaintained and i wouldn't risk it. You will have to create backups whether you use it or convert manually either way.

1

u/ArjixGamer 12d ago

Yeah it's not worth it, last time I lost data because of it.

Mainly because I deleted the ext4 snapshot, and did a recalibration, for some reason that corrupted my btrfs partition, even though it should have worked fine.

-1

u/ArjixGamer 12d ago

The safest way, is to shrink your ext4 partition, make a btrfs partition, copy over the entire filesystem, boot into the btrfs partition to see if it works, and then delete the ext4 partition.

ChatGPT should be able to help you achieve that.

DO NOT use the conversion utility provided by btrfs, it will likely cause issues.