Little T in the Cog apple

Archive for September 2012

<3 autofs

2012-09-07

Seeing as OS X Snow Leopard went EOL a few months ago I finally upgraded my Mac Mini entertainment machine (in other words, the box plugged into my TV) to Lion (which incidentally is the end of the line for that box as it can't run Mountain Lion). One of the big changes in Lion was the dropping of Samba for the in house CIFs client/server SMBX, an Apple developed version of the CIFS2 protocol. This is fine on modern CIFS servers, but has some issues on older Samba/Windows servers such as the NAS I'm using for my media content for streaming to my TV.

The Internet is filled with tales of people getting "permission denied" on network shares, usually on NAS appliances that use the Samba stack. When using the command line you can browse the shares, open files etc but when using the Finder you cannot access the content of folders sitting in the root share. The fix seems to be to update the firmware on the NAS in question, but my one is now EOL (the story of my life) and so won't see any more updates.

The solution? Autofs, which has been built into OS X for many years now. I first encountered autofs when I sat my RHCE course/exam a few years ago, and it turns out that OS X uses it too. So instead of using the new CIFS protocol which doesn't work for me in the Finder I use autofs to auto mount the NAS over NFS as needed.

If you haven't used autofs before then this is a good guide on how to configure it for OS X - just make sure that your NFS server (be it a NAS or a Linux host) has the "insecure" option in the exports file (e.g. "/mnt/ide1/public 192.168.3.0/225.255.255.0(rw,no_root_squash,insecure,async)" in /etc/exports).

To be honest I'm not sure why I didn't do this earlier, now all I have to do is turn on the Mac Mini connected to the TV and I can start watching any media stored on the NAS, whereas before I had to always mount the NAS over CIFS first, then pick up the apple remote and start watching.

I <3 autofs!