I have a single machine with proxmox on ZFS with a single pool containing a three-disk mirror. Backups aside, I would like to implement a simple disaster recovery strategy. The idea is to save the partition scheme of the disks on removeble media, and then dump the pool to LTO tape, so to be able to rebuild the whole thing from scratch if the need arises. I did it as follows, but at the end it does not work. Maybe someone has an idea of the why...
(note: this is a test run. Not a real disaster, the original data is preserved)
I have first backed up the disk partition schemes:
Then created a snapshot of the zfs root pool and dumped it to tape:
I also verified that the backup stream contained no errors:
At this point, I shat down the machine and removed the three original disks. In their place, I temporarily put a single new HD on which I installed proxmox from scratch, so to have some kind of zfs-supporting linux to perform the restore.
Then I connected two new HDs (I don't have three) of the same size as the original one, and I tried to restore as follows.
First I restored the partition scheme:
(the device names are different because sda is the boot disk at the moment)
I rebooted the machine and I created a brand new zpool, using the IDs of the new disks (obtained from the blkid command):
(serial numbes omitted)
Finally, I restored from tape the zfs dump:
Fast forward a couple of hours, and the zfs filesystems look perfectly restored. The problem is that if I remove the temporary proxmox hd and try to reboot the machine, it does not work. The machine does not boot at all: none of the restored disks is recognized as bootable media.
What am I doing wrong?
Thanks
(note: this is a test run. Not a real disaster, the original data is preserved)
I have first backed up the disk partition schemes:
Code:
sgdisk --backup=partitions-backup-sda /dev/sda
sgdisk --backup=partitions-backup-sdb /dev/sdb
sgdisk --backup=partitions-backup-sdc /dev/sdc
Then created a snapshot of the zfs root pool and dumped it to tape:
Code:
datetime=$(date +%Y-%m-%dT%H:%M:%S)
snapname="rpool@tape_backup_${datetime}"
zfs snapshot -r ${snapname}
zfs send --replicate --verbose ${snapname} | mbuffer -m 4G -P 100% | dd of=/dev/nst0 bs=256k status=none
zfs destroy -r ${snapname}
I also verified that the backup stream contained no errors:
Code:
mt -f /dev/nst0 rewind
mbuffer -m 4G -P 100% -i /dev/nst0 | zstreamdump
At this point, I shat down the machine and removed the three original disks. In their place, I temporarily put a single new HD on which I installed proxmox from scratch, so to have some kind of zfs-supporting linux to perform the restore.
Then I connected two new HDs (I don't have three) of the same size as the original one, and I tried to restore as follows.
First I restored the partition scheme:
Code:
sgdisk -l partitions-backup-sda /dev/sdb
sgdisk -l partitions-backup-sdb /dev/sdc
(the device names are different because sda is the boot disk at the moment)
I rebooted the machine and I created a brand new zpool, using the IDs of the new disks (obtained from the blkid command):
Code:
zpool create rpool mirror ata-WDC_WD40EZRZ-22GXCB0_WD-___-part3 ata-WDC_WD40EZRZ-22GXCB0_WD-___-part3
Finally, I restored from tape the zfs dump:
Code:
mt -f /dev/nst0 rewind
dd if=/dev/nst0 bs=256k status=none | mbuffer -m 10G -r 100M | zfs receive -Fd rpool
Fast forward a couple of hours, and the zfs filesystems look perfectly restored. The problem is that if I remove the temporary proxmox hd and try to reboot the machine, it does not work. The machine does not boot at all: none of the restored disks is recognized as bootable media.
What am I doing wrong?
Thanks
Last edited: