boot your system in resque mode from OVH console
before qemu run and install wipe all FS on target disks
wipefs -af /dev/nvme*
wget https://releases.ubuntu.com/22.04.2/ubuntu-22.04.2-desktop-amd64.iso
lsblk
printf "change vnc password\n%s\n" MYPASSWORD | qemu-system-x86_64 -enable-kvm -m 10240 -hda /dev/nvme0n1 -hdb /dev/nvme1n1 -cdrom ubuntu-22.04.2-desktop-amd64.iso -boot d -vnc :0,password -monitor stdio
MYPASSWORD
is a password for VNC connection
Use serverip:0
and your password
During install setup Ubuntu with zfs entrie disk to the first of your nvme (in qemu it will show as sda)
ater succeed installation shutdown host and stop qemu in your resque console
then start qemu and set parameter to boot from already installed system in VNC (/dev/nvme0n1)
printf "change vnc password\n%s\n" MYPASSWORD | qemu-system-x86_64 -enable-kvm -m 10240 -hda /dev/nvme0n1 -hdb /dev/nvme1n1 -vnc :0,password -monitor stdio
Qemu will boot to installed Ubuntu.
Install openssh server and enable it:
sudo apt install openssh-server -y
sudo systemctl enable --now ssh
sudo halt
Than exit qemu on rescue console and change system boot to hard drive from OVH console
Login to your machine using ssh Check current pools
zpool list -v
Check that /dev/nvme1n1 is clear
lsblk
Copy partition table from nvme0n1 to nvme1n1
sfdisk -d /dev/nvme0n1 | cut -d, -f 1-3 | sfdisk /dev/nvme1n1
check pool mounted partitions with ID's
blkid | grep PARTU | grep p5
label should be like LABEL="rpool"
blkid | grep PARTU | grep p4
and LABEL="bpool"
Add mirroring partitions for rpool and pbool devices
zpool attach bpool 142fa0ca-ec40-3242-8fbf-16dc3ab0ec6c(/dev/desk/by-id we want to add) 7e4b6644-1a53-da4f-bb2a-f2b626f996ff(/dev/desk/by-id we adding)
And make the simillar rpool Then chack if all as we need
zpool list -v
cd ~
rm -rf {Documents/,Downloads/,Music/,Pictures/,Public/,Templates/,Videos/}
sudo apt purge -y ubuntu-desktop nautilus nautilus-* gnome-power-manager gnome-screensaver gnome-termina* gnome-pane* gnome-applet* gnome-bluetooth gnome-desktop* gnome-sessio* gnome-user* gnome-shell-common zeitgeist-core libzeitgeist* gnome-control-center gnome-screenshot
sudo apt autoremove -y
sudo apt autoclean -y
- enjoy your zfs ubuntu server :)
-bash: qemu-system-x86_64: command not found
then install
apt-get install qemu-system
for pools grep p5 and p4 does not work if using rust disks instead of nvme just grep PARTU