/tmp Partition still in use after umount

Bug #1786004 reported by Burkhard
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
Expired
Undecided
Unassigned

Bug Description

I have an ext4 partition (/dev/sda6) mounted to /tmp at boot time via /etc/fstab. If I try to perform fsck and therefore umount it after stopping all processes which have open files on /tmp, I always get the error

/dev/sda6 is in use.
e2fsck: Cannot continue, aborting.

The error occurs even though the umount umount command succeeded and the partition is definitely not mounted anymore. After some trying I found out that systemctl uses systemd-fstab-generator to manage "mount units" generated from fstab at boot time. So I tried "systemctl stop tmp.mount" and I did not get the error. My conclusion is, that systemd MUST do something in addition to a normal umount call, although "ExecUnmount" is set to "/bin/umount /tmp -c" (I even tried the -c option manually without success). What can be the difference? The fstab entry is:
"/dev/disk/by-label/TEMP /tmp ext4 auto,rw,data=journal"

I also tried not to use the partition label but /dev/sda6 directly instead, but that did not help.

The problem also does not occur, when removing the entry from fstab, rebooting and then mounting / unmounting it manually.

I wonder if calling the umount command directly is not recommended anymore since systemd has taken over the control about the fstab-mounts? What is systemd exactly doing when unmounting the partition in difference to the bare umount command?

Steps to reproduce the error:
- Booting the system
- Stopping all relevant processes to make sure that there are not open filepointers under /tmp
- umount /tmp
- fsck.ext4 /dev/sda6

Steps to reproduce the expected behaviour (no error):
- Booting the system
- Stopping all relevant processes
- systemctl stop tmp.mount
- fsck.ext4 /dev/sda6

I am using
- Ubuntu 18.04.1 LTS
- Kernel 4.15.0-30-generic
- e2fsck 1.44.1

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1786004/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Paul White (paulw2u) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to review all reported bugs in a timely manner.

Ubuntu 18.04 (bionic) reached end-of-standard-support on May 31, 2023.

I'm setting the status of this bug to 'Incomplete' as it's not seen any activity for some time. If this is still an issue when using a currently maintained release of Ubuntu then please let us know which one(s) otherwise this bug report can be left to expire in approximately 60 days time.

tags: added: bionic
Changed in ubuntu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Ubuntu because there has been no activity for 60 days.]

Changed in ubuntu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.