apt-get install openssh-server reboot apt install --yes debootstrap gdisk zfs-initramfs mdadm grub-pc linux-image-generic zsys zpool import rpool zpool import bpool zpool list zpool status zpool status -L grub-probe nano /boot/grub/grub.cfg update-grub zpool export -a zpool import -N -R /mnt rpool zpool import -N -R /mnt bpool zfs load-key -a zfs mount -a zpool list mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys mount -t tmpfs tmpfs /mnt/run chroot /mnt /bin/bash --login mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | xargs -i{} umount -lf {} zpool export -a cd /etc/grub.d/ nano /etc/default/grub update-grub cat /boot/grub/grub.cfg reboot nano /etc/default/grub update-grub reboot fdisk -l zfs list zpool list apt-get install gparted zpool list -L zpool import zpool list -L zpool export zpool export rpool zpool import rpool zpool import bpool zpool export rpool zpool import rpool zpool list -L zpool status -L fdisk -l zpool detach ata-TEAML5Lite3D240G_AB20190109A0101064-part6 zpool export rpool zpool import rpool oldrpool mkdir /oldroot /newroot fdisk /dev/sde .... delete partition six and split it into 2 new partitions .... ls -lsa /dev/disk/by-id/|grep sde7 zpool create rpool ata-TEAML5Lite3D240G_AB20190109A0101064-part7 zpool export oldrpool zpool import -R/oldroot oldrpool zpool export rpool zpool import -R/newroot rpool zfs snapshot -r oldrpool@for_copy zfs send -R oldrpool@for_copy | zfs recv -F rpool zpool list # attach mirror to boot pool. ls -ls /dev/disk/by-partuuid/|grep sde6 zpool attach bpool ata-TEAML5Lite3D240G_AB20190109A0101064-part6 zpool status bpool ata-TEAML5Lite3D240G_AB20190109A0101064-part7 # zpool detach bpool d3bff208-06 zpool status bpool zpool status zpool status rpool update-grub fdisk -l # copy partitions sgdisk -p /dev/sde sgdisk -R/dev/sdc /dev/sde sgdisk -G /dev/sdc partprobe ls -ls /dev/disk/by-partuuid/|grep sdc6 zpool attach bpool ata-TEAML5Lite3D240G_AB20190109A0101064-part6 ata-Crucial_CT240M500SSD1_132909461FE4-part6 ls -ls /dev/disk/by-partuuid/|grep sdc7 zpool attach rpool ata-TEAML5Lite3D240G_AB20190109A0101064-part7 ata-Crucial_CT240M500SSD1_132909461FE4-part7 -o ashift=9 zpool export rpool zpool import -R/ rpool update-grub reboot