Noob here. I’m currently using Ubuntu 21.04 with ext4 on an internal 2TB nvme drive (AMD Ryzen with no dual boot). I want to upgrade to 21.10 with btrfs. I’m assuming I need to totally wipe out 21.04 and do a clean install of 21.10 in order to go from ext4 to btrfs. If this assumption is wrong, let me know.
I’ll first do a Clonezilla clone of my main hard drive to an external drive, just in case. Also I’ll have multiple backups of all my user files (FeeFileSync and Restic).
I’ll have Ubuntu 21.10 loaded onto a USB stick ready to install. I’ll select btrfs during the 21.10 install process.
What else do I need to do to help assure this upgrade goes smoothly? I’m a newbie and very much a beginner with Linux. I have very very limited knowledge of the command line. What are the common problems that arise when doing this kind of upgrade?
Yes, you need to reinstall completely to be able to use btrfs. Then it should be all good after you select btrfs from the installer. I am just not sure how far Ubuntu’s implementation of btrfs goes. For example openSUSE and Fedora use btrfs by default whereas Ubuntu uses ext4. So you have to enable it at install time.
Does this mean that Ubuntu has a reputation of many problems and bugs and crashes when run with btrfs? Does this mean that Ubuntu is not really designed or poorly designed to work with btrfs?
Others may have had different experiences and although I have never, yet, used btrfs on a desktop machine my home server is running Ubuntu Server 20.04 with btrfs and has been very reliable.
I’ve even had a couple of disk failures (not both at once ) and btrfs recovered easily enough after replacing the failed drive.
Update: I’ve adjusted the forum settings so you should be able to edit your inital posts now if you’d like to give it a test. I recently became an admin so I can make changes.
You can convert an ext4 fs to btrfs with the btrfs-convert tool
From the man page.
BTRFS-CONVERT(8) Btrfs Manual BTRFS-CONVERT(8)
NAME
btrfs-convert - convert from ext2/3/4 or reiserfs filesystem to btrfs in-place
SYNOPSIS
btrfs-convert [options] <device>
DESCRIPTION
btrfs-convert is used to convert existing source filesystem image to a btrfs filesystem in-place. The original filesystem image is accessible in subvolume named like ext2_saved as file image.
Supported filesystems:
• ext2, ext3, ext4 — original feature, always built in
• reiserfs — since version 4.13, optionally built, requires libreiserfscore 3.6.27
The list of supported source filesystem by a given binary is listed at the end of help (option --help).
Warning
If you are going to perform rollback to the original filesystem, you should not execute btrfs balance command on the converted filesystem. This will change the extent layout and make btrfs-convert
unable to rollback.
The conversion utilizes free space of the original filesystem. The exact estimate of the required space cannot be foretold. The final btrfs metadata might occupy several gigabytes on a
hundreds-gigabyte filesystem.
If the ability to rollback is no longer important, the it is recommended to perform a few more steps to transition the btrfs filesystem to a more compact layout. This is because the conversion
inherits the original data blocks' fragmentation, and also because the metadata blocks are bound to the original free space layout.
Due to different constraints, it is only possible to convert filesystems that have a supported data block size (ie. the same that would be valid for mkfs.btrfs). This is typically the system page size
(4KiB on x86_64 machines).
I’ve looked into btrfs-convert and it looks very compelling. Soon I’ll purchase another external drive so I’ll have 2 Clonezilla clones before I try btrfs-convert.