#!/bin/sh # replace with whatever your additional device is called # /dev/sda should be where your CoreOS install lives right now newdevice="/dev/sdb" # 0 or 1 raidtype="0" # make sure to download the single-partition.layout file as well # create single primary partition on $newdevice (you could also run fdisk interactively, choose p command and use defaults it suggests) sudo sfdisk $newdevice < single-partition.layout # mount current root; I suppose /dev/sda9 would work as well? sudo mount /dev/disk/by-label/ROOT /mnt # add btrfs device sudo btrfs device add /dev/sdb1 /mnt # convert to raid of given type; don't use -mconvert=raid0 but not sure if it's beneficial to add -mconvert=raid1 when making a RAID1 (I think it might be!) sudo btrfs balance start -dconvert=raid$raidtype /mnt # might take a bit, depending on how much data there is to copy over # verify things have worked sudo btrfs fi df /mnt # should show something like... #Data, RAID0: total=6.00GiB, used=303.25MiB #System, DUP: total=8.00MiB, used=16.00KiB #System, single: total=4.00MiB, used=0.00 #Metadata, DUP: total=108.06MiB, used=18.78MiB #Metadata, single: total=8.00MiB, used=0.00 #unknown, single: total=16.00MiB, used=0.00 # clean up sudo umount /mnt