I was trying to verify that Azure backups of a Linux VM were working, so I downloaded the restore script for the last restore point.
The script runs and connects successfully but it hangs when trying to auto mount the drives:
Microsoft Azure VM Backup - File Recovery
______________________________________________
Please verify the license, terms and conditions for using this script as mentioned here: https://aka.ms/OpenSourceLicenseForFileRecovery
------------------------------------------------
Checking for OS Compatibility: DONE
Checking for large disks: DONE
Checking for LVMs: DONE
Checking for network connectivity: DONE
Checking for required cipher suite: DONE
Please enter the password as shown on the portal to securely connect to the recovery point. : XXXXXX
Connecting to recovery point using ISCSI service...
Connection succeeded!
Please wait while we attach volumes of the recovery point to this machine...
SCSI
In dmesg I can see that the drives are attached:
[ 168.267791] Loading iSCSI transport class v2.0-870.
[ 197.798995] iscsi: registered transport (tcp)
[ 198.059221] scsi host3: iSCSI Initiator over TCP/IP
[ 198.232121] scsi 3:0:0:0: Direct-Access MABILR I Disk 1.00 PQ: 0 ANSI: 5
[ 198.295800] sd 3:0:0:0: Attached scsi generic sg2 type 0
[ 198.336224] scsi host4: iSCSI Initiator over TCP/IP
[ 198.386131] sd 3:0:0:0: [sdb] 62914560 512-byte logical blocks: (32.2 GB/30.0 GiB)
[ 198.400660] sd 3:0:0:0: [sdb] Write Protect is off
[ 198.400669] sd 3:0:0:0: [sdb] Mode Sense: 27 00 10 04
[ 198.429963] sd 3:0:0:0: [sdb] Write cache: disabled, read cache: disabled, supports DPO and FUA
[ 198.530547] scsi 4:0:0:0: Direct-Access MABILR I Disk 1.00 PQ: 0 ANSI: 5
[ 198.591583] sd 4:0:0:0: Attached scsi generic sg3 type 0
[ 198.632254] scsi host5: iSCSI Initiator over TCP/IP
[ 198.681411] sd 4:0:0:0: [sdc] 1073741824 512-byte logical blocks: (550 GB/512 GiB)
[ 198.696483] sd 4:0:0:0: [sdc] Write Protect is off
[ 198.696490] sd 4:0:0:0: [sdc] Mode Sense: 27 00 10 04
[ 198.726301] sd 4:0:0:0: [sdc] Write cache: disabled, read cache: disabled, supports DPO and FUA
….
I was able to manually mount the rootfs a few times, but the connection stops working after a short time and I see timeout messages in the logs, like below:
[ 378.572336] sd 3:0:0:0: [sdb] tag#67 timing out command, waited 180s
[ 378.577504] sd 3:0:0:0: [sdb] tag#67 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=180s
[ 378.577517] sd 3:0:0:0: [sdb] tag#67 Sense Key : Unit Attention [current]
[ 378.577525] sd 3:0:0:0: [sdb] tag#67 Add. Sense: No additional sense information
[ 378.577549] sd 3:0:0:0: [sdb] tag#67 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[ 378.577566] blk_update_request: I/O error, dev sdb, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 378.584439] Buffer I/O error on dev sdb, logical block 0, async page read
I was not able to detect and mount my LVM volumes at all. I tested this on two different machines in different locations, with Debian 12, CentOS 7 and Ubuntu 22.04. But it behaves the same.
I also tried to increase noop_out_timeout in iscsid.conf as suggested in https://learn.microsoft.com/en-us/azure/backup/backup-azure-restore-files-from-vm but this did not help.
Has anyone had similar experiences or know what could be the reason?
2
Answers
Created Linux virtual machine and backup successfully:
In recovery point download Executable Linux Azure VMs or use python script generated to download the software.
Timeout error during VM Backup File Recovery this issue usually occurs, when the iSCSI connection between the recovery point and the machine trying to restore Azure backups of a Linux VM and auto mounting the drives from the recovery point.
In iSCSI initiator logs on the machine check the logs using below command this will display system log messages in real-time. Look for the messages related to iSCSI or the SCSI devices that are attached.
Make sure to check there are no firewalls or network security groups (NSGs) blocking traffic:
You can use Running a Network Trace and Linux vm firewall.
In terminal enter credentials using
sudo bash
and typechmod+x
now when I tried and enter password connection is succeed and mount path attached volume like below:If still error persists, try manually mounting the drives using the
mount
command and use different recovery point to see if the issue is specific to the current recovery point. If you are able to mount the drives using a different recovery point, then there might be an issue with the current recovery point.Reference:
How To Restore Files And Folders From Azure Linux VM Using by Charbel nemnom
If you have big files (more than 10Gb according to the documentation), currently it’s not possible to use File Recovery, you have to restore the VM. Here is how https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-restore-vms