Converting a single device BTRFS filesystem to RAID1

After https://blog.wheredoi.click/installing-antergos-linux-with-a-btrfs-filesytem-and-subvolumes-with-uefi/, I took it a step further now.

So I recently bought another Evo SSD to complement my single BTRFS device in a RAID1 setup. My experience with it is not long term like and the setup was very easy to do.

It’s very easy to create a RAID1 mirror from a single device with the following commands:

sudo btrfs device add -f /dev/sda /
sudo btrfs balance start -dconvert=raid1 -mconvert=raid1 /

Where of course /dev/sda has to be changed to the location of the new device and / to the location of the mount point. But I had to use these commands to convert my OS SSD to RAID1. I had to use the force (-f) flag because the command didn’t accept new disks that already contained a filesystem. The dconvert flag sets the mode for the data and mconvert for the metadata.

Be sure to have back-ups of your important data in any case

For around 170GB it took about 30 minutes to complete at the speed the SSDs could do it. And after that the job was done, no changing /etc/fstab or anything else because everything happens in the background. The second device is visible in gnome disks but not as a separate filesystem in system monitor.

sudo btrfs filesystem show

Shows the dual disk setup for the BTRFS filesystem

Now I can scrub the disks and repair damaged files where necessary.

Installing Antergos Linux with a BTRFS filesytem and subvolumes with UEFI

This is an updated tutorial (original is here: Installing Antergos Linux with a BTRFS filesytem and subvolumes) on how to set up an Antergos Linux system with a BTRFS filesystem and several subvolumes in UEFI mode, but this setup can applied to any Linux distro, as long as you know which different steps to take to perform the same actions (note that Ubuntu for example already automatically creates subvolumes for the root folder and the home folder if you choose BTRFS as your filesystem, so this setup wouldn’t apply there). These will allow you to take snapshots of important data and do rollbacks when necessary to restore modified and deleted data, but will also allow you to skip including these subvolumes in other snapshots. Note that this setup will not include any kind of RAID.

Unfortunately the information available on the internet is quite scarce – as a lot goes about the same kind of specific setup, is inconsistent and outdated. Even the official kernel page gives me the feeling some parts are outdated, because some parts of the technology are supposedly not supported, but still I see people apply them. I’m talking for example about mount options. I’m compiling all the useful information into this guide as much as possible.

Continue…

Installing Antergos Linux with a BTRFS filesytem and subvolumes

This is a tutorial on how to set up an Antergos Linux system with a BTRFS filesystem and several subvolumes, but this setup can applied to any Linux distro, as long as you know which different steps to take to perform the same actions (note that Ubuntu for example already automatically creates subvolumes for the root folder and the home folder if you choose BTRFS as your filesystem, so this setup wouldn’t apply there). These will allow you to take snapshots of important data and do rollbacks when necessary to restore modified and deleted data, but will also allow you to skip including these subvolumes in other snapshots. Note that this setup will not include any kind of RAID.

Unfortunately the information available on the internet is quite scarce – as a lot goes about the same kind of specific setup, is inconsistent and outdated. Even the official kernel page gives me the feeling some parts are outdated, because some parts of the technology are supposedly not supported, but still I see people apply them. I’m talking for example about mount options. I’m compiling all the useful information into this guide as much as possible.

Continue…