我已经在我的电脑上使用 Ubuntu 20.04 几个月了。使用启用全盘加密的默认安装程序安装它。现在,当我关闭计算机时,systemd-shutdown 会产生以下两条消息:
systemd-shutdown[1]: Could not detach DM /dev/dm-0: Device or resource busy
systemd-shutdown[1]: Failed to finalize DM devices ignoring
它们确实始终如一地出现,在全新安装之后也是如此。我在 Ubuntu 和 Pop_OS 上都经历过这个!如果没有加密,关机期间不会显示任何消息。在我的 systemd 关机日志中,我看到以下消息弹出:
mrt 26 19:24:52 user systemd-cryptsetup[13215]: Device nvme0n1p3_crypt is still in use.
mrt 26 19:24:52 user systemd-cryptsetup[13215]: Failed to deactivate: Device or resource busy
[......]
mrt 26 19:24:52 user systemd[1]: systemd-cryptsetup@nvme0n1p3_crypt.service: Control process exited, code=exited, status=1/FAILURE
mrt 26 19:24:52 user systemd[1]: systemd-cryptsetup@nvme0n1p3_crypt.service: Failed with result 'exit-code'.
mrt 26 19:24:52 user systemd[1]: Stopped Cryptography Setup for nvme0n1p3_crypt.
我已经搜索了一段时间,看到使用不同类型的 linux 发行版的人收到这些消息。我看到的唯一真正的“解决方案”是压制消息。我的问题是,这是加密驱动器最终会在初始警告后卸载的正常行为,还是表示卸载根本没有完成?我主要担心卸载不当可能导致数据损坏。消息本身不会打扰我。
上次关机的 Journalctl 日志(我替换了我的用户名和 UUID,还缺少 snappackages 卸载):
mrt 26 19:24:52 user systemd[1]: Unmounting /boot/efi...
mrt 26 19:24:52 user systemd-cryptsetup[13215]: Device nvme0n1p3_crypt is still in use.
mrt 26 19:24:52 user systemd-cryptsetup[13215]: Failed to deactivate: Device or resource busy
mrt 26 19:24:52 user systemd[1]: Unmounting Mount unit for core18, revision 1988...
mrt 26 19:24:52 user systemd[1]: Unmounting Mount unit for gnome-3-34-1804, revision 66...
mrt 26 19:24:52 user systemd[1]: Unmounting Mount unit for gtk-common-themes, revision 1514...
mrt 26 19:24:52 user systemd[1]: systemd-cryptsetup@nvme0n1p3_crypt.service: Control process exited, code=exited, status=1/FAILURE
mrt 26 19:24:52 user systemd[1]: systemd-cryptsetup@nvme0n1p3_crypt.service: Failed with result 'exit-code'.
mrt 26 19:24:52 user systemd[1]: Stopped Cryptography Setup for nvme0n1p3_crypt.
mrt 26 19:24:52 user systemd[1]: boot-efi.mount: Succeeded.
mrt 26 19:24:52 user systemd[1]: Unmounted /boot/efi.
mrt 26 19:24:52 user systemd[1]: Unmounting /boot...
mrt 26 19:24:52 user systemd[1]: systemd-fsck@dev-disk-by\x2duuid-xxxxx\xxxxxx.service: Succeeded.
mrt 26 19:24:52 user systemd[1]: Stopped File System Check on /dev/disk/by-uuid/xxxx-xxxx.
mrt 26 19:24:52 user systemd[1]: Stopped target Swap.
mrt 26 19:24:52 user systemd[1]: Deactivating swap /dev/disk/by-id/dm-name-vgubuntu-swap_1...
mrt 26 19:24:52 user systemd[1]: boot.mount: Succeeded.
mrt 26 19:24:52 user systemd[1]: Unmounted /boot.
mrt 26 19:24:52 user systemd[1]: systemd-fsck@dev-disk-by\x2duuid-xxxxxxxxxxxxxxxxxxxxxxxx.service: Succeeded.
mrt 26 19:24:52 user systemd[1]: Stopped File System Check on /dev/disk/by-uuid/xxxxxxxxxxxxxxxxxxxx.
mrt 26 19:24:52 user systemd[1]: Removed slice system-systemd\x2dfsck.slice.
mrt 26 19:24:52 user systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dvgubuntu\x2dswap_1.swap: Succeeded.
mrt 26 19:24:52 user systemd[1]: Deactivated swap /dev/disk/by-id/dm-name-vgubuntu-swap_1.
mrt 26 19:24:52 user systemd[1]: dev-vgubuntu-swap_1.swap: Succeeded.
mrt 26 19:24:52 user systemd[1]: Deactivated swap /dev/vgubuntu/swap_1.
mrt 26 19:24:52 user systemd[1]: dev-disk-by\x2duuid-xxxxxxxxxxxxxxxxxxxxxxxx.swap: Succeeded.
mrt 26 19:24:52 user systemd[1]: Deactivated swap /dev/disk/by-uuid/xxxxxxxxxxxxxxxxxxxxxxxxxxxd.
mrt 26 19:24:52 user systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dLVM\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.swap: Succeeded.
mrt 26 19:24:52 user systemd[1]: Deactivated swap /dev/disk/by-id/dm-uuid-LVM-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
mrt 26 19:24:52 user systemd[1]: dev-dm\x2d2.swap: Succeeded.
mrt 26 19:24:52 user systemd[1]: Deactivated swap /dev/dm-2.
mrt 26 19:24:52 user systemd[1]: dev-mapper-vgubuntu\x2dswap_1.swap: Succeeded.
mrt 26 19:24:52 user systemd[1]: Deactivated swap /dev/mapper/vgubuntu-swap_1.
mrt 26 19:24:52 user systemd[1]: Stopped target Local File Systems (Pre).
mrt 26 19:24:52 user systemd[1]: Reached target Unmount All Filesystems.
mrt 26 19:24:52 user systemd[1]: Stopping Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
mrt 26 19:24:52 user systemd[1]: systemd-tmpfiles-setup-dev.service: Succeeded.
mrt 26 19:24:52 user systemd[1]: Stopped Create Static Device Nodes in /dev.
mrt 26 19:24:52 user systemd[1]: systemd-sysusers.service: Succeeded.
mrt 26 19:24:52 user systemd[1]: Stopped Create System Users.
mrt 26 19:24:52 user systemd[1]: systemd-remount-fs.service: Succeeded.
mrt 26 19:24:52 user systemd[1]: Stopped Remount Root and Kernel File Systems.
mrt 26 19:24:52 user lvm[13235]: 2 logical volume(s) in volume group "vgubuntu" unmonitored
mrt 26 19:24:52 user systemd[1]: lvm2-monitor.service: Succeeded.
mrt 26 19:24:52 user systemd[1]: Stopped Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
mrt 26 19:24:52 user systemd[1]: Reached target Shutdown.
mrt 26 19:24:52 user systemd[1]: Reached target Final Step.
mrt 26 19:24:52 user systemd[1]: systemd-reboot.service: Succeeded.
mrt 26 19:24:52 user systemd[1]: Finished Reboot.
mrt 26 19:24:52 user systemd[1]: Reached target Reboot.
mrt 26 19:24:52 user systemd[1]: Shutting down.
mrt 26 19:24:52 user systemd-shutdown[1]: Syncing filesystems and block devices.
mrt 26 19:24:52 user systemd-shutdown[1]: Sending SIGTERM to remaining processes...
mrt 26 19:24:52 user systemd-journald[733]: Journal stopped
提前致谢!