Description of problem: After upgrading to Fedora 15 (both NFS client and server) the client-access to NFS directories suddenly was read-only. Both client (/proc/mounts) and server (/proc/fd/nfsd/exports) claimed that all was rw. Furhter investigation showed that the bind mounts (like fstab: /home/ /var/exports/home none bind 0 0) used for the NFS4 exports had all become ro. This resulted in denying write access by NFSD as well. During mount the bind mounts copy rw access from the original filesystem, which in this case is the root filesystem. During the early stages of the boot process the filesystem is mounted ro, to be remounted rw after checking. So my guess is that systemd does these bind mounts in a very early stage. Bug 710368 may be related. Version-Release number of selected component (if applicable): kernel-2.6.38.6-26.rc1.fc15.x86_64 systemd-26-5.fc15.x86_64 nfs-utils-1.2.3-11.fc15.x86_64 How reproducible: 90%, On some accasions the bind mounts are mounted rw. Steps to Reproduce: 1. Create bind mounts for existing directories on the root filesystem 2. Reboot 3. Not that the bind mounts are ro unlike the root filesystem Actual results: EROFS when initiating write access to NFS files/directories Expected results: Normal read/write access Additional info: After boot the bind directories can be remounted rw, which solves the problem
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.