[Guide] Auto-Mounting Filesystems in Linux

Can you give a clear example of what exactly /user from the below line should look like?

tv -fstype=nfs,ro,timeo=100,noatime 192.168.1.10:/mnt/user/tv

I am fairly new to this. I am not sure why mine is not working and want to make sure I understand what goes there. Thanks

I figured it out. Thanks

First, thank you for such thorough documentation on this new method. Works like a charm for me every time. There’s one step I’m wondering if you could add, but I don’t know how to do it myself. How can I delay Docker starting on boot until autofs has finished mounting the network share? Some of my containers start before it finishes, and they have to be restarted manually (even with restart-always enabled).

just to be clear, we create the nfs directory but the subdirectories are automatically created, right?

I’m a nubee. I had to reinstall Ubuntu as my previous system was acting up. After installing a fresh copy I followed the steps here to automount files. I have all my media on Unraid server and am using Ubuntu to transcode as jdm suggested. For some reason the nfs folders mounted but when I access the folders on ubuntu it says “location cannot be displayed. ‘tv’ could not be found.” I believe my permission in Unraid are ok as I didn’t change anything there. I did rename user name on ubuntu, but I matched it a user on unraid as well. Any help would be greatly appreciated.

Please share your AutoFS config.

Is this what you mean?

There’s no reason to hide local IPs. Share the entire screenshot so that we can make sure formatting is correct.

Thank you so much

TL;DR : your paths are wrong.

your paths are missing the preceding / after the :

so
:/mnt/user/tv
:/mnt/user/movies
:/mnt/user/iTunes
etc

From Step 1

Thank you! Two eyes are better than one.

Here is my new config. However I’m still getting the following message on Ubuntu.


Have you rebooted?

Yes I have. Both unraid and Ubuntu.

Thank you so much for all your help thus far. The only thing I can think of that I did not do was the mkdir command. Is that necessary? If so, how to do it? I see that there is already a folder labeled “nfs” with the tv,movies, etc as subfolders. Is this sufficient. I wonder if the problem is Ubuntu 22.04.

Why would you skip something in the directions?

Can’t mount a remote to a local directory that doesn’t exist

So this is where I’m confused.

If I’m using the 1/14/21 update. What directories do make before proceeding? Also, I don’t need to do the fstab setup correct?

Thanks for your patience. Greatly appreciate it.

Thank you all! I figured it out. My path for autofs was missing “media” - so it should be /mnt/user/media/tv

Just thought I would share.

Thanks for the write-up. Just configured this tonight after finally deploying pfsense and an aruba switch. The IPs changed, so was a good oppurtunity.

1 Like

Just a note, if you’re trying to mount a samba share as read/write you’d want to use a command like this instead (and you may want to use the iocharset command otherwise when mounting an smb share, the uid command shouldn’t hurt anything either):

tv -fstype=cifs,rw,credentials=/root/.smbpassword,iocharset=utf8,uid=1000 ://192.168.1.10/tv

You’ll want to modify that uid if it’s different than the userid that you’re running services under. You can get that with the following command:

id -u <username>

Otherwise the root user will own the directory and to perform any writes, renames, etc you would need to use sudo or the root account. The iocharset command isn’t strictly necessary, but it defaults to an iso8859-1 encoding which is a legacy standard from the 1980’s that only supports 256 characters. Modern filesystems should support utf-8.

Thanks for the guide, I’ve converted my shares over to smb shares following most of this guide. I just ran into that frustrating hiccup so I wanted to get the information out there after trying to figure out my issue after a few hours of googling and testing.

1 Like