Question about autofs setup

I’m fairly certain I did the steps correctly but I’m a little confused about the step you add your shares.

/mnt/<server1>/<share1> -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://<IP of server1>/<share1>/
/mnt/<server2>/<share2> -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://<IP of server2>/<share2>

IP of server is obviously my Mac. Since my content is on an external the path starts with Volumes/… Does that go in both spots that say share 1? Is server 1 the name smb uses or is it something else?

Thanks!

Hi,

It looks like you’re still editing your post.
Once this is done, let us know so we can check the fstab lines

Sam

I was trying to get the quote correct on mobile. Done now. Thanks!

For this example, this part:

 /mnt/<server1>/<share1>

is where the share will mount on OSMC, so the name is entirely up to you. It could be

/mnt/NameOfServer/Share

or

/mnt/Share

it’s up to you how to handle that.

It’s the last part:

://<IP of server1>/<share1>/

that controls where the mount is coming from. The name of the mount point and mounted share can be completely different, but it’s a good idea for your sanity to keep them similar. :smiley:

Additional info I just thought of to share (pun intended)…

I personally do not include the name of the server in the mount point. I have 4 drives connected to a NAS (+ the NAS drive) and mount them as the name of the share, so something like:

/mnt/Drive1
/mnt/Drive2

etc. Now say in the future that I get a new NAS and keep the old NAS, but want to move Drive2 to the new NAS. All I have to do is change the :// part of the mount. To Kodi, the movies will still be on /mnt/Drive2. It won’t know that I moved them to a new server, so the movies will still play. If I used something like /mnt/NAS1/Drive2 then moved the drive to NAS2 and changed the mount point, it would be /mnt/NAS2/Drive2. Now Kodi will not be able to play them.

Hopefully this makes sense!

Thanks, for all that info. I’m able to find the folder in OSMC but it’s empty. When I add it to my library nothing scans. I must be missing something simple. Maybe I’m not pointing it correctly to the files.

Can you share exactly what’s in the autofs file and the results of mount? From SSH:

cat /etc/<name of the autofs map file> | paste-log
mount | paste-log

and share the URLs.

https://paste.osmc.tv/zuhedaneme

And the content of /etc/auto.smb.shares?

/mnt/4KMovies -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.1.215/Volumes/Plex1/Plex/4K

I’ve tried so many variations of this file lol but this is my most recent.

I’m guessing that it’s a SMB version mismatch. Have you tried using vers=2.0 or vers=3.0 or even vers=1.0 in the map file?

If non of the vers= variations work, please send full logs:

 grab-logs -A

BTW, after you make a change to the map file, you must restart autofs:

sudo systemctl restart autofs

for the changes to take affect.

I haven’t tried changing the version. Where would I add that? I do restart after every change.

If that doesn’t work I’ll grab the logs. I used to use SMBUp for Mac but for some reason it stopped working so I ended up down this rabbit hole.

To change the version:

/mnt/4KMovies -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=x.0 ://192.168.1.215/Volumes/Plex1/Plex/4K

replace x.0 with 1.0, 2.0 or 3.0

Have you tried as suggested in the tutorial to put autofs in debug mode?

sudo systemctl stop autofs
sudo automount -f -v -d

That will probably show why it’s not mounting.

Maybe just first check if SMB is working properly on the MAC.

Install smbclient sudo apt-get install smbclient and run smbclient -L 192.168.1.215 -U <your user>

1 Like

It’s actually a new computer and I managed to get SMB working earlier today with OSMC but everyone said autofs was superior for UHD. I’ll try it though.

But earlier you said:

So it’s a little confusing. Have you ever use SMB from the new MAC? And how did you get SMB working earlier? fstab?

Not this Mac. My old external hard drives crashed and I lost all my bd’s so I waited a while before starting the process of re-ripping everything via makemkv. Once I got the new computer I figured I’d get everything setup again. But SMBUp doesn’t work with the newer OS.

Edit: Tried v1, v2, v3 I’ll pull logs.

handle_packet_missing_direct: token 448, name /mnt/4KMovies, request pid 4291

attempting to mount entry /mnt/4KMovies

lookup_mount: lookup(file): looking up /mnt/4KMovies

lookup_mount: lookup(file): /mnt/4KMovies -> -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=1.0 ://192.168.1.215/Volumes/Plex1/Plex/4K

parse_mount: parse(sun): expanded entry: -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=1.0 ://192.168.1.215/Volumes/Plex1/Plex/4K

parse_mount: parse(sun): gathered options: fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=1.0

parse_mount: parse(sun): dequote("://192.168.1.215/Volumes/Plex1/Plex/4K") -> ://192.168.1.215/Volumes/Plex1/Plex/4K

parse_mount: parse(sun): core of entry: options=fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=1.0, loc=://192.168.1.215/Volumes/Plex1/Plex/4K

sun_mount: parse(sun): mounting root /mnt/4KMovies, mountpoint /mnt/4KMovies, what //192.168.1.215/Volumes/Plex1/Plex/4K, fstype cifs, options rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=1.0

do_mount: //192.168.1.215/Volumes/Plex1/Plex/4K /mnt/4KMovies type cifs options rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=1.0 using module generic

mount_mount: mount(generic): calling mkdir_path /mnt/4KMovies

mount_mount: mount(generic): calling mount -t cifs -o rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc,vers=1.0 //192.168.1.215/Volumes/Plex1/Plex/4K /mnt/4KMovies

mount error(5): Input/output error

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

mount(generic): failed to mount //192.168.1.215/Volumes/Plex1/Plex/4K (type cifs) on /mnt/4KMovies

dev_ioctl_send_fail: token = 448

failed to mount /mnt/4KMovies

Is what it says in debug mode.

Do as @fzinken suggested and test with smbclient.

When I go into terminal I get apt-get command not found. It first asks for my password then spits out that error.

Edit: Apparently apt-get doesn’t work for Mac without downloading Xcode or some other program. Reading the article now.

Try:

sudo apt install smbclient

instead.

You need to install smbclient on the OSMC system, not the MAC! When we give you command line stuff to try, it’s always to try from OSMC.