Bug 1505075
| Summary: | blk-availability.service: defeats/ignores normal systemd dependencies | ||
|---|---|---|---|
| Product: | [Community] LVM and device-mapper | Reporter: | Alan Jenkins <alan.christopher.jenkins> |
| Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
| lvm2 sub component: | blkdeactivate | QA Contact: | cluster-qe <cluster-qe> |
| Status: | ASSIGNED --- | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | agk, bureau.si2b-socles, heinzm, jbrassow, msnitzer, prajnoha, zkabelac |
| Version: | 2.02.175 | Flags: | rule-engine:
lvm-technical-solution?
rule-engine: lvm-test-coverage? |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Alan Jenkins
2017-10-21 20:29:50 UTC
/fix component. This is the best effort service to try to properly deactivate device-mapper and MD based devices primarily. Such deactivation service was completely missing in non-systemd environments (which this service was firstly designed for a few years ago). In systemd environments, there is a deactivation hook on shutdown provided by systemd directly, but this is really a very last chance to deactivate any remaining devices. This systemd deactivation hook is an iteration over the list of remaining devices and iterated several times (because it's not taking into account that certain devices may already be a part of device stack and hence sitll used). This may fail with more complex device stacks (and it's not including MD devices, just loop and device-mapper): https://github.com/systemd/systemd/blob/master/src/core/shutdown.c So the blkdeactivate is the best-effort service to do the deactivation for devices which may be a part of the stack still (primarily device-mapper-based devices, including LVM devices and then also MD devices). As for the ordering of the blk-availability service, I admit it may be a bit better for systemd environments so I'll check and see if we can improve that. The /boot is now unmounted too in recent version of blkdeactivate script - which is included in device-mapper version 1.02.144, released on 6th September 2017. Thanks for the correction about /boot! If the service' ordering _can't_ be worked out to fit systemd, it needs a massive disclaimer. E.g. if /boot is unmounted prematurely, it races with dracut-shutdown.service. In which case you don't just non-deterministically fail to unmount that filesystem. You non-deterministically break the shutdown-to-initramfs mechanism, which is a hook systemd provides to shut down arbitrarily complex rootfs stacks. Is there any change or news for this bug ? Bug is ASSIGNED since 2017-10-23. Can we have a status update ? Thanks |