systemd 错误消息:无法在设备 253:0 上启动 LVM 事件激活

systemd 错误消息:无法在设备 253:0 上启动 LVM 事件激活

我有一台装有 Debian Linux 10.0 的 Acer 笔记本。从下面的输出可以看出lsblk,根分区位于 /var/home 的 256GB SSD 上,SWAP 位于使用相同密码的两个 LUKS 加密磁盘上的 LVM2 卷上。

$ lsblk

NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda              8:0    0 465,8G  0 disk  
└─sda1           8:1    0 465,8G  0 part  
  └─sda1_crypt 253:0    0 465,8G  0 crypt 
    ├─vg1-var  253:1    0  29,8G  0 lvm   /var
    ├─vg1-swap 253:2    0  29,8G  0 lvm   [SWAP]
    └─vg1-home 253:4    0 698,8G  0 lvm   /home
sdb              8:16   0 465,8G  0 disk  
└─sdb1           8:17   0 465,8G  0 part  
  └─sdb1_crypt 253:3    0 465,8G  0 crypt 
    └─vg1-home 253:4    0 698,8G  0 lvm   /home
sdc              8:32   0 238,5G  0 disk  
├─sdc1           8:33   0   953M  0 part  /boot/efi
└─sdc2           8:34   0 237,6G  0 part  /

现在,在启动过程中,我收到来自 systemd 和 lvm2 的一些错误消息,如下所示,这些消息表明第二个 LUKS 卷 sdb1_crypt 不知何故无法识别。无论如何,在启动序列结束时,/home 目录完全正常运行,如下所示:

$ sudo lvdisplay --maps /dev/vg1/home

  --- Logical volume ---
  LV Path                /dev/vg1/home
  LV Name                home
  VG Name                vg1
  LV UUID                cbSU7i-SYH9-9yeZ-pJdH-El6y-vhcS-YXtZfa
  LV Write Access        read/write
  LV Creation host, time helium, 2017-07-28 05:49:15 -0400
  LV Status              available
  # open                 1
  LV Size                <698,81 GiB
  Current LE             178895
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4
   
  --- Segments ---
  Logical extents 0 to 95366:
    Type        linear
    Physical volume /dev/mapper/sda1_crypt
    Physical extents    7629 to 102995
   
  Logical extents 95367 to 103974:
    Type        linear
    Physical volume /dev/mapper/sda1_crypt
    Physical extents    110625 to 119232
   
  Logical extents 103975 to 178894:
    Type        linear
    Physical volume /dev/mapper/sdb1_crypt
    Physical extents    0 to 74919

启动过程中的错误信息如下:

$ journalctl -b | grep -i lvm

Feb 17 09:13:48 helium systemd[1]: Listening on LVM2 poll daemon socket.
Feb 17 09:13:48 helium systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
Feb 17 09:13:48 helium systemd[1]: Finished Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
Feb 17 09:13:48 helium systemd[1]: Created slice system-lvm2\x2dpvscan.slice.
Feb 17 09:13:48 helium systemd[1]: Starting LVM event activation on device 253:0...
Feb 17 09:13:48 helium lvm[365]:   Couldn't find device with uuid a1qARu-SYG3-V61F-PqCo-0gyP-FkXI-JwfQ1A.
Feb 17 09:13:48 helium lvm[365]:   2 logical volume(s) in volume group "vg1" monitored
Feb 17 09:13:47 helium systemd-udevd[384]: /lib/udev/rules.d/56-lvm.rules:40 Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
Feb 17 09:13:47 helium systemd-udevd[384]: /lib/udev/rules.d/56-lvm.rules:40 The line takes no effect, ignoring.
Feb 17 09:13:48 helium lvm[484]:   Couldn't find device with uuid a1qARu-SYG3-V61F-PqCo-0gyP-FkXI-JwfQ1A.
Feb 17 09:13:49 helium lvm[484]:   Cannot change VG vg1 while PVs are missing.
Feb 17 09:13:49 helium lvm[484]:   Consider vgreduce --removemissing.
Feb 17 09:13:49 helium lvm[484]:   Cannot process volume group vg1
Feb 17 09:13:49 helium systemd[1]: lvm2-pvscan@253:0.service: Main process exited, code=exited, status=5/NOTINSTALLED
Feb 17 09:13:49 helium systemd[1]: lvm2-pvscan@253:0.service: Failed with result 'exit-code'.
Feb 17 09:13:49 helium systemd[1]: Failed to start LVM event activation on device 253:0.
Feb 17 09:13:55 helium lvm[737]:   3 logical volume(s) in volume group "vg1" now active
Feb 17 09:13:50 helium systemd[1]: Starting LVM event activation on device 253:3...
Feb 17 09:13:51 helium systemd[1]: Finished LVM event activation on device 253:3.
Feb 17 09:38:12 helium sudo[196131]:      jan : TTY=pts/1 ; PWD=/home/jan ; USER=root ; COMMAND=/bin/systemctl status lvm2-pvscan@253:0
Feb 17 09:40:26 helium sudo[215910]:      jan : TTY=pts/1 ; PWD=/home/jan ; USER=root ; COMMAND=/bin/systemctl restart lvm2-pvscan@253:0
Feb 17 09:40:26 helium systemd[1]: Starting LVM event activation on device 253:0...
Feb 17 09:40:26 helium lvm[215913]:   3 logical volume(s) in volume group "vg1" now active
Feb 17 09:40:26 helium systemd[1]: Finished LVM event activation on device 253:0.
Feb 17 09:45:09 helium systemd-udevd[384]: /lib/udev/rules.d/56-lvm.rules:40 Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
Feb 17 09:45:09 helium systemd-udevd[384]: /lib/udev/rules.d/56-lvm.rules:40 The line takes no effect, ignoring.

在启动过程结束时,我确实有一个与之lvm2-pvscan@253:0.service相关的服务sdb1_crypt失败了。可以手动重新启动它。

我应该提到 sda1_crypt 和 sdb1_crypt 的 UUID 都包含在 /etc/cryptsetup 中。

您可能会问,为什么我担心它正在工作?好吧,我希望尽可能有一个干净的启动日志,没有错误消息,也许可以了解一些启动过程。所以如果有人能告诉我如何修复它,我会很高兴。我认为这可能与 systemd 操作的顺序有关,但我的知识不足以弄清楚该怎么做 :-)

相关内容