Hello,
I have a little problem with nfs and systemd on Opensuse 12.1
We mount our home directory via nfs and since we use fast Virtual Machines, the login screen is ready before home is mounted, so if a user wants to login he gets an error.
So it would be a good idea to create a dependency which only starts the login, when home is mounted (I don’t need the machine if I have no home, and for maintenance, I boot into runlevel 3)
I tried this with creating a file home.mount with the following content:
# cat /etc/init.d/after.local
# !/bin/sh
echo ""
echo -n "Running after.local "
# run a command after a given process
function runafter {
proc=$1
shift
-x $proc ] || return 1
while ( ! /sbin/checkproc $proc ) ; do
sleep 1
done
$* >/dev/null
}
# mounting fileserver
runafter /sbin/rpcbind
# mount your home directory via nfs here
Another option is to see if SysVinit shows the same problem. At boot, hit F5 en choose System V. If the problem is not there when booting with System V’s init, you can make this persistent by installing sysvinit-sysvinit
It won’t. (I mean, yes, it will work fine in sysVinit). It’s a typical systemd problem and doesn’t only affect openSUSE. The trick I use on Fedora is even ugglier. rpcbind is started too late, preventing nfs mount from working at system start. You have to insert a delay somewhere.
On 2012-03-07 22:06, please try again wrote:
>
> Knurpht;2446621 Wrote:
>> Another option is to see if SysVinit shows the same problem.
>
> It won’t. (I mean, yes, it will work fine in sysVinit). It’s a typical
> systemd problem and doesn’t only affect openSUSE. The trick I use on
> Fedora is even ugglier. rpcbind is started too late, preventing nfs
> mount from working at system start. You have to insert a delay
> somewhere.
The script does work. I use it on half a dozen machines to mount our file server. But the script alone is not enough. You also have to re-enable after.local, so that this script gets executed. That’s why I started my thread with a link to a blog article by @jdmcdaniel3 explaining how to achieve that: systemd and using the after.local script in openSUSE 12.1 - Blogs - openSUSE Forums.
Hi,
sorry for my allegation that it does not work, I did not read properly
(and I totally blame the Friday for this )
When i activate it, it works great on my desktop nodes, so thanks a lot for that.
But for some reasons, it does not work on machines which only start in textmode.
There after sometime i get the message “Starting rpc.statd” after some time.