Slow Boot after adding NFS shares

Just installed 12.1
A few bugs in the install but I got around them.

Anywho, just wanted to know if anyone is experiencing a slow boot after attaching NFS shares.
I have a NAS which I keep my Documents, Multimedia and other stuff on, This allows me to rebuild my machine anytime without having to worry about backing up all that stuff.
I have enabled the NFS server on the NAS and mount the shares in my Home folder. It worked well with 11.4 with no performance hits.
However I have noted that with 12.1 the boot process stops and waits about 1-2minutes since adding the NFS shares to my Home folder. I noted this on the first re-boot after adding the NFS shares.
Before adding the shares the boot was “as advertised” i.e quick.
Do I need to add any optional parameters to the NFS client config in Yast? OR is there some other clever thing I should be doing?

Would appreciate your kind help

Would like to add that all your Hard work on producing this Software is very much appreciated:)

Cheers

Do you use Network Manager or traditional way?
The cause may be that network is not ready yet when NFS client service tries to accesss to remote shares at first time.
Maybe you should set NFS client service to start in runlevel 5 only (when all drivers and network initialize).

I had simalar problem on my desktop computer where in setup the traditional way of bringing network on (at boot time) and NFS client was enabled in runlevels 3 and 5.
On my laptop I set up NFS client to start in runlevel 5 when GUI was awailable and then i logged in and Network Manager started and connected to my Wireless network.

I hope this wil give jou a hint in any way.

Thanks for your response

I have tried as you have suggested i.e. switched to Network Manager from the Traditional method and then Turned off run level 3 for NFS client.
Unfortunatley this did not change anything.

Any more idea’s

Cheers

After just switching on NFS daemon (not yet working with NFS shares) the computer stops booting on the moment of checking of hard drives. The only way to boot - in system V mode (pressing F5 in the firs menu) and than everything works fine. But systemd boot is buggy in this case

I am experiencing some of the same symptons. Without starting over, is there a way to not use systemd for boot? I was pretty sure it said GRUB.

I think it should work well in case of mounting NFS shares with mount command (not fstab) in KDE Autostart script.

Add “init=/sbin/sysvinit” to your grub kernel line.

On 11/18/2011 09:36 AM, condic wrote:
>
> I am experiencing some of the same symptons. Without starting over, is
> there a way to not use systemd for boot? I was pretty sure it said
> GRUB.

Both systemv and systemd use GRUB.

The release notes for 12.1 say:

Booting with systemd or sysvinit

By default, openSUSE now boots using systemd. In case of trouble, you can switch
back to the old way using sysvinit by pressing the F5 key on the boot.

If you want to switch to sysvinit permanently, install the sysvinit-init
package. To switch back to systemd, reinstall the systemd-sysvinit package.

How do I do this?

Edit the file /boot/grub/menu.lst and add “init=/sbin/sysvinit” at the kernel line options

Problem is that remote-fs.target in systemd ties to mount nfs shares before rpc daemons has started.
Quick fix - use nfs.service
systemctl disable remote-fs.target
systemctl enable nfs.service

I have done this but i’m continuing to have very slow boot. The strange thing is that on another system i don’t have the same problem.

I have also notice in the logs:

Nov 28 10:48:28 terataki systemd[1]: network.service operation timed out. Terminating.
Nov 28 10:48:28 terataki systemd[1]: Unit network.service entered failed state.

I suspect that this is causing the slow boot, but network is working as soon as the system boots (i’m not using Network Manager).

On 11/28/2011 03:06 AM, elksi wrote:
>
> I have also notice in the logs:
>
>
> Code:
> --------------------
> Nov 28 10:48:28 terataki systemd[1]: network.service operation timed out. Terminating.
> Nov 28 10:48:28 terataki systemd[1]: Unit network.service entered failed state.
> --------------------
>
>
> I suspect that this is causing the slow boot, but network is working as
> soon as the system boots (i’m not using Network Manager).

There is an analysis tool for systemd. Please report the output of


systemd-analyze time

and post the first 10 lines, or so, of


systemd-analyze blame

I too had one system that was taking a long time to boot, and part of the
problem was mounting of NFS volumes. I fixed that by converting those volumes to
use autofs, not fstab, for mounting.

I will report tomorrow (the system is at my office).

I also have one nfs mount through fstab and the problem started after enabling it.

Any hint about autofs?

On 11/28/2011 10:16 AM, elksi wrote:
>
> I will report tomorrow (the system is at my office).
>
> I also have one nfs mount through fstab and the problem started after
> enabling it.
>
> Any hint about autofs?

It took a while to sort through the documentation, but here is a synopsis:

add the following line to /etc/auto.master


/-		auto.nfs

This uses the so-called “direct map”. Create a new file /etc/auto.nfs and add
one line for each volume you are mounting containing the local mount point, any
options in fstab other that “defaults” preceded by a minus sign, and the remote
volume in the “host:/mount_point” format. Two examples are


/netbook		desktop:/video/netbook
/nfs/data	-hard	server:/user/data

Next comment out the mount points in /etc/fstab, and finally add the links to
start the autofs service with


ln -s /etc/init.d/autofs /etc/init.d/rc3.d/S25autofs
ln -s /etc/init.d/autofs /etc/init.d/rc5.d/S25autofs

Those two will start autofs in run levels 3 and 5.

Thanks i will try it.

I have just discovered that i have a similar issue with my home server. It is running 12.1 (upgraded from 11.4) with no nfs mounts but with nfs server. It has a slow boot as well and i’m getting the following:

systemctl status network.service 
network.service - LSB: Configure the localfs depending network interfaces
          Loaded: loaded (/etc/init.d/network)
          Active: failed since Mon, 14 Nov 2011 23:02:29 +0200; 2 weeks and 0 days ago
         Process: 719 ExecStart=/etc/init.d/network start (code=killed, signal=TERM)
          CGroup: name=systemd:/system/network.service

Although network is working.

romantsa:~ # systemd-analyze time
Startup finished in 12836ms (kernel) + 347599ms (userspace) = 360435ms
romantsa:~ # systemd-analyze blame
 35983ms ntp.service
 27093ms yastwc.service
 23801ms webmin.service
 23170ms mysql.service
  8263ms nfsserver.service
  6247ms smb.service
  5044ms storage-after-cryptsetup.service
  4536ms lvm.service
  4432ms squid.service
  2871ms remount-rootfs.service
  2405ms cpufreq.service
  2404ms purge-kernels.service
  2401ms systemd-logind.service
  2327ms nmb.service
  1908ms bootsplash-startup.service
  1864ms systemd-vconsole-setup.service
  1832ms auditd.service
  1788ms sshd.service
  1647ms deluged.service
  1404ms ddclient.service
  1402ms localnet.service
  1341ms yastws.service
  1100ms cycle.service
   975ms pure-ftpd.service
   945ms var-lock.mount
   941ms var-run.mount
   937ms network-remotefs.service
   909ms media.mount
   900ms sys-kernel-debug.mount
   896ms dev-mqueue.mount
   888ms sys-kernel-security.mount
   884ms dev-hugepages.mount
   774ms mcelog.service
   642ms console-kit-daemon.service
   627ms collectd.service
   623ms nscd.service
   599ms deluge-webd.service
   571ms syslog.service
   546ms irq_balancer.service
   540ms systemd-readahead-collect.service
   521ms cifs.service
   511ms systemd-sysctl.service
   489ms systemd-remount-api-vfs.service
   444ms splash.service
   400ms udev.service
   399ms udev-trigger.service
   283ms rpcbind.service
   255ms apache2.service
   246ms dbus.service
   229ms nfs.service
   228ms systemd-tmpfiles-setup.service
   210ms snmpd.service
   155ms splash_early.service
   136ms acpid.service
    79ms console-kit-log-system-start.service
    66ms systemd-user-sessions.service
    57ms srv.mount
    33ms rc-local.service
    33ms bootsplash-quit.service
    25ms fbset.service

It hasn’t been rebooted since the upgrade but i remember that it took a lot time to reboot and i had to take a monitor a keyboard to go to the basement and find out that it was working. So i suspect that again network service had timeout. I will reboot it some time tomorrow a report.

On 11/28/2011 01:06 PM, elksi wrote:
>
> Thanks i will try it.
>
> I have just discovered that i have a similar issue with my home server.
> It is running 12.1 (upgraded from 11.4) with no nfs mounts but with nfs
> server. It has a slow boot as well and i’m getting the following:
>
>
> Code:
> --------------------
> systemctl status network.service
> network.service - LSB: Configure the localfs depending network interfaces
> Loaded: loaded (/etc/init.d/network)
> Active: failed since Mon, 14 Nov 2011 23:02:29 +0200; 2 weeks and 0 days ago
> Process: 719 ExecStart=/etc/init.d/network start (code=killed, signal=TERM)
> CGroup: name=systemd:/system/network.service
> --------------------
>
>
> Although network is working.
>
>
> Code:
> --------------------
> romantsa:~ # systemd-analyze time
> Startup finished in 12836ms (kernel) + 347599ms (userspace) = 360435ms
> romantsa:~ # systemd-analyze blame
> 35983ms ntp.service
> 27093ms yastwc.service
> 23801ms webmin.service
> 23170ms mysql.service
> 8263ms nfsserver.service
> 6247ms smb.service
> 5044ms storage-after-cryptsetup.service
> 4536ms lvm.service
> 4432ms squid.service
> 2871ms remount-rootfs.service
> 2405ms cpufreq.service
> 2404ms purge-kernels.service
> 2401ms systemd-logind.service
> 2327ms nmb.service
> 1908ms bootsplash-startup.service
> 1864ms systemd-vconsole-setup.service
> 1832ms auditd.service
> 1788ms sshd.service
> 1647ms deluged.service
> 1404ms ddclient.service
> 1402ms localnet.service
> 1341ms yastws.service
> 1100ms cycle.service
> 975ms pure-ftpd.service
> 945ms var-lock.mount
> 941ms var-run.mount
> 937ms network-remotefs.service
> 909ms media.mount
> 900ms sys-kernel-debug.mount
> 896ms dev-mqueue.mount
> 888ms sys-kernel-security.mount
> 884ms dev-hugepages.mount
> 774ms mcelog.service
> 642ms console-kit-daemon.service
> 627ms collectd.service
> 623ms nscd.service
> 599ms deluge-webd.service
> 571ms syslog.service
> 546ms irq_balancer.service
> 540ms systemd-readahead-collect.service
> 521ms cifs.service
> 511ms systemd-sysctl.service
> 489ms systemd-remount-api-vfs.service
> 444ms splash.service
> 400ms udev.service
> 399ms udev-trigger.service
> 283ms rpcbind.service
> 255ms apache2.service
> 246ms dbus.service
> 229ms nfs.service
> 228ms systemd-tmpfiles-setup.service
> 210ms snmpd.service
> 155ms splash_early.service
> 136ms acpid.service
> 79ms console-kit-log-system-start.service
> 66ms systemd-user-sessions.service
> 57ms srv.mount
> 33ms rc-local.service
> 33ms bootsplash-quit.service
> 25ms fbset.service
> --------------------
>
>
> It hasn’t been rebooted since the upgrade but i remember that it took a
> lot time to reboot and i had to take a monitor a keyboard to go to the
> basement and find out that it was working. So i suspect that again
> network service had timeout. I will reboot it some time tomorrow a
> report.

Certainly 360 sec to boot is excessive. When I switched to autofs for my NFS
volumes, my time reduced from 100 sec to 40 sec.

Most of your long times involve the network startup. Is there something funky
there? Is mysql also involved with the network too?

Your system waits almost 36 sec to start ntp. Assuming your server only boots to
level 3, what does ‘ls /etc/init.d/rc3.d/*ntp’ yield? Is it being started too
early? I should think that S99ntp would be appropriate.

MySQL is only for localhost, so i don’t think it has to do with the delay.

romantsa:~ # ls /etc/init.d/rc3.d/*ntp
/etc/init.d/rc3.d/K03ntp  /etc/init.d/rc3.d/S09ntp

Should i change it to S99 (how?). And what about K03ntp?

Just to inform, that changing to sysvinit eliminates the problem and the boot time is ok (on both system that i’m experiencing the same issue - network.service failed).

On 11/29/2011 02:06 AM, elksi wrote:
>
> MySQL is only for localhost, so i don’t think it has to do with the
> delay.
>
>
> Code:
> --------------------
> romantsa:~ # ls /etc/init.d/rc3.d/*ntp
> /etc/init.d/rc3.d/K03ntp /etc/init.d/rc3.d/S09ntp
> --------------------
>
>
> Should i change it to S99 (how?). And what about K03ntp?
>
> Just to inform, that changing to sysvinit eliminates the problem and
> the boot time is ok (on both system that i’m experiencing the same issue
> - network.service failed).

mv /etc/init.d/rc3.d/S09ntp /etc/init.d/rc3.d/S99ntp.

All the K** files are for killing the service on shutdown.