Estou usando o Ubuntu 20.04 há alguns meses no meu computador. Instalado usando o instalador padrão com Full Disk Encryption habilitado. Agora, quando desligo meu computador, o systemd-shutdown produz essas duas mensagens:
systemd-shutdown[1]: Could not detach DM /dev/dm-0: Device or resource busy
systemd-shutdown[1]: Failed to finalize DM devices ignoring
Eles aparecem de forma consistente, também após uma instalação limpa. Eu experimentei isso com o Ubuntu e o Pop_OS!. Sem criptografia, não há mensagens exibidas durante o desligamento. No meu log de desligamento do systemd, vejo as seguintes mensagens aparecendo entre outras:
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.
Eu procurei por um tempo e vi pessoas com diferentes tipos de distribuições linux recebendo essas mensagens. A única 'solução' real que vi foi suprimir as mensagens. Minha pergunta é: esse é um comportamento normal em que a unidade criptografada acabará sendo desmontada após os avisos iniciais ou está sinalizando que a desmontagem não foi concluída? Estou preocupado principalmente com a possível corrupção de dados causada pela desmontagem inadequada. As mensagens em si não me incomodam.
Log do Journalctl do último desligamento (substituí meu nome de usuário e UUIDs, também estão faltando os snappackages desmontando):
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
Desde já, obrigado!
systemd-shutdown
tentará desligar o que puder. Ele não será capaz de se destacar/
, então o aviso é esperado. Além de ignorar e suprimir esta mensagem, existe um software que evita isso, mas você precisa substituir o initramfs iniciado para que seja um dos primeiros softwares usados para inicializar o sistema.Não :)
Se você deseja que o desligamento seja capaz de desanexar
/
, você precisa de um "initramfs" diferente do que o Ubuntu usa. Dracut pode fazer isso.Mais: