Description of problem: My system using / on lvm as is in default configuration: /dev/mapper/VolGroup-lv_root on / type ext4 (rw) /dev/mapper/VolGroup-lv_root -> ../dm-0 I can see 'Device or resource busy' messages in log during poweroff. Version-Release number of selected component (if applicable): systemd-15-1.fc15.x86_64 How reproducible: always Steps to Reproduce: 1. poweroff 2. see logs 3. Actual results: Disabling swaps. Detaching loop devices. Detaching DM devices. [ 509.545048] device-mapper: ioctl: unable to remove open device VolGroup-lv_root Could not delete dm /dev/dm-0: Device or resource busy Not all DM devices detached, 1 left. Detaching DM devices. [ 509.547814] device-mapper: ioctl: unable to remove open device VolGroup-lv_root Could not delete dm /dev/dm-0: Device or resource busy Not all DM devices detached, 1 left. Cannot finalize remaining file systems and devices, trying to kill remaining processes. Detaching DM devices. [ 509.551577] device-mapper: ioctl: unable to remove open device VolGroup-lv_root Could not delete dm /dev/dm-0: Device or resource busy Not all DM devices detached, 1 left. Cannot finalize remaining file systems and devices, giving up. [ 509.554627] md: stopping all md devices. Expected results: Additional info:
Hmm, you have the root dir on LVM. Since we cannot unmount the root dir we hence cannot detach its DM device. Which is why you see what you see. This isn't really a problem though, as traditionally we never even bothered to detach the DM devices like this. However, we probably should make these error message show up less prominently, to not confuse the user.
The dm kernel folks have now downgraded the "device-mapper: ioctl: unable to remove open device" message to debug which means it shouldn't show up on the console anymore by default. I also have changed systemd git to avoid trying to detach the dm device the root dir is on, which should have the effect that you won't see "Device or resource busy" anymore. I think this should resolve this bug report.
The ideal fix btw would be if we could actually unmount the root dir on shutdown and hence detach the dm device it is on, which we cannot do right now. I have created an RFE tracker bug for that so that we don't forget about it. https://bugzilla.redhat.com/show_bug.cgi?id=667557
Hi, I know this issue is already marked as CLOSED UPSTREAM but I just wanted to confirm this can't be the cause for bug 712060, since "Cannot finalize remaining file systems and devices, giving up" is the last thing I read before "[<timestamp>] Power down." Lennart, can you confirm this can't under some circunstances (in my case I'd say it's 90% of the time) prevent the system from powering off?
Yes, this is unrelated to bug 712060. This bug is about being to noisy, i.e. just a cosmetic issue, nothing which would stop you from shutting down. If the last message you see is the kernel's "Power down" message, then it appears it is a kernel problem, indeed.