Missing NFS shares slowing down boot ?

I am wondering why my desktop is taking 5 minutes or more to boot up. There are a couple of (i.e. 4) network shares, 3 of which are not always available at boot-up, so I’m guessing there must be a NFS share time-out somewhere that is set rather high. Does anyone know where I can go to tweak it? Or are there any other suggestions where the time is going?

I am running Opensuse 12.3 (64 bit) with Gnome.

Cheers
hn

On 25/07/13 22:06, hnimmo wrote:
>
> I am wondering why my desktop is taking 5 minutes or more to boot up.
> There are a couple of (i.e. 4) network shares, 3 of which are not always
> available at boot-up, so I’m guessing there must be a NFS share time-out
> somewhere that is set rather high. Does anyone know where I can go to
> tweak it? Or are there any other suggestions where the time is going?
>
> I am running Opensuse 12.3 (64 bit) with Gnome.
>
> Cheers
> hn
>
>

Try to see what is a timehog by:


systemd-analyze blame


Erik Jakobsen
Opensuse 12.3 64bit
Linux linux-z96b.site 3.7.10-1.11-desktop
KDE Version 4.10.2 “release 1”

/etc/fstab has the mount instructions

Perhaps try adding the _netdev mount option in fstab

man mount

_netdevThe filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).

Below are two options that control NFS. If everything is set to defaults then it would take 3 minutes for each mount to fail.

timeo=n
The time in deciseconds (tenths of a second) the NFS client waits for a response before it retries an NFS request.

For NFS over TCP the default timeo value is 600 (60 seconds). The NFS client performs linear backoff: After each retransmission the timeout is increased by timeo up to the maximum of 600 seconds.

However, for NFS over UDP, the client uses an adaptive algorithm to estimate an appropriate timeout value for frequently used request types (such as READ and WRITE requests), but uses the timeo setting for infrequently used request types (such as FSINFO requests). If the timeo option is not specified, infrequently used request types are retried after 1.1 seconds. After each retransmission, the NFS client doubles the timeout for that request, up to a maximum timeout length of 60 seconds.

retrans=n
The number of times the NFS client retries a request before it attempts further recovery action. If the retrans option is not specified, the NFS client tries each request three times.

The NFS client generates a “server not responding” message after retrans retries, then attempts further recovery (depending on whether the hard mount option is in effect).

hnimmo wrote:
> I am wondering why my desktop is taking 5 minutes or more to boot up.
> There are a couple of (i.e. 4) network shares, 3 of which are not always
> available at boot-up, so I’m guessing there must be a NFS share time-out
> somewhere that is set rather high. Does anyone know where I can go to
> tweak it? Or are there any other suggestions where the time is going?

There are various useful suggestions in the thread. What I haven’t seen
though is that if you have an NFS mount that isn’t always available, you
should background the mount (i.e. use the bg option) to avoid the
symptoms you are seeing.

BTW, ‘share’ is Windo*ze terminology, not NFS.

Or use automount.

Yes, lots of good hints in this thread!
But just to take issue with the above claim a little…:wink:

One the one hand the NFS server uses the term ‘export’ for the directories to be exported, but the NFS client GUI calls them ‘NFS shares’.
Perhaps client and server functions should be matched in future.:\

hn

This is what systemd-analyze returns

harvey@linux-izj7:~> systemd-analyze blame
262326ms nfs.service
 89997ms home-Public-aleph.mount
 24754ms network.service
  3412ms vboxweb-service.service
  1892ms nfsserver.service
  1828ms systemd-vconsole-setup.service
  1592ms systemd-udev-root-symlink.service
  1583ms cycle.service
  1353ms dev-hugepages.mount
  1256ms dev-mqueue.mount
  1247ms systemd-remount-fs.service
  1210ms vboxdrv.service
   969ms xdm.service
   658ms home.mount
   625ms accounts-daemon.service
   482ms systemd-sysctl.service
   379ms ntp.service
   306ms polkit.service
   296ms systemd-modules-load.service
   189ms avahi-daemon.service
   171ms systemd-logind.service
   137ms systemd-readahead-replay.service
   132ms systemd-readahead-collect.service
    75ms udisks2.service
    67ms fbset.service
    64ms smb.service
    64ms systemd-tmpfiles-setup.service
    62ms rsyslog.service
    60ms bluetooth.service
    59ms nmb.service
    53ms systemd-udev-trigger.service
    48ms upower.service
    44ms rtkit-daemon.service
    41ms systemd-user-sessions.service
    26ms sys-kernel-debug.mount
    24ms var-lock.mount
    18ms var-run.mount
    15ms systemd-udevd.service
    15ms rc-local.service

