Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 415523 - sys-apps/openrc: localmount should skip /usr when unmounting local filesystems when stopped
Summary: sys-apps/openrc: localmount should skip /usr when unmounting local filesystem...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: openrc-0.10
  Show dependency tree
 
Reported: 2012-05-12 00:34 UTC by Matthias Maier
Modified: 2012-05-14 00:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,4.96 KB, text/plain)
2012-05-12 00:34 UTC, Matthias Maier
Details
proposed change in localmount (localmount.diff,481 bytes, patch)
2012-05-12 00:36 UTC, Matthias Maier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Maier gentoo-dev 2012-05-12 00:34:26 UTC
When the localmount service is stopped (e.g. on a reboot, shutdown or telinit 1) it unmounts local filesystems, skipping /, /dev and §RC_NO_UNMOUNTS.

I propose to hardcode /usr, too.

With recent changes in udev, lvm, etc. pp. it is mandatory to have /usr mounted in an initramfs prior to init startup. It therefore doesn't make terribly much sense to unmount /usr too early (or at all). Two examples:

- It is not possible to make a clean "init 1 && init 3" because of udev, lvm, microcode-ctl (and some more) failing in unpredictable ways because of missing /usr

- Normal system shutdown fails in unpredictable ways as soon as /usr is unmounted.

Reproducible: Always
Comment 1 Matthias Maier gentoo-dev 2012-05-12 00:34:58 UTC
Created attachment 311459 [details]
emerge --info
Comment 2 Matthias Maier gentoo-dev 2012-05-12 00:36:14 UTC
Created attachment 311461 [details, diff]
proposed change in localmount
Comment 3 William Hubbs gentoo-dev 2012-05-13 19:51:21 UTC
My concern about the change as you propose it is that it affects both
linux and *bsd systems, but we should only skip /usr on linux systems.
Comment 4 Matthias Maier gentoo-dev 2012-05-13 22:31:37 UTC
(In reply to comment #3)

*mhm* This is indeed true.
What about providing a default value of RC_NO_UMOUNTS="/usr" for the ebuild for Gentoo-Linux?
Comment 5 SpanKY gentoo-dev 2012-05-13 23:04:11 UTC
(In reply to comment #3)

i don't think it matters.  remounting /usr read-only should work on any system.
Comment 6 William Hubbs gentoo-dev 2012-05-14 00:12:01 UTC
The only difference between the patch on this bug and the fix is that
/usr needed to be added to the regexp only for linux systems. This has
been done in commit ee1a698.

Thanks for the report.