Installation on Ubuntu 24.04 This adds a mirror to an existing Ubuntu ZFS boot drive
-
Install Ubuntu Desktop 24.04
-
For the "Erase disk and install Ubuntu" option, click "Advanced Features" and choose "Experimental ZFS"
-
Continue install as normal and boot into Ubuntu....
All work will be done from CLI. Open a Terminal.
-
Update Ubuntu:
sudo apt update && sudo apt dist-upgrade -
Find the names of your two disks , The first disk will have three / four partitions, (Four , if you have swap memmory)
ls -l /dev/disk/by-id
-
Let's set variables for those disk paths so we can refer to them in the following
DISK1=/dev/disk/by-id/scsi-disk1 DISK2=/dev/disk/by-id/scsi-disk2
-
List partitions , you expect to see three or four of them
sudo sgdisk -p $DISK1
If three:
EFI
boot
root
If four:
EFI
swap
boot
root
-
Copy partition table from disk 1 to disk 2:
sudo sgdisk -R$DISK2 $DISK1
-
Confirm that disk 1 partition 2 is the device in the bpool by comparing "Partition by-ID" to the device name shown in zpool status:
sudo sgdisk -i2 $DISK1andzpool status bpool -
Add that partition to the pool: for example
sudo zpool attach bpool DISK-PART2 /dev/disk/by-id/DISK_PART2sudo zpool attach bpool EXISTING-ID /dev/disk/by-id/DISK2-part2, -
Verify with
zpool status bpool. You expect to see mirror-0 now, which has been resilvered
-
Confirm that disk 1 partition 3 is the device in the rpool by comparing "Partition by-ID" to the device nmae shown in zpool status:
sudo sgdisk -i3 $DISK1andzpool status rpool -
Add that partition to the pool: , for example
sudo zpool attach rpool DISK-PART3 /dev/disk/by-id/DISK-PART3sudo zpool attach rpool EXISTING-ID /dev/disk/by-id/DISK2-PART3 -
Verify with
zpool statusrpool. You expect to see mirror-0 now, which either is resilvering or has been resilvered
Install GRUB on both the disk by sudo grub-install /dev/sda and sudo grub-install /dev/sdb
Try removing HDD1 and boot the machine or remove HDD1 on the live running machine and test does it automatically works with HDD2



