As of recently, NFS mounts listed in /etc/fstab are failing during startup,but work fine if issued manually once the system is up. syslog gives: May 13 06:22:58 localhost kernel: [ 40.658499] RPC: Registered tcp NFSv4.1 backchannel transport module. May 13 06:22:58 localhost mount[2962]: mount.nfs: No such device May 13 06:22:58 localhost systemd[1]: mnt-ftgme2.mount mount process exited, code=exited status=32 so it looks like the fstab mounts are being attempted either before the network is up or before NFS itself is up.
Assignee: bugsquad => mageia
It's possibly just an ordering thing... Likely related (in part) to https://bugzilla.redhat.com/show_bug.cgi?id=786050 Can you modify: /etc/rc.d/init.d/nfs-common and make the LSB line: # Provides: nfs-common $network This should make nfs-common start as part of network.target which remote-fs-pre.target has to start after. This should ensure that the mounts only happen after nfs-common has started.
Tried the nfs-common change. Some of the mounts work, and some of them fail. I'll attach an edited syslog. One odd thing is that nfs-common appears to be started VERY close to the start of the boot, and WAY before the network is up.
Created attachment 2318 [details] edited syslog starting at boot
And just to complete the picture, after booting: [root@ftgme2 ftg]# df Filesystem Size Used Avail Use% Mounted on rootfs 20G 16G 3.8G 81% / devtmpfs 3.8G 0 3.8G 0% /dev tmpfs 3.8G 611M 3.2G 16% /dev/shm tmpfs 3.8G 1.3M 3.8G 1% /run /dev/sda2 20G 16G 3.8G 81% / tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup none 3.8G 6.2M 3.8G 1% /tmp /dev/sda10 147G 135G 4.5G 97% /data3 /dev/sda7 126G 80G 41G 67% /data /dev/sda12 297G 49G 234G 18% /data2 /dev/sda6 16G 3.9G 12G 26% /usr/local /dev/sda8 126G 113G 7.3G 94% /mnt/VirtualBox /dev/sda11 128G 93G 30G 76% /oma ftgfiles1:/mnt/backups/ 201G 137G 54G 72% /mnt/backups ftglap:/ 20G 17G 2.3G 88% /mnt/ftglap [root@ftgme2 ftg]# mount -t nfs -a mount.nfs: /mnt/backups is busy or already mounted [root@ftgme2 ftg]# df Filesystem Size Used Avail Use% Mounted on rootfs 20G 16G 3.8G 81% / devtmpfs 3.8G 0 3.8G 0% /dev tmpfs 3.8G 611M 3.2G 16% /dev/shm tmpfs 3.8G 1.3M 3.8G 1% /run /dev/sda2 20G 16G 3.8G 81% / tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup none 3.8G 6.2M 3.8G 1% /tmp /dev/sda10 147G 135G 4.5G 97% /data3 /dev/sda7 126G 80G 41G 67% /data /dev/sda12 297G 49G 234G 18% /data2 /dev/sda6 16G 3.9G 12G 26% /usr/local /dev/sda8 126G 113G 7.3G 94% /mnt/VirtualBox /dev/sda11 128G 93G 30G 76% /oma ftgfiles1:/mnt/backups/ 201G 137G 54G 72% /mnt/backups ftglap:/ 20G 17G 2.3G 88% /mnt/ftglap ftglap:/data/ 64G 37G 25G 60% /mnt/ftglap.data ftgfiles1:/mnt/cauldron/ 104G 69G 30G 70% /mnt/cauldron ftgfiles1:/mnt/cooker/ 119G 110G 2.6G 98% /mnt/cooker ftgfiles1:/mnt/plf/ 7.9G 3.4G 4.2G 45% /mnt/plf ftgfiles1:/usr/local/ 4.0G 2.1G 1.7G 56% /mnt/ftgfiles1.usr.local [root@ftgme2 ftg]#
OK, so there are a few issues here it seems. 1. rpcbind.service is totally disconnected to rpcbind.target which is used as a synchronisation point. Adding the following lines to rpcbind.service should fix that: Before=rpcbind.target remote-fs-pre.target Wants=rpcbind.target 2. Even with these fixes which allows rpcbind to start properly and for nfs-common.service to wait until rpcbind is ready before it starts, I still see a problem. nfs-common.service is not ordered before remote-fs-pre.target which it needs to be. Sadly, as it's a non-native unit, the only way to do this is to adjust remote-fs-pre.target itself and put in a "After=nfs-common.service" line. I think these two changes should fix things, but still need to test.
OK, so that seemed to work OK for me. Here are the changes I made. Can you test at your end and see if it works for you too? (Note you can copy the files to the /etc/ tree instead and make the modifications there - that's what I did). --- /lib/systemd/system/rpcbind.service 2012-04-28 04:44:08.000000000 +0100 +++ /lib/systemd/system/rpcbind.service 2012-05-16 23:11:46.630657069 +0100 @@ -2,6 +2,8 @@ Description=RPC bind service Requires=rpcbind.socket After=syslog.target network.target +Before=rpcbind.target remote-fs-pre.target +Wants=rpcbind.target [Service] Type=forking --- /lib/systemd/system/remote-fs-pre.target 2012-05-10 22:16:45.000000000 +0100 +++ /lib/systemd/system/remote-fs-pre.target 2012-05-16 23:27:11.056224983 +0100 @@ -9,4 +9,4 @@ [Unit] Description=Remote File Systems (Pre) -After=network.target +After=network.target nfs-common.service
Oh and you should revert my previous suggested change in nfs-common initscript otherwise there will be a deadlock... (rpcbind.service starts after network.target but due to the "Required-Start: $portmap" lsb header, nfs-common will only start after rpcbind.target and thus after network.target too).
That did it. Working perfectly now, thanks.
OK, this fix is now pushed. Thanks for testing.
Status: NEW => RESOLVEDResolution: (none) => FIXED
In current cauldron, the fixed line in remote-fs-pre.target no longer contains "nfs-common-service", but has "nss-lookup.target" in its place. Is this correct, or did the fix get lost ?