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.

Leave a Reply

Your email address will not be published. Required fields are marked *