Red Hat Bugzilla – Bug 1268349
systemd-readahead touches /.readhead
Last modified: 2017-11-01 05:17:19 EDT
Description of problem:
It seems that systemd-readahead collect tries to touch/create/write /.readahead.
This leads to an error on systems where / is read-only.
Can't read-ahead touch a different file?
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Yep we can probably do that. But it is 7.3 material.
RH, any update on this bug?
HPE bug is 1191750.
I think simple ConditionPathIsReadWrite should do the trick. Hence we would skip collecting read-ahead profile when / is read-only. That would mean users won't get benefits of read-ahead on such systems, but I recon not that many people care for read-ahead these days.
If we use different file then we could run into the same issue.
(In reply to Michal Sekletar from comment #8)
> I think simple ConditionPathIsReadWrite should do the trick. Hence we would
> skip collecting read-ahead profile when / is read-only. That would mean
> users won't get benefits of read-ahead on such systems, but I recon not that
> many people care for read-ahead these days.
> If we use different file then we could run into the same issue.
Lukas pointed out that adding condition doesn't cut it, because we need to check the condition after rootfs was remounted. However we can't simply add After=systemd-remount-fs.service, because that would introduce circular dependency.
We need to figure out something else.
Currently when one enables read-only root via /etc/sysconfig/readonly-root it is still necessary to specify "ro" option for rootfs mount in fstab to actually get read-only filesystem. This is a bug in initscripts.
Proposed solution is to have generator that parses /etc/sysconfig/readonly-root and changes generated mount unit so that rootfs is actually mounted read-only w/o user intervention in fstab. Same generator could also runtime mask systemd-readahead-collect.service in such case.
Reassigning to initscripts.
JoeK, our HPE 1191750 is already closed as won't fix so I am marking HPE verified on this bug.
based on the comment 12 I still don't think this is fixed. If it is really an issue, silently ignoring it might mean than some day in the future it will come back haunting us again (no Halloween reference intended :D).
I'd like to discuss this more with Michal Sekletar when he's back, so I would keep this BZ open for now. :)
-- Dee'Kej --