Welcome! Log In Create A New Profile

Advanced

Restarting of nfs-kernel-server by udev event during booting

Posted by shv 
shv
Restarting of nfs-kernel-server by udev event during booting
September 01, 2013 09:31AM
I am using an udev configuration which restarts the nfs-kernel-server after disks are mounted. Now I got a problem that this stops the system startup.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...[   39.464422] EXT4-fs (sdb1): Ignoring deprecated nobh option
[   40.050294] EXT4-fs (sdb1): barriers disabled
[   40.148387] EXT4-fs (sdb1): mounted filesystem with writeback data mode. Opts: barrier=0,data=writeback,nobh,commit=100,nouser_xattr,errors=remount-ro
[   41.536849] RPC: Registered named UNIX socket transport module.
[   41.542845] RPC: Registered udp transport module.
[   41.547583] RPC: Registered tcp transport module.
[   41.552305] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   41.663090] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
^CSetting parameters of disc: (none).
At the line "Installing knfsd..." I must push Ctrl+C that the startup continues.

Part of udev config:
# Mount the device
ACTION=="add", ENV{dir_name}!="", RUN+="/bin/mkdir -p '/media/%E{dir_name}'", RUN+="/bin/mount -o %E{mount_options} /dev/%E{crypto}%k '/med$
ACTION=="add", ENV{dir_name}!="", RUN+="/etc/rc.local.durchsatz '%E{dev_name}'", RUN+="/etc/init.d/nfs-kernel-server restart"

I took the rootfs over from Pogoplug Pro and just added the 3.3.2 kernel. On Pogoplug Pro it was working.



Edited 1 time(s). Last edit at 09/01/2013 09:34AM by shv.
Re: Restarting of nfs-kernel-server by udev event during booting
September 02, 2013 11:17PM
shv,

I'm curious, why do you restart nfs-kernel-server when the disks are mounted? can you just re-export the nfs shares instead? (if that's what you want to do).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
shv
Re: Restarting of nfs-kernel-server by udev event during booting
September 03, 2013 02:13PM
I want to export the drives if they are switched on after booting the device. But it can also occure that they are already up and running during the startup and this caused the problem. How can I reexport them without a restart of nfs-kernel-server?
Re: Restarting of nfs-kernel-server by udev event during booting
September 04, 2013 12:34AM
shv Wrote:
-------------------------------------------------------
> I want to export the drives if they are switched
> on after booting the device. But it can also
> occure that they are already up and running during
> the startup and this caused the problem. How can I
> reexport them without a restart of
> nfs-kernel-server?

You can do exportfs -r to reexport whatever nfs shares defined in /etc/exports

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: