循环设备上的缓冲区 I/O 错误

循环设备上的缓冲区 I/O 错误

最近,我在启动时遇到了缓冲区 I/O 错误。看起来,它是随机出现的,我无法重现它。然而,平均每 5-8 次启动就会发生一次。以下是相关部分dmesg

[   24.630158] blk_update_request: I/O error, dev loop5, sector 0
[   24.630199] blk_update_request: I/O error, dev loop5, sector 0
[   24.630229] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630272] blk_update_request: I/O error, dev loop5, sector 0
[   24.630301] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630340] blk_update_request: I/O error, dev loop5, sector 0
[   24.630369] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630411] blk_update_request: I/O error, dev loop5, sector 0
[   24.630454] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630494] blk_update_request: I/O error, dev loop5, sector 0
[   24.630522] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630566] blk_update_request: I/O error, dev loop5, sector 0
[   24.630593] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630634] blk_update_request: I/O error, dev loop5, sector 0
[   24.630661] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630698] blk_update_request: I/O error, dev loop5, sector 0
[   24.630726] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630763] blk_update_request: I/O error, dev loop5, sector 0
[   24.630791] Buffer I/O error on dev loop5, logical block 0, async page read
[   24.630832] Buffer I/O error on dev loop5, logical block 0, async page read

该循环设备由 生成snap,以下是输出lsblk

$ lsblk
NAME                       MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                        7:0    0  17.3M  1 loop  /snap/node/1767
loop1                        7:1    0    91M  1 loop  /snap/core/6350
loop2                        7:2    0  91.1M  1 loop  /snap/core/6259
loop3                        7:3    0    91M  1 loop  /snap/core/6405
loop4                        7:4    0  17.3M  1 loop  /snap/node/1729
loop5                        7:5    0  17.3M  1 loop  /snap/node/1793
sda                          8:0    0 238.5G  0 disk  
├─sda1                       8:1    0   524M  0 part  /boot/efi
├─sda2                       8:2    0   954M  0 part  /boot
└─sda3                       8:3    0   237G  0 part  
  └─sda3_crypt             254:0    0   237G  0 crypt 
    ├─xxx--vg-root--lv 254:1    0 229.1G  0 lvm   /
    └─xxx--vg-swap--lv 254:2    0   7.9G  0 lvm   [SWAP]

操作系统有Debian 9内核版本4.9.0-8-amd64snapd版本2.37.2

编辑:每@弗罗斯特舒茨的评论,下面是df -h输出。所以我的理解是,由 snap 创建的循环设备的总大小等于已使用的大小。而且/dev/mapper/xxx--vg-root--lv(所在的地方)有很多空白空间/,所以我认为这不是问题。

$ df -h
Filesystem                        Size  Used Avail Use% Mounted on
udev                              3.9G     0  3.9G   0% /dev
tmpfs                             788M  9.5M  778M   2% /run
/dev/mapper/xxx--vg-root--lv  225G  123G   91G  58% /
tmpfs                             3.9G   23M  3.9G   1% /dev/shm
tmpfs                             5.0M  4.0K  5.0M   1% /run/lock
tmpfs                             3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop0                         18M   18M     0 100% /snap/node/1767
/dev/loop1                         91M   91M     0 100% /snap/core/6350
/dev/loop2                         92M   92M     0 100% /snap/core/6259
/dev/loop3                         91M   91M     0 100% /snap/core/6405
/dev/loop4                         18M   18M     0 100% /snap/node/1729
/dev/sda2                         939M   70M  823M   8% /boot
/dev/sda1                         523M  132K  523M   1% /boot/efi
tmpfs                             788M   20K  788M   1% /run/user/118
tmpfs                             788M   40K  788M   1% /run/user/1000
/dev/loop5                         18M   18M     0 100% /snap/node/1793

相关内容