[opensuse-factory] Problem with systemd and NFS mounts with no "system" connection
Hi, For some time, I have had a problem that booting with systemd enabled never completed. I had not had a chance to debug that issue until today, when I was forced to do it. After a 'zypper up' on October 13, I was no longer able to select SystemV using either "init=/sbin/init" in the GRUB options line, nor with F5. GRUB seems to do the right thing but the console log indicates that systemd is running. From a Fedora article on debugging systemd, I discovered the boot commands to enable a log level of "debug". From that, I could see that the NFS mounts were failing. The problem is as follows: My network connection uses wireless with NetworkManager and the KDE plasmoid applet, thus no connection is made until a user has logged in. However, systemd will not proceed until the NFS volumes are mounted, and there is an impasse. I allowed the system to sit for nearly 2 hours, and it never finished booting. The patch to /etc/init.d/nfs shown below is a workaround. It places the NFS mount in the background so that it is completed when the network is up, but booting can continue. Index: etc/init.d/nfs =================================================================== --- etc.orig/init.d/nfs +++ etc/init.d/nfs @@ -244,7 +244,8 @@ case "$1-$nfs" in # of them. So always 'settle' if there is any mounting to do. echo -n "Mounting network file systems ..." udevadm settle - mount -at nfs,nfs4 || rc_failed 1 + sleep 2 && mount -at nfs,nfs4 & + sleep 2 rc_status -v fi # My change might not work when some of the system's files are contained on NFS volumes. I have no way to test, but the patch does make my system usable again. Larry -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/14/2011 12:04 PM, Larry Finger pecked at the keyboard and wrote:
Hi,
For some time, I have had a problem that booting with systemd enabled never completed. I had not had a chance to debug that issue until today, when I was forced to do it. After a 'zypper up' on October 13, I was no longer able to select SystemV using either "init=/sbin/init" in the GRUB options line, nor with F5. GRUB seems to do the right thing but the console log indicates that systemd is running.
From a Fedora article on debugging systemd, I discovered the boot commands to enable a log level of "debug". From that, I could see that the NFS mounts were failing.
The problem is as follows: My network connection uses wireless with NetworkManager and the KDE plasmoid applet, thus no connection is made until a user has logged in. However, systemd will not proceed until the NFS volumes are mounted, and there is an impasse. I allowed the system to sit for nearly 2 hours, and it never finished booting.
The patch to /etc/init.d/nfs shown below is a workaround. It places the NFS mount in the background so that it is completed when the network is up, but booting can continue.
Index: etc/init.d/nfs =================================================================== --- etc.orig/init.d/nfs +++ etc/init.d/nfs @@ -244,7 +244,8 @@ case "$1-$nfs" in # of them. So always 'settle' if there is any mounting to do. echo -n "Mounting network file systems ..." udevadm settle - mount -at nfs,nfs4 || rc_failed 1 + sleep 2 && mount -at nfs,nfs4 & + sleep 2 rc_status -v fi #
My change might not work when some of the system's files are contained on NFS volumes. I have no way to test, but the patch does make my system usable again.
Larry
Isn't this a great way to run networking? You can't login to an nfs mounted home volume until networking is up and running, and networking won't come up until to login. Anyone see a catch 22 here? -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/14/2011 01:11 PM, Ken Schneider - openSUSE wrote:
On 10/14/2011 12:04 PM, Larry Finger pecked at the keyboard and wrote:
Hi,
For some time, I have had a problem that booting with systemd enabled never completed. I had not had a chance to debug that issue until today, when I was forced to do it. After a 'zypper up' on October 13, I was no longer able to select SystemV using either "init=/sbin/init" in the GRUB options line, nor with F5. GRUB seems to do the right thing but the console log indicates that systemd is running.
From a Fedora article on debugging systemd, I discovered the boot commands to enable a log level of "debug". From that, I could see that the NFS mounts were failing.
The problem is as follows: My network connection uses wireless with NetworkManager and the KDE plasmoid applet, thus no connection is made until a user has logged in. However, systemd will not proceed until the NFS volumes are mounted, and there is an impasse. I allowed the system to sit for nearly 2 hours, and it never finished booting.
The patch to /etc/init.d/nfs shown below is a workaround. It places the NFS mount in the background so that it is completed when the network is up, but booting can continue.
Index: etc/init.d/nfs =================================================================== --- etc.orig/init.d/nfs +++ etc/init.d/nfs @@ -244,7 +244,8 @@ case "$1-$nfs" in # of them. So always 'settle' if there is any mounting to do. echo -n "Mounting network file systems ..." udevadm settle - mount -at nfs,nfs4 || rc_failed 1 + sleep 2 && mount -at nfs,nfs4 & + sleep 2 rc_status -v fi #
My change might not work when some of the system's files are contained on NFS volumes. I have no way to test, but the patch does make my system usable again.
Larry
Isn't this a great way to run networking? You can't login to an nfs mounted home volume until networking is up and running, and networking won't come up until to login. Anyone see a catch 22 here?
None of my NFS volumes are home, and the system can come up without any of the network volumes being mounted. If I wanted home on a network volume, I would not use NetworkManager, and I certainly would not want use a wireless connection in that case. None-the-less, there still is a bit of Catch 22. Larry -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Larry Finger wrote:
On 10/14/2011 01:11 PM, Ken Schneider - openSUSE wrote:
On 10/14/2011 12:04 PM, Larry Finger pecked at the keyboard and wrote:
The problem is as follows: My network connection uses wireless with NetworkManager and the KDE plasmoid applet, thus no connection is made until a user has logged in. However, systemd will not proceed until the NFS volumes are mounted, and there is an impasse. I allowed the system to sit for nearly 2 hours, and it never finished booting.
Isn't this a great way to run networking? You can't login to an nfs mounted home volume until networking is up and running, and networking won't come up until to login. Anyone see a catch 22 here?
None of my NFS volumes are home, and the system can come up without any of the network volumes being mounted. If I wanted home on a network volume, I would not use NetworkManager, and I certainly would not want use a wireless connection in that case.
Still, your modus operandi is a but unclear to me. Your situation seems to be the prototypical autofs use case. Do I understand correctly that you don't use autofs, but, in your 11.3 configuration, rely on the backgrounding ability of NFS mounts to wait until a server appears to be ready to get access to your network shares? If yes, why don't you use autofs which is the standard tool for mount-when-accessed/needed-and-network-is-available use cases? Cheers, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 10/14/2011 06:25 PM, Joachim Schrod wrote:
Larry Finger wrote:
On 10/14/2011 01:11 PM, Ken Schneider - openSUSE wrote:
On 10/14/2011 12:04 PM, Larry Finger pecked at the keyboard and wrote:
The problem is as follows: My network connection uses wireless with NetworkManager and the KDE plasmoid applet, thus no connection is made until a user has logged in. However, systemd will not proceed until the NFS volumes are mounted, and there is an impasse. I allowed the system to sit for nearly 2 hours, and it never finished booting.
Isn't this a great way to run networking? You can't login to an nfs mounted home volume until networking is up and running, and networking won't come up until to login. Anyone see a catch 22 here?
None of my NFS volumes are home, and the system can come up without any of the network volumes being mounted. If I wanted home on a network volume, I would not use NetworkManager, and I certainly would not want use a wireless connection in that case.
Still, your modus operandi is a but unclear to me. Your situation seems to be the prototypical autofs use case.
Do I understand correctly that you don't use autofs, but, in your 11.3 configuration, rely on the backgrounding ability of NFS mounts to wait until a server appears to be ready to get access to your network shares?
If yes, why don't you use autofs which is the standard tool for mount-when-accessed/needed-and-network-is-available use cases?
First of all, this is with 12.1 Beta, not 11.3. I added the NFS volumes using YaST NFS client and it put the NFS volumes in /etc/fstab with "defaults" as the only option. AFAIK, this means they will be mounted at boot time. I could use autofs, but I would expect that most users will do as I did, and it should work. Larry at boot time. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Larry Finger writes:
On 10/14/2011 06:25 PM, Joachim Schrod wrote:
Larry Finger wrote:
On 10/14/2011 01:11 PM, Ken Schneider - openSUSE wrote:
On 10/14/2011 12:04 PM, Larry Finger pecked at the keyboard and wrote:
The problem is as follows: My network connection uses wireless with NetworkManager and the KDE plasmoid applet, thus no connection is made until a user has logged in. However, systemd will not proceed until the NFS volumes are mounted, and there is an impasse. I allowed the system to sit for nearly 2 hours, and it never finished booting.
Isn't this a great way to run networking? You can't login to an nfs mounted home volume until networking is up and running, and networking won't come up until to login. Anyone see a catch 22 here?
None of my NFS volumes are home, and the system can come up without any of the network volumes being mounted. If I wanted home on a network volume, I would not use NetworkManager, and I certainly would not want use a wireless connection in that case.
Still, your modus operandi is a but unclear to me. Your situation seems to be the prototypical autofs use case.
Do I understand correctly that you don't use autofs, but, in your 11.3 configuration, rely on the backgrounding ability of NFS mounts to wait until a server appears to be ready to get access to your network shares?
If yes, why don't you use autofs which is the standard tool for mount-when-accessed/needed-and-network-is-available use cases?
First of all, this is with 12.1 Beta, not 11.3.
As far as I understood, this setup worked in a previous pre-systemd setting; and I tried to understood what you were doing in that previous installation. That's why I wrote 11.3. Thus, my question was not about the non-working new installation, but about the previous working one, to be able to understand what behaviour changed with systemd in 12.1. I ask this because I'm wondering why it worked at all in that previous version.
I added the NFS volumes using YaST NFS client and it put the NFS volumes in /etc/fstab with "defaults" as the only option. AFAIK, this means they will be mounted at boot time. I could use autofs, but I would expect that most users will do as I did, and it should work.
So you rely on the feature that a netword share can be mounted at boot time when no network is available. When the network will be available, it shall automagically get available. I don't know if that is really the typical use case as you perceive it. I would expect that most users who use NFS don't have their network startup triggered at login, but at boot time. Nevertheless, it is a valid use case scenario, that I don't contest. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (3)
-
Joachim Schrod
-
Ken Schneider - openSUSE
-
Larry Finger