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.

    Linux Mint (Edge) EndeavourOS Arch Linux

    OMV7 NAS, bond0 LACP, Fractal Design Define R5 Case, Kodi "Omega", FreeBSD 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!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 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!