Is this some kind of bug or am I just too stupid to backup my unmounted virtio SCSI disks using the proxmox-backup-client?
Because this works:
But this always fails:
"/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part2" and "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part3" fail with the same error.
When removing all 3 partitions of scsi-0QEMU_QEMU_HARDDISK_drive-scsi2 it is working:
"scsi-0QEMU_QEMU_HARDDISK_drive-scsi2" maps to sdc and backing up sdc1 to sdc3 works fine too, so I'm totally clueless:
Would be glad if someone could explain me what is going wrong here.
Because this works:
Code:
root@TestPVE2Backup:~# cat /root/scripts/backup.sh.t1
#! /bin/bash
# define repo and password:
export PBS_REPOSITORY="root@pam@192.168.43.81:8007:TestDS1"
export PBS_PASSWORD="<redacted>"
echo "Backup scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1-3:"
proxmox-backup-client backup disk1_part1.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1 disk1_part2.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part2 disk1_part3.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 --ns TestNS --backup-type host --crypt-mode none --backup-id TestPVE2B
echo "Backup scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1-3:"
proxmox-backup-client backup disk2_part1.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1 disk2_part2.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part2 disk2_part3.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part3 --ns TestNS --backup-type host --crypt-mode none --backup-id TestPVE2C
Code:
root@TestPVE2Backup:~# /root/scripts/backup.sh.t1
Backup scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1-3:
Starting backup: [TestNS]:host/TestPVE2B/2023-06-22T16:58:58Z
Client name: TestPVE2Backup
Starting backup protocol: Thu Jun 22 18:58:58 2023
No previous manifest available.
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part1.img.fidx
disk1_part1.img: had to backup 1007 KiB of 1007 KiB (compressed 59 B) in 0.02s
disk1_part1.img: average backup speed: 43.859 MiB/s
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part2' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part2.img.fidx
disk1_part2.img: had to backup 512 MiB of 512 MiB (compressed 509.836 MiB) in 10.42s
disk1_part2.img: average backup speed: 49.128 MiB/s
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part3.img.fidx
disk1_part3.img: had to backup 3.624 GiB of 15.499 GiB (compressed 2.358 GiB) in 203.78s
disk1_part3.img: average backup speed: 18.211 MiB/s
disk1_part3.img: backup was done incrementally, reused 11.875 GiB (76.6%)
Duration: 214.35s
End Time: Thu Jun 22 19:02:32 2023
Backup scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1-3:
Starting backup: [TestNS]:host/TestPVE2C/2023-06-22T17:02:32Z
Client name: TestPVE2Backup
Starting backup protocol: Thu Jun 22 19:02:32 2023
No previous manifest available.
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1' to 'root@pam@192.168.43.81:8007:TestDS1' as disk2_part1.img.fidx
disk2_part1.img: had to backup 1007 KiB of 1007 KiB (compressed 59 B) in 0.03s
disk2_part1.img: average backup speed: 28.349 MiB/s
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part2' to 'root@pam@192.168.43.81:8007:TestDS1' as disk2_part2.img.fidx
disk2_part2.img: had to backup 512 MiB of 512 MiB (compressed 509.836 MiB) in 9.90s
disk2_part2.img: average backup speed: 51.739 MiB/s
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part3' to 'root@pam@192.168.43.81:8007:TestDS1' as disk2_part3.img.fidx
disk2_part3.img: had to backup 3.624 GiB of 15.499 GiB (compressed 2.358 GiB) in 215.20s
disk2_part3.img: average backup speed: 17.245 MiB/s
disk2_part3.img: backup was done incrementally, reused 11.875 GiB (76.6%)
Duration: 225.26s
End Time: Thu Jun 22 19:06:17 2023
But this always fails:
Code:
root@TestPVE2Backup:~# cat /root/scripts/backup.sh
#! /bin/bash
# define repo and password:
export PBS_REPOSITORY="root@pam@192.168.43.81:8007:TestDS1"
export PBS_PASSWORD="<redacted>"
# create new temp folder for GPT backups
mkdir /tmp/GPT_backup
# create backup of partition tables (GPT)
sgdisk -b=/tmp/GPT_backup/GPT_backup_disk1.bin /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1
sgdisk -b=/tmp/GPT_backup/GPT_backup_disk2.bin /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2
# backup GPT backups as well as partitions 1 to 3 of both disks to PBS
proxmox-backup-client backup gpt_backup.pxar:/tmp/GPT_backup/ disk1_part1.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1 disk1_part2.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part2 disk1_part3.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 disk2_part1.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1 disk2_part2.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part2 disk2_part3.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part3 --ns TestNS --backup-type host --crypt-mode none --backup-id TestPVE2
# clean up
rm -r /tmp/GPT_backup
Code:
root@TestPVE2Backup:~# /root/scripts/backup.sh
The operation has completed successfully.
The operation has completed successfully.
Error: unable to access '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1' - No such file or directory (os error 2)
"/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part2" and "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part3" fail with the same error.
When removing all 3 partitions of scsi-0QEMU_QEMU_HARDDISK_drive-scsi2 it is working:
Code:
cat /root/scripts/backup.sh.t2
#! /bin/bash
# define repo and password:
export PBS_REPOSITORY="root@pam@192.168.43.81:8007:TestDS1"
export PBS_PASSWORD="<redacted>"
# create new temp folder for GPT backups
mkdir /tmp/GPT_backup
# create backup of partition tables (GPT)
sgdisk -b=/tmp/GPT_backup/GPT_backup_disk1.bin /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1
sgdisk -b=/tmp/GPT_backup/GPT_backup_disk2.bin /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2
# backup GPT backups as well as partitions 1 to 3 of both disks to PBS
proxmox-backup-client backup gpt_backup.pxar:/tmp/GPT_backup/ disk1_part1.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1 disk1_part2.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part2 disk1_part3.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 --ns TestNS --backup-type host --crypt-mode none --backup-id TestPVE2
# clean up
rm -r /tmp/GPT_backup
Code:
root@TestPVE2Backup:~# /root/scripts/backup.sh.t2
The operation has completed successfully.
The operation has completed successfully.
Starting backup: [TestNS]:host/TestPVE2/2023-06-22T17:23:38Z
Client name: TestPVE2Backup
Starting backup protocol: Thu Jun 22 19:23:38 2023
Downloading previous manifest (Thu Jun 22 18:27:12 2023)
Upload directory '/tmp/GPT_backup/' to 'root@pam@192.168.43.81:8007:TestDS1' as gpt_backup.pxar.didx
gpt_backup.pxar: had to backup 35.354 KiB of 35.354 KiB (compressed 656 B) in 0.00s
gpt_backup.pxar: average backup speed: 8.466 MiB/s
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part1.img.fidx
disk1_part1.img: had to backup 0 B of 1007 KiB (compressed 0 B) in 0.01s
disk1_part1.img: average backup speed: 0 B/s
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part2' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part2.img.fidx
disk1_part2.img: had to backup 0 B of 512 MiB (compressed 0 B) in 7.01s
disk1_part2.img: average backup speed: 0 B/s
disk1_part2.img: backup was done incrementally, reused 512 MiB (100.0%)
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part3.img.fidx
disk1_part3.img: had to backup 0 B of 15.499 GiB (compressed 0 B) in 184.09s
disk1_part3.img: average backup speed: 0 B/s
disk1_part3.img: backup was done incrementally, reused 15.499 GiB (100.0%)
Uploaded backup catalog (103 B)
Duration: 191.84s
End Time: Thu Jun 22 19:33:08 2023
"scsi-0QEMU_QEMU_HARDDISK_drive-scsi2" maps to sdc and backing up sdc1 to sdc3 works fine too, so I'm totally clueless:
Code:
root@TestPVE2Backup:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 16G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 488M 0 part /boot
└─sda3 8:3 0 15G 0 part
├─TestPVE2Backup--vg-root 254:0 0 14G 0 lvm /
└─TestPVE2Backup--vg-swap_1 254:1 0 976M 0 lvm [SWAP]
sdb 8:16 0 32G 0 disk
├─sdb1 8:17 0 1007K 0 part
├─sdb2 8:18 0 512M 0 part
├─sdb3 8:19 0 15.5G 0 part
├─sdb4 8:20 0 2G 0 part
└─sdb5 8:21 0 14G 0 part
sdc 8:32 0 32G 0 disk
├─sdc1 8:33 0 1007K 0 part
├─sdc2 8:34 0 512M 0 part
├─sdc3 8:35 0 15.5G 0 part
├─sdc4 8:36 0 2G 0 part
└─sdc5 8:37 0 14G 0 part
sr0 11:0 1 1024M 0 rom
root@TestPVE2Backup:~# ls -la /dev/disk/by-id
total 0
drwxr-xr-x 2 root root 480 Jun 22 17:25 .
drwxr-xr-x 8 root root 160 Jun 22 17:05 ..
lrwxrwxrwx 1 root root 9 Jun 22 17:05 ata-QEMU_DVD-ROM_QM00003 -> ../../sr0
lrwxrwxrwx 1 root root 10 Jun 22 17:05 dm-name-TestPVE2Backup--vg-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 22 17:05 dm-name-TestPVE2Backup--vg-swap_1 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 22 17:05 dm-uuid-LVM-Mqh50AD3fsOb5gdG8DaZp2YnGt8vik67dJid8rzbwbkuf4eZ552ILr7hzlflq0y9 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 22 17:05 dm-uuid-LVM-Mqh50AD3fsOb5gdG8DaZp2YnGt8vik67NcnhA5SmPYbUl4IPfG9YNLHZpXAYrvCV -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 22 17:05 lvm-pv-uuid-IGgZ5k-Z9PI-C8KD-jiY6-Rcbq-FRos-a5ySFz -> ../../sda3
lrwxrwxrwx 1 root root 9 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part3 -> ../../sda3
lrwxrwxrwx 1 root root 9 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi1 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part4 -> ../../sdb4
lrwxrwxrwx 1 root root 10 Jun 22 17:05 scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part5 -> ../../sdb5
lrwxrwxrwx 1 root root 9 Jun 22 17:25 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jun 22 17:25 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Jun 22 17:25 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Jun 22 17:25 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part3 -> ../../sdc3
lrwxrwxrwx 1 root root 10 Jun 22 17:25 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part4 -> ../../sdc4
lrwxrwxrwx 1 root root 10 Jun 22 17:25 scsi-0QEMU_QEMU_HARDDISK_drive-scsi2-part5 -> ../../sdc5
Code:
root@TestPVE2Backup:~# cat /root/scripts/backup.sh.t3
#! /bin/bash
# define repo and password:
export PBS_REPOSITORY="root@pam@192.168.43.81:8007:TestDS1"
export PBS_PASSWORD="<redacted>"
# create new temp folder for GPT backups
mkdir /tmp/GPT_backup
# create backup of partition tables (GPT)
sgdisk -b=/tmp/GPT_backup/GPT_backup_disk1.bin /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1
sgdisk -b=/tmp/GPT_backup/GPT_backup_disk2.bin /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi2
# backup GPT backups as well as partitions 1 to 3 of both disks to PBS
proxmox-backup-client backup gpt_backup.pxar:/tmp/GPT_backup/ disk1_part1.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1 disk1_part2.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part2 disk1_part3.img:/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3 disk2_part1.img:/dev/sdc1 disk2_part2.img:/dev/sdc2 disk2_part3.img:/dev/sdc3 --ns TestNS --backup-type host --crypt-mode none --backup-id TestPVE2
# clean up
rm -r /tmp/GPT_backup
Code:
root@TestPVE2Backup:~# /root/scripts/backup.sh.t3
The operation has completed successfully.
The operation has completed successfully.
Starting backup: [TestNS]:host/TestPVE2/2023-06-22T17:40:42Z
Client name: TestPVE2Backup
Starting backup protocol: Thu Jun 22 19:40:42 2023
Downloading previous manifest (Thu Jun 22 19:29:56 2023)
Upload directory '/tmp/GPT_backup/' to 'root@pam@192.168.43.81:8007:TestDS1' as gpt_backup.pxar.didx
gpt_backup.pxar: had to backup 35.354 KiB of 35.354 KiB (compressed 656 B) in 0.01s
gpt_backup.pxar: average backup speed: 6.101 MiB/s
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part1' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part1.img.fidx
disk1_part1.img: had to backup 0 B of 1007 KiB (compressed 0 B) in 0.01s
disk1_part1.img: average backup speed: 0 B/s
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part2' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part2.img.fidx
disk1_part2.img: had to backup 0 B of 512 MiB (compressed 0 B) in 6.91s
disk1_part2.img: average backup speed: 0 B/s
disk1_part2.img: backup was done incrementally, reused 512 MiB (100.0%)
Upload image '/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi1-part3' to 'root@pam@192.168.43.81:8007:TestDS1' as disk1_part3.img.fidx
disk1_part3.img: had to backup 0 B of 15.499 GiB (compressed 0 B) in 179.21s
disk1_part3.img: average backup speed: 0 B/s
disk1_part3.img: backup was done incrementally, reused 15.499 GiB (100.0%)
Upload image '/dev/sdc1' to 'root@pam@192.168.43.81:8007:TestDS1' as disk2_part1.img.fidx
Error downloading .fidx from previous manifest: Unable to open fixed index "/mnt/datastore/TestDS1/ns/TestNS/host/TestPVE2/2023-06-22T17:29:56Z/disk2_part1.img.fidx" - No such file or directory (os error 2)
disk2_part1.img: had to backup 1007 KiB of 1007 KiB (compressed 59 B) in 0.02s
disk2_part1.img: average backup speed: 41.841 MiB/s
Upload image '/dev/sdc2' to 'root@pam@192.168.43.81:8007:TestDS1' as disk2_part2.img.fidx
Error downloading .fidx from previous manifest: Unable to open fixed index "/mnt/datastore/TestDS1/ns/TestNS/host/TestPVE2/2023-06-22T17:29:56Z/disk2_part2.img.fidx" - No such file or directory (os error 2)
disk2_part2.img: had to backup 512 MiB of 512 MiB (compressed 509.836 MiB) in 9.73s
disk2_part2.img: average backup speed: 52.64 MiB/s
Upload image '/dev/sdc3' to 'root@pam@192.168.43.81:8007:TestDS1' as disk2_part3.img.fidx
Error downloading .fidx from previous manifest: Unable to open fixed index "/mnt/datastore/TestDS1/ns/TestNS/host/TestPVE2/2023-06-22T17:29:56Z/disk2_part3.img.fidx" - No such file or directory (os error 2)
disk2_part3.img: had to backup 3.624 GiB of 15.499 GiB (compressed 2.358 GiB) in 207.43s
disk2_part3.img: average backup speed: 17.89 MiB/s
disk2_part3.img: backup was done incrementally, reused 11.875 GiB (76.6%)
Uploaded backup catalog (103 B)
Duration: 403.47s
End Time: Thu Jun 22 19:47:25 2023
Would be glad if someone could explain me what is going wrong here.