Results 1 to 7 of 7

Thread: NFS storage is not mounting during boot

  1. #1
    Join Date
    Nov 2020
    Location
    matrix.org
    Posts
    15

    Default NFS storage is not mounting during boot

    Hello,

    my NFS storage is not mounting in openSuse 15.3 after I start my computer. If I do a manual
    Code:
    sudo mount -a
    all NFS storage are mounted without any problem.

    The output from showmount on my openSuse 15.3 Computer:


    Code:
    iglu:~ # showmount -e mynfsserver
    Export list for mynfsserver:
    /mnt                         *
    /srv/nfs/USBDisk/NFSFreigabe *
    /srv/nfs/USBDisk/backup      iglu.speedport.ip,tvpi.speedport.ip,eisbaer,pinguin.speedport.ip,wolf.speedport.ip
    
    

    I know it from my other computer(raspbery Pi´s) where I mount the NFS storage too. Here I musst select in the
    Code:
    raspi-config
    Wait for Network at Boot. In openSuse I had activate the following systemd units:

    Code:
    systemctl enable systemd-networkd-wait-online.service
    the other units:

    Code:
    tux@iglu:~> systemctl list-unit-files --no-pager |grep -i wait
    chrony-wait.service                                                       disabled        disabled     
    NetworkManager-wait-online.service                                        enabled         disabled     
    plymouth-quit-wait.service                                                static          -            
    systemd-networkd-wait-online.service                                      enabled         disabled     
    systemd-time-wait-sync.service                                            disabled        disabled
    What can I do in openSuse to mount it during boot?


    Many Thanks for helping me
    ronni

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,500

    Default Re: NFS storage is not mounting during boot

    More people have found this. Some found in their logings that it is mounted on boot, but immediately unmounted again.

    Many have found that using automount using systemd (even easier to use then the classic way of automount using /etc/auto.master) helps here. It will mount when needed (when some process accesses a file in there) and unmount after a certain amount of time of no usage. This is an example of the options used in /etc/fstab for such an entry:
    Code:
    noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x-systemd.idle-timeout=5min
    Remarks:
    • the _netdev is not really needed, it is forced already by the other options;
    • x-systemd.idle-timeout=5min, choose you own time-out (10 mins does also look not bad to me);
    • x-systemd.mount-timeout=10 is the time-out at mounting before an error is thrown, normally mounting is with the second.
    Henk van Velden

  3. #3
    Join Date
    Sep 2012
    Posts
    6,986

    Default Re: NFS storage is not mounting during boot

    Quote Originally Posted by ronnih View Post
    Code:
    systemctl enable systemd-networkd-wait-online.service
    Are you using systemd-networkd to manage your network configuration?
    What can I do in openSuse to mount it during boot?
    It depends on what network management program you are using. And it is openSUSE, not openSuse.

  4. #4
    Join Date
    Nov 2020
    Location
    matrix.org
    Posts
    15

    Default Re: NFS storage is not mounting during boot

    Hello together,

    thank you for the fast answers.

    @arvidjaar

    yes I use the
    systemd-networkd.service:


    Code:
    iglu:~ # systemctl status systemd-networkd.service  
     systemd-networkd.service - Network Service
         Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; disabled; vendor preset: disabled)
         Active: active (running) since Sun 2021-09-26 08:47:46 CEST; 11h ago
           Docs: man:systemd-networkd.service(8)
       Main PID: 430 (systemd-network)
         Status: "Processing requests..."
          Tasks: 1 (limit: 4915)
         CGroup: /system.slice/systemd-networkd.service
                 └─430 /usr/lib/systemd/systemd-networkd
    
    Sep 26 08:47:45 iglu systemd[1]: Starting Network Service...
    Sep 26 08:47:46 iglu systemd-networkd[430]: Enumeration completed
    Sep 26 08:47:46 iglu systemd[1]: Started Network Service.
    Sep 26 08:47:55 iglu systemd-networkd[430]: eth0: Link UP
    Sep 26 08:48:09 iglu systemd-networkd[430]: eth0: Gained carrier
    Sep 26 08:48:11 iglu systemd-networkd[430]: eth0: Gained IPv6LL
    
    
    In Yast he shows network-Manager
    Okay openSUSE, you are right


    @hcvv

    I see in the journal that he try to mount it during boot and the error message is here:

    Code:
    mount.nfs: Network is unreachable
    


    I will try you fstab options and I enable the autofs.service

    regards
    ronnih


  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,500

    Default Re: NFS storage is not mounting during boot

    Quote Originally Posted by ronnih View Post
    ..... I enable the autofs.service
    I doubt you need that. On the system where I use it:
    Code:
    beneden:~ # systemctl status autofs
    ● autofs.service - Automounts filesystems on demand
       Loaded: loaded (/usr/lib/systemd/system/autofs.service; disabled; vendor preset: disabled)
       Active: inactive (dead)
         Docs: man:automount(8)
               man:autofs(5)
    beneden:~ #
    The full /etc/fstab entry is
    Code:
    beneden:~ # grep nfs /etc/fstab
    boven.henm.xs4all.nl:/home/wij             /home/wij  nfs   noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x-systemd.idle-timeout=5min          0  0
    beneden:~ #
    and that was all I needed.
    Henk van Velden

  6. #6
    Join Date
    Sep 2012
    Posts
    6,986

    Default Re: NFS storage is not mounting during boot

    Quote Originally Posted by ronnih View Post
    yes I use the systemd-networkd.service
    Really? Did you actually configure it to do anything? You never mentioned it.
    In Yast he shows network-Manager
    Which means you now have two programs that manage network.

    systemd-networkd-wait-online waits for known interfaces. You did not say anything about having configured anything for systemd-networkd, so the obvious conclusion - there are no interfaces to wait for.

    NetworkManager-wait-online waits for nm-online to return success. Whether your NFS server is also available when this happens we do not know. Nor do we even know whether you configured system or user connections in NetworkManager.

    Show full output of "journalctl -b" after boot before you mount anything. This may provide some hint what happens.

  7. #7
    Join Date
    Nov 2020
    Location
    matrix.org
    Posts
    15

    Default Re: NFS storage is not mounting during boot

    Hi,

    short feedback, at the moment I had restart my computer 2 times. And my NFS storage was mounted at boot. The only think what I had changed was:

    systemctl enable autofs.service

    My fstab looks:


    Code:
    
    ...
    ....
    mynfsserver:/srv/nfs/USBDisk/backup               /media/backup           nfs    rw                            0  0
    mynfsserver:/srv/nfs/USBDisk/NFSFreigabe          /home/pi/NFSFreigabe    nfs    rw                            0  0
    
    

    I will give further feedback if I become trouble with this setup.

    Regards
    ronnih

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •