One disk setup for ZFS mirror or RAID-1 configuration
One disk setup for ZFS mirror or RAID-1 configuration
Hey there, I understand you're looking into setting up a ZFS mirror on a single SSD without reinstalling the OS. It's a smart approach since you want to avoid losing your server if the SSD fails. You mentioned considering RAID-1, which is a solid option. I'd be happy to walk you through the steps and help you explore the best way forward. Let me know how you'd like to proceed!
Ubuntu 18.04.5 LTS has only two partitions available. Data safety is your priority, so I’d suggest using ZFS mirror or RAID-1 to protect against loss. There’s a difference between them depending on your needs.
I mentioned that if you're concerned about data loss, regular backups are the way to go rather than drive mirroring. Mirroring helps guard against corruption, not loss. There are several automated backup solutions you can explore. That’s what I suggest. If you're keen to use ZFS, the safest approach might be creating a complete binary copy of your SSD to another drive, forming a ZFS pool from the two SSDs, and setting up subvolumes of equal size with RAID-Z mirroring. Then you can transfer all data to the new setup. Afterward, update your fstab and boot settings according to the official instructions. Finally, reinstall GRUB following the proper steps. Hardware RAID would be simpler: make a full copy, build your RAID card, and perform a binary transfer of data from the backup drive to the new RAID unit. Update your fstab with the RAID drive’s UUID and it should function correctly. In my view, you can't achieve this in-place without risking total data loss, whether using ZFS or hardware RAID.