I am having issues with an error message when shutting down or rebooting my Ubuntu 22.04.3 server.

On screen I can see that during shutdown /var and /var/lib which are on seperate partitions cannot be unmounted. I found out that it could be because of systemd-journald.service tries to log till the end of the shutdown. Therefore the mountpoint is busy and cannot be unmounted.

I wasn't able to find useful work-arounds and I was kind of amazed that there is so little information about this on the internet.
I also tried to set up a virtual box and as soon as /var is on a different partition, it fails to unmount when turning off.

My question now:
Can logs get corrupted when /var and/or /var/lib cannot be unmounted?
Will it try to unmount the mountpoints in a later phase without displaying it?

In my specific use-case logs are very important.

As a possible work-around I was thinking of moving the rotated logs to a different partition with something like a cron-job but when there is the option to move the whole /var partition to a different partition ...

  • Your configuration. is not valid (/var on separate partition), for just this reason. See the Filesystem Hierarcy Standard at https://refspecs.linuxfoundation.org/fhs.shtml, or read man hier.
    – waltinator
    Dec 3, 2023 at 20:37
  • Sorry, no clue what you mean or want to tell me. I dont think that my "configuration" is "invalid" when setting up partitions like that
    – Niklas
    Dec 3, 2023 at 20:42
  • If I'm reading it right, this does seem to be a longstanding known issue /var stays busy at shutdown due to journald #867 - possibly worked around via a .override? Dec 3, 2023 at 22:12
  • 1
    If systemd doesn't support a well-established *nix partitioning scheme, imho that's a bug not a "configuration problem" Dec 4, 2023 at 3:14
  • I also found the bug #867 that @steeldriver mentioned but I was wondering how this bug cannot be solved by now when thinking of that the bug is closed. I tried several suggestions in the unit-file of systemd-journald.service and systemd-journal-flush.service but it did not help.
    – Niklas
    Dec 4, 2023 at 7:55


You must log in to answer this question.

Browse other questions tagged .