Bug 657497 - systemd-shutdown is a bit to noisy when it cannot detach the DM device the root dir is on.
Summary: systemd-shutdown is a bit to noisy when it cannot detach the DM device the ro...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-26 09:37 UTC by Petr Lautrbach
Modified: 2011-09-05 23:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-06 18:14:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Petr Lautrbach 2010-11-26 09:37:06 UTC
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:

Comment 1 Lennart Poettering 2011-01-04 23:43:29 UTC
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.

Comment 2 Lennart Poettering 2011-01-06 18:14:22 UTC
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.

Comment 3 Lennart Poettering 2011-01-06 18:15:47 UTC
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

Comment 4 Andre Costa 2011-09-01 21:53:40 UTC
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?

Comment 5 Lennart Poettering 2011-09-05 23:41:53 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.