Azure 上的 Ubuntu - 即使在新部署中,系统日志中也会出现大量 sr0 错误

Azure 上的 Ubuntu - 即使在新部署中,系统日志中也会出现大量 sr0 错误

我在使用标准门户选项(创建 VM 并选择 Ubuntu 或直接创建 Ubuntu 服务器)在 Azure 上安装 Ubuntu 服务器(22.04 LTS)时遇到问题。有人能解释如何解决这个问题吗?

仅选择标准选项就会在系统日志中产生一些错误。

Apr 16 07:10:19 xx01 kernel: [    1.208209] sr 1:0:0:2: [sr0] scsi-1 drive
Apr 16 07:10:19 xx01 kernel: [    1.255246] sr 1:0:0:2: Attached scsi CD-ROM sr0
Apr 16 07:10:19 xx01 kernel: [   10.245301] sr 1:0:0:2: [sr0] tag#34 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
Apr 16 07:10:19 xx01 kernel: [   10.245304] sr 1:0:0:2: [sr0] tag#34 Sense Key : Not Ready [current] 
Apr 16 07:10:19 xx01 kernel: [   10.245307] sr 1:0:0:2: [sr0] tag#34 Add. Sense: Medium not present - tray open
Apr 16 07:10:19 xx01 kernel: [   10.245309] sr 1:0:0:2: [sr0] tag#34 CDB: Read(10) 28 00 00 00 00 02 00 00 02 00
Apr 16 07:10:19 xx01 kernel: [   10.245311] I/O error, dev sr0, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
Apr 16 07:10:19 xx01 kernel: [   10.249793] sr 1:0:0:2: [sr0] tag#98 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
Apr 16 07:10:19 xx01 kernel: [   10.249795] sr 1:0:0:2: [sr0] tag#98 Sense Key : Not Ready [current] 
Apr 16 07:10:19 nb01 kernel: [   10.249798] sr 1:0:0:2: [sr0] tag#98 Add. Sense: Medium not present - tray open
Apr 16 07:10:19 nb01 kernel: [   10.249800] sr 1:0:0:2: [sr0] tag#98 CDB: Read(10) 28 00 00 00 00 02 00 00 02 00
Apr 16 07:10:19 nb01 kernel: [   10.249801] I/O error, dev sr0, sector 8 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
Apr 16 07:10:19 nb01 kernel: [   10.252488] Buffer I/O error on dev sr0, logical block 1, async page read
Apr 16 07:10:19 nb01 systemd-udevd[183]: sr0: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sr0' failed with exit code 1.
Apr 16 07:10:28 nb01 cloud-init[1627]: Cloud-init v. 23.4.4-0ubuntu0~22.04.1 finished at Tue, 16 Apr 2024 07:10:28 +0000. Datasource DataSourceAzure [seed=/dev/sr0].  Up 24.75 seconds

重启后(没有进行其他操作),系统日志中会充斥着数千条信息:

Apr 16 07:12:28 xx01 kernel: [   10.961581] sr 0:0:0:2: [sr0] tag#184 unaligned transfer
Apr 16 07:12:28 xx01 kernel: [   10.961585] sr 0:0:0:2: [sr0] tag#185 unaligned transfer
Apr 16 07:12:28 xx01 kernel: [   10.961587] sr 0:0:0:2: [sr0] tag#186 unaligned transfer
Apr 16 07:12:28 xx01 kernel: [   10.961590] sr 0:0:0:2: [sr0] tag#187 unaligned transfer
Apr 16 07:12:28 xx01 kernel: [   10.961592] sr 0:0:0:2: [sr0] tag#188 unaligned transfer
Apr 16 07:12:28 xx01 kernel: [   10.961594] sr 0:0:0:2: [sr0] tag#189 unaligned transfer
Apr 16 07:12:28 xx01 kernel: [   10.961596] sr 0:0:0:2: [sr0] tag#190 unaligned transfer
Apr 16 07:12:28 xx01 kernel: [   10.961599] sr 0:0:0:2: [sr0] tag#191 unaligned transfer

这似乎是 cloudinit cdrom 的问题。我尝试通过更改/etc/waagent.conf并将 cloudinit 部署设置为 no 来禁用 cloudinit 部署,然后在/etc/fstab

在启动过程中保持/etc/fstab不变,就像 中的更改一样/etc/waagent.conf,但仍然存在相同的 sr0 未对齐传输错误。

lsblk显示:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop0     7:0    0 63.9M  1 loop /snap/core20/2182
loop1     7:1    0   87M  1 loop /snap/lxd/27948
loop2     7:2    0 39.1M  1 loop /snap/snapd/21184
sda       8:0    0   30G  0 disk 
├─sda1    8:1    0 29.9G  0 part /
├─sda14   8:14   0    4M  0 part 
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0    8G  0 disk 
└─sdb1    8:17   0    8G  0 part 
sr0      11:0    1 1024M  0 rom  

所有部署均在西欧 Azure 区域。

相关内容