| Summary: | NFS exports bind mounts as read-only | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Rolf Fokkens <rolf> |
| Component: | systemd | Assignee: | systemd-maint |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 15 | CC: | harald, johannbg, k.georgiou, lpoetter, metherid, mschmidt, notting, oron, paul, plautrba, tom |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | systemd-37-3.fc16 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-11-10 17:37:03 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Rolf Fokkens
2011-07-03 09:33:23 UTC
I managed to reproduce using this in fstab: /etc /dummy none bind 0 0 The problem is that there is no ordering between dummy.mount and remount-rootfs.service. If dummy.mount wins the race, it creates the bind mount while root is still read-only. Some more data points:
* I have several bind mounts for NFS4:
/home /nfs4exports/home
/var/mail /nfs4exports/mail
...
which are obviously exported 'rw' via /etc/exports
* The 'ro' bind-mount bug is happening on 'mail' but not on 'home':
- /home is on a separate LVM logical volume
- /var/mail (and /var) are not (so they belong to /)
* So it's pretty clear all bind mounts should be 'After' the remounting 'rw' of '/'
Any way to implement this logic?
* Another test I did was to try and add in /etc/fstab comment=systemd.automount
for all bind-mount lines, to try and delay their execution -- this did not
help at all.
* As a result after every server boot I need to manually 'exportfs -u' all
these NFS volumes, umount the /nfs4exports/..., remount them again and
'exportfs -a' again.
* Ugly workaround: I moved all my bind-mounts from /etc/fstab to manual commands
in /etc/rc.local and now everything works. So far for "script-less" boot ;-)
I'm seeing this as well. A simple test case that I just setup was to create /export/tmp in a VM and add the following to my /etc/fstab: /tmp /export/tmp none rw,bind 0 0 then I rebooted, and lo and behold that mount is actually read only: fedora15 [~] % fgrep /export/tmp /proc/mounts /dev/mapper/vg_fedora15-lv_root /export/tmp ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0 fedora15 [~] % touch /export/tmp/foo touch: cannot touch `/export/tmp/foo': Read-only file system Incidentally, you don't need to do that whole unexport, unmount, mount, export cycle to fix it - a simple "mount -o remount <filesystem>" is enough. systemd-37-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/systemd-37-1.fc16 Updated the package on my F15 system; the problem has gone. What's the next move? Revert to the systemd-26-10.fc15 packages and wait until they're updated or just leave the F16 packages on my F15 system? systemd-26-11.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/systemd-26-11.fc15 Installed the F15 package, this one also works. Package systemd-26-11.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-26-11.fc15' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-14203 then log in and leave karma (feedback). (In reply to comment #7) > Installed the F15 package, this one also works. Thanks for testing. If you have a FAS account, please add karma to the update in Bodhi. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. systemd-26-13.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. systemd-37-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |