Slow shutdown with encrypted LVM

I installed OpenSUSE 13.2 with an encrypted LVM in VirtualBox in order to test full disk encryption before using this setup with real hardware. So far, the encryption works as expected, but the shutdown takes at least 10s longer in comparison to a setup without full disk encryption. And this does not seem to be related to the encryption overhead. When shutting down the following messages appear before the virtual machine is closed:

  1. systemd-shutdown[1]: Cannot finalize remaining file systems and devices, giving up.
  2. systemd-shutdown[1]: Failed to mkdir /run/initramfs/oldroot: Read-only file system

Is this a bug related to VirtualBox only? Is there a solution for this problem?

No idea how you have things configured so can not say.

Do you have a separate /boot partitions??

What file system are you using??

I am not noticing much slowdown. Shutdown with 13.2 is a lot faster than shutdown with 13.1.

Yes, I see that “giving up” message, though it goes past rather quickly. I take that to be unavoidable. At that stage, the root file system is mounted read-only. But it is still in use, so the crypto for it cannot be shutdown. If I later check, an “fsck” shows the file system to be clean. So I don’t see this as any actual problem.

I am not using a virtual machine. My main destop uses an encrypted LVM as directly installed to the hard drive.

Default setup as suggested by the installer - the only changes I did during installation: enable LVM and encryption and changed desktop environment to GNOME.

A separate, unencrypted /boot partition (ext4) is available in addition to the encrypted LVM containing /home (XFS), /root (BtrFS) and swap partitions.

As long as there is no data loss due to this behavior, I could ignore the message (like the “Fast TSC calibration failed” message at startup). Nevertheless I would appreciate it, if I could get rid of the problem as the system waits needlessly several seconds until it gives up.

Set up serial console (should be easy with emulation), boot without “quiet”, enable debugging (/bin/kill -RTMIN+22 1) and log to console (/bin/kill -RTMIN+27 1) and shutdown. This should give detailed log on console which may help to understand what happens and where it waits.

Well, that definetly exceeds my knowledge as I could not get any output to be shown in PuTTY.

Maybe someone with more expertise can replicate this behavior too - in my opinion it should be replicable as I was just doing a standard install of OpenSUSE 13.2 clicking on next with only the following exceptions:

  1. Suggested Partitioning > Edit Proposal Settings > Create LVM-based Proposal: true and Encrypt Volume Group: true
  2. Desktop Selection: GNOME Desktop instead of KDE Desktop

That’s all I did :|. So nothing special, just a plain vanilla installation in VirtualBox on Windows 7.