Creating a BTRFS RAID 1 Volume to hold Data during Syrup Mk2 Migration
Creating a BTRFS RAID 1 Volume to hold Data during Syrup Mk2 Migration
Before we tear anything apart, we have to make sure that the data we currently have will survive the Syrup Mk1 - Syrup Mk2 Migration.
As it stands right now we have 3 systems:
Synology DS423 - a 4 bay NAS containing 4 8TB HDD's
Data so far only stretches to about 1TB which gives us an opportunity
Thinkcentre M900 Tiny Serving as our Proxmox Server
Mostly unused 2 TB SATA SSD acting as Secondary Drive in System
Syrup MK1 with a 2 TB SATA SSD acting as a Data Drive in Ubuntu Server - Mostly empty at this point
#===================================================================================================================================#
Wiping the Old SSD Filesystem and set up SSD_Pool (Syrup)
Make sure your system is up to date with:
sudo apt update && sudo apt upgrade -y
First, we unmount everything at /mnt/storage/:
sudo umount /mnt/storage
Us lsblk to check and see if the old SDA1 is mounted to /mnt/storage or not
We’re in luck - it’s not mounted!
Edit the /etc/fstab/ file and comment out the old UUID Line for SDA1:
Reboot the System:
sudo reboot now
Now, delete the filesystem in both SDA1 & SDB1 with:
sudo wipefs -a /dev/sda1
sudo wipefs -a /dev/sdb1
Just a side note: don’t be alarmed if you see the old file system still in /mnt - as you can see all of the files inside of the folders are gone, just before unmounting sda1 all of this in /mnt got put into your main boot disk
#===================================================================================================================================#
Creating The New SATA SSD Filesystems
Here’s essentially the plan outline:
/dev/sda1 + /dev/sdb1
Btrfs RAID1
Label: ssd_pool
Mount: /mnt/ssd_pool
Use this command to make the btrfs RAID 1 file system under sda1 & sdb1:
sudo mkfs.btrfs -L ssd_pool -m raid1 -d raid1 /dev/sda1 /dev/sdb1
Please Note that this command, depending on the size of the drives may take awhile to complete (mine are both 2TB each)
Create the SSD_pool mount directory
Grab the SATA UUID’s from just SDA1 by using:
sudo blkid /dev/sda1
Now edit your /etc/fstab/ file adding the line at the bottom:
UUID=YOUR-UUID-HERE /mnt/ssd_pool btrfs defaults,noatime,compress=zstd,space_cache=v2,autodefrag 0 0
Mount everything and reload the systemctl daemon with:
sudo mount -a
sudo systemctl daemon-reload
Check if your system recognizes the changes with:
df -h
sudo btrfs filesystem df /mnt/ssd_pool
#===================================================================================================================================#
We have now set up a BTRFS RAID 1 Array to hold our Data Redundantly - Next Step is to actually transfer that Data from the Synology DS423 over to Syrup