You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.9 KiB

Mounting Network Shares in Linux

possible ways to mount stuff - fstab, autofs, systemd, docker volumes if its for docker

possible types of shares

  • smb/samba/cifs - the most common share, support on all OS
  • nfs - mostly used between linux machines, bit better performance
  • iSCSI - the share is mounted as a block device as if it was really a disk, great performance for small files

More on setup of these shares is in TrueNAS Scale guide.


Arch wiki on samba systemd mount

  • you will create two files in /etc/systemd/system
  • one will have extension .mount the other .automount
  • the name will be the same for both and it MUST correspond with the planned mount path. Slashes / being replaced by dashes -.
    So if the share should be at /mnt/mirror the files are named mnt-mirror.mount and mnt-mirror.automount
  • copy paste the bellow content, edit as you see fit, changing description, ip address and path, user and password,..
  • linux command id will show your current user uid and gid
  • after ther changes execute command sudo systemctl enable mnt-mirror.automount This will setup mounting that does not fail on boot if there are network issues, and really mounts the target only on request


Description=3TB truenas mirror mount




Description=3TB truenas mirror mount



Useful commants

smbclient -L - list shares mounted from the ip systemctl list-units -t mount --all