Interesting…but now what? Does this confirm my suspicion that the missing NFS shares are timing out?

Cheers
hn

This is what I suspect causes the long boot-up time. But which Gnome tool, if any, has access to these parameters?
(I prefer to use the Gnome GUI. With Linux there are many ways to skin the cat, but there is a limit to what I can remember! :()

Greeetings

HN

Yes, I would say so.
nfs.service takes 262 seconds (4 minutes 22 seconds) to run.

And “home-Public-aleph.mount” takes another 90 seconds. What kind of drive is that?
(since it is nearly exactly 90s this really smells like a timeout)

Maybe “systemctl status nfs.service” and “systemctl status home-Public-aleph.mount” would give more information.

As mentioned by others make adjustments in the /etc/fstbl file or it can be adjusted vi Yast in the boot sections

Sorry if I am a bit slow on the uptake: Above, I presume you mean fstab. I cannot find fstbl in /etc. What exactly do you mean by the ‘Yast boot sections’?

I have the /etc/sysconfig editor in which there are the system boot parameters, but where could I set _netdev or timeo or retrans in that section?

Thanks for your help

Cheers

HN

Right stupid typo it is fstab file you must edit as root

Partitioner allow you to set the boot mount options in a more graphic environment. But it just modifies fstab

Looking at the options exposed there it does not look like is give the options you need for the nfs partitions. So best to so best to just manually edit the file.

You can get the mount options from command line man mount

hnimmo wrote:
> djh-novell;2574570 Wrote:
>> BTW, ‘share’ is Windo*ze terminology, not NFS.
>
> Yes, lots of good hints in this thread!
> But just to take issue with the above claim a little…:wink:
>
> One the one hand the NFS server uses the term ‘export’ for the
> directories to be exported, but the NFS client GUI calls them ‘NFS
> shares’.
> Perhaps client and server functions should be matched in future.:\

Well just to take issue with this issue :slight_smile:

There is no such thing as “the NFS client GUI”. NFS is not GUI-based.
Perhaps you are thinking of some tool provided by one of the desktops or
a system enhancement? And what terminology they use is their problem :stuck_out_tongue:

Well, yes, I suppose I should have been more precise. Of course, I meant that the NFS GUIs provided by Gnome desktop under Opensuse are using those terms. So it would be the NFS client and server GUIs provided by Gnome that might have to be matched up, one way or the other.

Sorry for that. In these forums, I forget that I tend to make assumptions about what others are imagining when I write my contributions. It was obviously my mistake to assume that everyone would know that I am running Opensuse 12.3 (64 bit) with Gnome.

Cheers
Harvey

On 2013-07-29 12:10, Dave Howorth wrote:
> hnimmo wrote:

> Well just to take issue with this issue :slight_smile:
>
> There is no such thing as “the NFS client GUI”. NFS is not GUI-based.
> Perhaps you are thinking of some tool provided by one of the desktops or
> a system enhancement? And what terminology they use is their problem :stuck_out_tongue:

YaST has both an NFS server and client GUIs, could be that.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-07-27 22:06, hnimmo wrote:

> I have the /etc/sysconfig editor in which there are the system boot
> parameters, but where could I set _netdev or timeo or retrans in that
> section?

Edit fstab, add _netdev, like this:


localhost:/data/storage_c/   /mnt/nfs/tmp  nfs  defaults,_netdev   0 0

However, if the other side is not ready, you will have a long delay. In
that case, you need “noauto”, and mount the “share” manually later. Or
perhaps use background, which I’m not familiar with, but I understand it
is the keyword ‘bg’.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Yes, thanks! It was the noauto option that solved the problem. (Will also try the bg option when I understand it better, though!)
:slight_smile:

cheers
hn

On 2013-07-29 19:56, hnimmo wrote:

> Yes, thanks! It was the noauto option that solved the problem. (Will
> also try the bg option when I understand it better, though!)
> :slight_smile:

I understand the operation returns and boot continues, but in the
background it keeps trying to mount. I have not used it myself, so I
don’t know if it works well or if there are caveats.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)