File Server SMB & NFS - fstab entry for permanent mount

I have searched the existing open and closed issues.

  • DietPi version
    G_DIETPI_VERSION_CORE=9
    G_DIETPI_VERSION_SUB=7
    G_DIETPI_VERSION_RC=1
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’

  • Distro version
    bookworm 0

  • Kernel version
    Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture
    arm64

  • SBC model
    RPi 3 Model B+ (aarch64)

  • Power supply used
    5V 3A

  • SD card used
    SanDisk

  • Software title
    Samba & NFS-Server

  • Was the software title installed freshly or updated/migrated?
    Both tested
    Can this issue be replicated on a fresh installation of DietPi?
    Yes

Steps to reproduce / Problem Description
On my PopOS! clients (Ubuntu 22.04) i just can’t figure out what correct lines to add into fstab.
Whatever i have tested does not give me proper access rights after a client reboot or a “sudo mount -a”.
Both Samba & NFS share are unmodified from the standard out-of-the-box configuration which means i did not mess up the orginal smb.conf. Acessing (mounting) these shares in the PopOS! Gnome Files Application is fine and OK.
The only modification done was to add two new users via webmin and add these into the “users” group plus assigning a smbpasswd for each of them.

can you share the /etc/fstab entries you have done on your client system?

//192.168.188.91/dietpi /home/xyz/dietpi cifs defaults,auto,nofail,user,credentials=/home/xyz/.smbcredentials 0 0

and for NFS?

192.168.188.91:/mnt/4e55aed2-8616-418f-a673-5ba0ecffd9d1/dietpi_userdata /home/xyz/dietpi_nfs nfs defaults 0 0

For NFS I am using this on the client side:
10.0.2.5:/mnt/export/magiatiko /mnt/backup nfs noauto,x-systemd.automount

@trendy Thx. for your input. Unfortunately that didn’t solve the problem here.

With this option, a file system is not mounted directly when booting. The share is not mounted until the first access attempt. This means that it is only mounted when you or a process wants to access the file system. This is actually a useful option to prevent the system from getting stuck during boot. We also use it in our Drive Manager.

1 Like

Use drive-manager to mount hard drives. Do not hand modify fstab. The drives mounted through drive-manager will auto-mount on reboot.

@metaprax as you can see on the initial post, OP is trying to mount shares on Ubuntu. There you don’t have DietPi commands. Therefore he can’t use drive manager.

Sorry I guess I was confused by the original post stating he was running Linux DietPi 6.1.21-v8+ and I thought he was hand modifying fstab on his RPi and seeking info about mounting hard drives on DietPi on the DietPi Forum.
I did not realize he was asking about Ubuntu. My Ubuntu knowledge has been deprecated. Debian/XFCE and vanilla DietPi user :wink:

Thats not a problem if you know what you are doing. If you do so, just stay away from drive manager :wink: