Mount NFS folder on Linux boot

  • I assume this is a basic setting, but I can't find it...


    I mounted a folder successfully on my Linux (Mint) machine using:

    Code
    sudo mount -t nfs 192.168.1.10:/NASLG2-2TB /home/erik/NASLG2-2TB/

    But every time I reboot this Linux machine, the NFS mounted folder is gone... Any idea how I could get it mounted automatically on boot?


    Thanks for your help!

  • There is couple of thingsyou need to do:

    1. create directory "/media/nfs/naslg2-2tb" (sudo mkdir -p /media/nfs/naslg2-2tb) on your Mint box and make sure you have permision to it

    2. in /etc directory edit fstab file and add line: "192.168.1.10:/export/NASLG2-2TB /media/nfs/naslg2-2tb nfs rw,auto,hard,nofail,intr 0 0"

    In Linux you should avoid capitol letters

    Reboot. You should have :"naslg2-2tb" visible in your file manager.

    Arch Linux, Linux Mint 22, FreeBSD KDE Plasma6

    OMV7 NAS 10GB Fiber, Fractal Design Define R5 Case, Kodi "Omega", pfSense Plus firewall/router

  • Edit your /etc/fstab file on the Linux machine and include the line below. Adjust the options list for your use case if needed.


    Code
    192.168.1.10:/NASLG2-2TB /home/erik/NASLG2-2TB/ nfs defaults,hard,intr,auto,async,nofail,bg 0 0

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.


  • ErikDB

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!