Bug #967
If root cannot be remounted "rw" due to an issue, the status is falsely reported as "OK"
| Status: | New | Start date: | 01/30/2012 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | Boot sequence | |||
| Target version: | - |
Description
Seems the remount handler cannot fully identify the status from mount -o remount.
I had a small world of pain until I identified this issue, it would be good to verify if it applies to other mount issues as well.
The setup-alpine creates a ext4 filesystem with the "barrier=1" option. When testing Alpine VMs on a older Xen host that still had a 2.6.18.... RHEL-based kernel there's the issue that the devmapper/LVM cannot correctly handle barriers.
Ext4 denies the remount to RW under this condition[*]. Nonetheless the boot script that remounts root does report an OK state. There's a lot of ext errors if I manually try this.
I think the most important part in this is to identify holes in the return code handling.
The bug in itself is only a small nuisance for me so far.
I can re-test or provide a test vm for this.
[*](and it doesn't matter if you set "nobarrier" in your fstab, for some reason. mount bug actually, can verify that manually if you do mount -o remount,nobarrier and cat /proc/mounts - the arguments are stacked. If you do a tune2fs and set nobarrier that way, it'll work)
History
Updated by Natanael Copa 4 months ago
from openrc's /etc/init.d/root:
ebegin "Remounting root filesystem read/write"
case "$RC_UNAME" in
Linux) mount -n -o remount,rw /;;
*) mount -u -o rw /;;
esac
if eend $? "Root filesystem could not be mounted read/write"; then
rm -f /fastboot /forcefsck
fi
Looks correct. Then i suspect that it is busybox mount that returns ok when it fails to remount rw.
Do you think you would be able to reproduce it on a temp disk from command line? maybe install util-linux and run "strace mount -o remount,rw" and compare with "strace busybox mount -o remount,rw" and compare the exit code $?
If you can confirm that util-linux's mount returns different exit code than busybox mount, and you have strace that shows what happens, then we could report it back to busybox developers.
Thanks!