Edit: Got this working. You might want to have a look here: https://forum.proxmox.com/threads/pbs-client-grub-and-just-backing-up-partitions.105990/post-568579
Old Post:
Hi,
Right now I'm backing up my main PVE node by booting into a Debian USB stick thats got a bash script that uses the proxmox-backup-client to create a blocklevel backup of my complete two 100GB mirrored system SSDs. This works fine so far as the SDDs are small and don't store guests.
But now I want to switch my two bare metal TrueNAS server from TrueNAS to PVE and virtualize TrueNAS. The cases can only fit 8 HDDs and 10 SSDs and I already got 8 HDDs and 8 SSDs attached to HBAs I want to passthrough to my TrueNAS VM so there are only 2 SSDs left for PVE. So I can't have dedicated system and VM storage SSDs.
I would prefer to do it similar to my main PVE server as there everything worked flavlessly.
My main PVE node looks like this with PVE ontop of a Debian 11 that uses mdadm + LUKS + grub:
So my Disk layout for the new PVE nodes would look like this (like above but with additional ZFS partition for guests and grub/boot partition a bit bigger and system partition smaller to have more space for guests):
sda1 - 8 MB - grub partition
sda2 - 512 MB - not used but reserved for ESP if I later would need to switch from grub to systemd boot
sda3 - 1024 MB - mdadm mirror with sdb3: stores unencrypted boot partition
sda4 - 30 GB - mdadm mirror with sdb4 -> LUKS -> LVM: stores encrypted root and swap LVs
sda5 - 168 or 368 GB - ZFS mirror with sdb5 -> encrypted datasets: stores guests
sdb1 - 8 MB - grub partition
sdb2 - 512 MB - not used but reserved for ESP if I later would need to switch from grub to systemd boot
sdb3 - 1024 MB -> mdadm mirror with sda3: stores unencrypted boot partition
sdb4 - 30 GB - mdadm mirror with sda4 -> LUKS -> LVM: stores encrypted root and swap LVs
sdb5 - 168 or 368 GB - ZFS mirror with sda5 -> encrypted datasets: stores guests
As all my data on sda4, sda5, sdb4, sdb5 would be encrypted, including my guests, so just backing up the complete disks would be wasting space as the disk images couldn't be deduplicated with the other backups of the guests. Only way I see to not backup the guests twice would be to just backup sda1 to sda4 + sdb1 to sdb4 with proxmox-backup-client so sda5 and sdb5 would be excluded.
But then I'm not sure if and how the restore would work. I would setup everything using the Debian Installer using grub and then install the PVE package ontop (like I already did it with my main PVE node). So the questions are:
1.) I'm not a grub expert but if I remeber right grub needed to write data to the first 1MB of unallocated space of the boot disk? If that is still the case and I would restore sda1 to sda4 or sdb1 to sdb4 from the PBS to a new disk, would that disk be bootable or is there some grub stuff missing then?
2.) How does it work to restore partitions using proxmox-backup-client so that I get a identical disk as before just with sda5/sdb5 missing that I would then create myself and use them to setup a new ZFS pool where I would restore my guests from PBS to?
3.) Is there maybe a way to exclude partitions with the PBS-client like excluding files/folders? So I could backup the entire disk just with sda5/sdb5 not included?
Old Post:
Hi,
Right now I'm backing up my main PVE node by booting into a Debian USB stick thats got a bash script that uses the proxmox-backup-client to create a blocklevel backup of my complete two 100GB mirrored system SSDs. This works fine so far as the SDDs are small and don't store guests.
But now I want to switch my two bare metal TrueNAS server from TrueNAS to PVE and virtualize TrueNAS. The cases can only fit 8 HDDs and 10 SSDs and I already got 8 HDDs and 8 SSDs attached to HBAs I want to passthrough to my TrueNAS VM so there are only 2 SSDs left for PVE. So I can't have dedicated system and VM storage SSDs.
I would prefer to do it similar to my main PVE server as there everything worked flavlessly.
My main PVE node looks like this with PVE ontop of a Debian 11 that uses mdadm + LUKS + grub:
Code:
root@Hypervisor:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 93.2G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 286M 0 part
├─sda3 8:3 0 488M 0 part
│ └─md0 9:0 0 487M 0 raid1 /boot
└─sda4 8:4 0 92.4G 0 part
└─md1 9:1 0 92.3G 0 raid1
└─md1_crypt 253:0 0 92.3G 0 crypt
├─vgpmx-lvroot 253:1 0 21G 0 lvm /
└─vgpmx-lvswap 253:2 0 61G 0 lvm [SWAP]
sdb 8:16 0 93.2G 0 disk
├─sdb1 8:17 0 1M 0 part
├─sdb2 8:18 0 286M 0 part /boot/efi
├─sdb3 8:19 0 488M 0 part
│ └─md0 9:0 0 487M 0 raid1 /boot
└─sdb4 8:20 0 92.4G 0 part
└─md1 9:1 0 92.3G 0 raid1
└─md1_crypt 253:0 0 92.3G 0 crypt
├─vgpmx-lvroot 253:1 0 21G 0 lvm /
└─vgpmx-lvswap 253:2 0 61G 0 lvm [SWAP]
So my Disk layout for the new PVE nodes would look like this (like above but with additional ZFS partition for guests and grub/boot partition a bit bigger and system partition smaller to have more space for guests):
sda1 - 8 MB - grub partition
sda2 - 512 MB - not used but reserved for ESP if I later would need to switch from grub to systemd boot
sda3 - 1024 MB - mdadm mirror with sdb3: stores unencrypted boot partition
sda4 - 30 GB - mdadm mirror with sdb4 -> LUKS -> LVM: stores encrypted root and swap LVs
sda5 - 168 or 368 GB - ZFS mirror with sdb5 -> encrypted datasets: stores guests
sdb1 - 8 MB - grub partition
sdb2 - 512 MB - not used but reserved for ESP if I later would need to switch from grub to systemd boot
sdb3 - 1024 MB -> mdadm mirror with sda3: stores unencrypted boot partition
sdb4 - 30 GB - mdadm mirror with sda4 -> LUKS -> LVM: stores encrypted root and swap LVs
sdb5 - 168 or 368 GB - ZFS mirror with sda5 -> encrypted datasets: stores guests
As all my data on sda4, sda5, sdb4, sdb5 would be encrypted, including my guests, so just backing up the complete disks would be wasting space as the disk images couldn't be deduplicated with the other backups of the guests. Only way I see to not backup the guests twice would be to just backup sda1 to sda4 + sdb1 to sdb4 with proxmox-backup-client so sda5 and sdb5 would be excluded.
But then I'm not sure if and how the restore would work. I would setup everything using the Debian Installer using grub and then install the PVE package ontop (like I already did it with my main PVE node). So the questions are:
1.) I'm not a grub expert but if I remeber right grub needed to write data to the first 1MB of unallocated space of the boot disk? If that is still the case and I would restore sda1 to sda4 or sdb1 to sdb4 from the PBS to a new disk, would that disk be bootable or is there some grub stuff missing then?
2.) How does it work to restore partitions using proxmox-backup-client so that I get a identical disk as before just with sda5/sdb5 missing that I would then create myself and use them to setup a new ZFS pool where I would restore my guests from PBS to?
3.) Is there maybe a way to exclude partitions with the PBS-client like excluding files/folders? So I could backup the entire disk just with sda5/sdb5 not included?
Last edited: