Author Topic: Mac keeps disconnecting from NAS  (Read 10969 times)

Mac keeps disconnecting from NAS
« on: 03 February, 2013, 08:22:29 pm »
I've referred to this issue during the course of another thread but I can't locate the posts - probably better as a separate thread anyway.

iOmega networked drive, wireless connection to MacBook Air. OS X 10.8.2.

There is any amount of stuff about this issue on the web, but as far as I can see there are no clear solutions or methodical ways to identify and solve the problem.

The NAS is working fine, no problems with permissions etc. My iTunes library is on the NAS. Everything seems to be in order - my Sonos can access the music on the NAS. But every few minutes, if the music is not actively being accessed on the NAS, it disappears from Finder and I have to reconnect. Is there a way of getting to stay connected?

ian

Re: Mac keeps disconnecting from NAS
« Reply #1 on: 04 February, 2013, 10:16:57 am »
What do you mean by disappears from the Finder - the entire server or does the iTunes give you the cannot find/save your iTunes library error?

Re: Mac keeps disconnecting from NAS
« Reply #2 on: 04 February, 2013, 12:43:40 pm »
I wonder if this is related to my problem of wireless access to a NAS drive for time machine dropping and creating faulty backups?

Wired network is my work around for that, but a real solution would be good - remembering to use wires isn't an every day occurrence. (This is one of three backup drives, so it could be worse.) Do you get the same effect with a wired connection?

ian

Re: Mac keeps disconnecting from NAS
« Reply #3 on: 04 February, 2013, 02:42:36 pm »
I'd make sure you give your NAS a static IP and use that when mounting it, rather than the netBIOS name. I find the machine names seem to come and go, following some scheme that I can't fathom.

Re: Mac keeps disconnecting from NAS
« Reply #4 on: 04 February, 2013, 06:27:56 pm »
What do you mean by disappears from the Finder - the entire server or does the iTunes give you the cannot find/save your iTunes library error?

Hi Ian

When I open iTunes, it gives the cannot find library error. Initially I blamed this issue on iTunes but I now realise it occurs because the NAS has not been found - by which I mean, when I look in Finder it is not present.

However, finder does list the Time Machine directory, which is on the same drive. It's not connected - the "connect as" dialogue is present - but as Time Machine's operation does not seem to depend on me logging in, I leave it that way.
But Finder does not list the drive itself, on which all my folders live.
So I have only:
NASname - Time Machine
Whereas I should be seeing:
NASname
NASname - Time Machine

So, the only way I seem to be able to fix this is to restart the NAS. Then it appears in Finder. Then, if I open iTunes, I need to point it to the NAS again.
However, if nothing is accessing the drive (iTunes, or the NAS management software) then after a short period the NAS disappears from Finder.

I'd make sure you give your NAS a static IP and use that when mounting it, rather than the netBIOS name. I find the machine names seem to come and go, following some scheme that I can't fathom.

In Netwrok settings on the NAS, it has "automatically configure network settings" ticked. Do you mean that I should untick that and enter specified values?

ian

Re: Mac keeps disconnecting from NAS
« Reply #5 on: 04 February, 2013, 07:52:47 pm »
I can't say I know why, but my NAS comes and goes from the Finder, which sounds similar (it's gone at the moment, it wanders in and out, like my cats). I've never really investigated it but it seems to be something to do with the location services and how the Mac recognises the machine name. There's a fair chance something non-obvious isn't configured. I think Macs use Bonjour by preference to recognise machines, and the NAS probably doesn't talk that, so it falls back on netBIOS or somesuch. It's voodoo I tell you.

Anyway, not being familiar with your NAS, I'd click the option and set an IP address manually. This will need to be something used on your private LAN. For ease, try something toward the end of the range, it's unlikely to be ever used by anything picking up an address via DHCP (if you want to be thorough, you can exclude addresses or a range from DHCP, there's usually an option in your router config).

Once you have a static IP address, manually connect using Cmd-K

smb://your.IP.address.here

and see if the drive stays mounted. It should appear in finder shared section with the IP address as its name. You have an entry for the both the machine and the manual mount. Your Mac shouldn't care which one you use, they resolve to the same place.

Re: Mac keeps disconnecting from NAS
« Reply #6 on: 04 February, 2013, 10:32:01 pm »
Can you clarify the following steps? I take it the idea is to set an IP address on the router, and use Sharing in Prefs on the Mac to connect to it.

set an IP address manually. This will need to be something used on your private LAN

smb://your.IP.address.here

On the subject of SMB, in Prefs / Sharing, I have File Sharing ticked, but am I right that this only affects my Public folder? Still in Sharing, in Options I have share files and folders using SMB ticked. But in the list of accounts, there is no tick in the (only) account present, mine. Is that correct?

ian

Re: Mac keeps disconnecting from NAS
« Reply #7 on: 05 February, 2013, 10:20:44 am »
No, you need to set the IP on your NAS, not the router. The NAS is effectively a small independent computer and by default (usually) will get a dynamically assigned IP address via DHCP (the same process as any other computer on your LAN). Those addresses are handed out by your router when asked by a device on the network. If a machine doesn't ask, it doesn't get a dynamically assigned address.

How you do this will vary on your NAS – you may have installed a configuration utility or it may require you to access it via your browser. Under network settings (or similar) there will be an option to use DHCP or set a static IP. Choose the latter. Take a note of your current LAN addresses (it'll tell you your current IP address in system preferences > network - typically those will be 192.168.x.x or 10.x.x.x, this is the range your static IP will need to fall under).

In the static IP configuration you'll have a couple of boxes to fill out, something like the below. I'll assume your range is 192.169.1.n as that seems the most popular for default configs these days, but bear in mind you may be using something else, so adjust as appropriate.

IP address: 192.168.1.254 (set this towards the end of the range to avoid conflicts)
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1 (this should be the IP address of your router)

That's it. You should then be able to access the NAS directly by the IP address you have given it.

The sharing settings in your Mac's preferences apply to your Mac, not other devices. Basically what other machines can see and access on your computer, not vice versa.

Woofage

  • Tofu-eating Wokerati
  • Ain't no hooves on my bike.
Re: Mac keeps disconnecting from NAS
« Reply #8 on: 05 February, 2013, 11:39:59 am »
No, you need to set the IP on your NAS, not the router.

Unless the router offers fixed address assignment. This may be easier for the OP.
Pen Pusher

Re: Mac keeps disconnecting from NAS
« Reply #9 on: 05 February, 2013, 12:18:20 pm »
You should then be able to access the NAS directly by the IP address you have given it.

At present, even if the NAS is not shown in Finder, I can access it "manually" via the drive management app or via a bookmark.

Will setting a static IP address as above allow the NAS to appear automatically in Finder without such intervention?

ian

Re: Mac keeps disconnecting from NAS
« Reply #10 on: 05 February, 2013, 03:41:44 pm »
You should then be able to access the NAS directly by the IP address you have given it.

At present, even if the NAS is not shown in Finder, I can access it "manually" via the drive management app or via a bookmark.

Will setting a static IP address as above allow the NAS to appear automatically in Finder without such intervention?

I'm not sure what you mean by 'bookmark'?

No, the mechanism that makes the NAS appear in the Finder is related to the name resolution. Apple uses Bonjour, other devices, other methods (periodically, your network takes the register and any computer that shouts out its name gets added to the list). Using a static IP means you can skip name resolution and go direct. It's mostly diagnostic, if you can mount a drive using a static IP and it stays mounted, then the issue is due to name resolution, if it still unmounts (and if it's completely unmounting you should get a message from the OS to say it's happening), then the problem is elsewhere.

You then have the option of tracking down the problem (and check it's nothing obvious like the drive spinning down after a period of inactivity, my Buffalo NAS has an auto-sleep feature where it goes snoozibyes if it doesn't get a wake-on-lan packet every minute or so) or adding the mount to fstab (if the NAS is always powered), creating a little automator app, or using saving it as a favourite server and using cmd-K. I use the latter, it's two clicks.

ian

Re: Mac keeps disconnecting from NAS
« Reply #11 on: 05 February, 2013, 03:43:13 pm »
No, you need to set the IP on your NAS, not the router.

Unless the router offers fixed address assignment. This may be easier for the OP.

Yeah, this would work too, but not all routers let you allocate/reserve an IP address (mind you, the last couple I've had do).

Re: Mac keeps disconnecting from NAS
« Reply #12 on: 05 February, 2013, 05:42:46 pm »
Bookmark: a link in my bookmarks bar in Safari. I created that bookmark simply by adding a bookmark when I was on home page of the NAS.
The other way I have of accessing the drive (both of these methods are always fine even when the drive is not present in Finder - and thus my iTunes cannot find my library etc) is via the iOmega app. In the latter I can see 192.168.1.70 as the IP address for ? the NAS, I presume. That IP address does not change over time.
So everything can see the drive - including my Sonos - except Finder and iTunes.

Also possibly noteworthy: even after I access the drive using the app or browser, that activity doesn't make the drive visible in Finder. Restarting the drive, when the Mac is running, will make it visible.

ian

Re: Mac keeps disconnecting from NAS
« Reply #13 on: 05 February, 2013, 08:59:15 pm »
The NAS will only appear in the Finder if it resolves the machine name. It's probably still there. Imagine a heavy bird fell on my head. Dazed, I would quickly realise I had amnesia. I couldn't even remember my name. I'm still there though, look it's me in the mirror. Think of it like a heavy bird has fallen on your NAS. It's there, but like some bizarro version of Cheers, no one knows its name.

That said, I'm a bit puzzled why iTunes still doesn't recognise. It should still be mounted in /Volumes. I think. But if not, then there's your problem, iTunes is shouting out a name, but bird-thunked NAS doesn't know that's its name. "You mean me?" it ought to ask. But computers are dumb, and that's not just because heavy birds fall on them with what appears to be troubling regularity.

So, I figure two options.

1. Remove the name issue – if you NAS seems to like being 192.168.0.70, you can simply mount the drive by cmd-K and smb://192.168.0.70 (long term though, if you rely on IP, then you ought to set a static IP or reserve the address at your router, there's nothing otherwise to stop another device claiming that address). If you've multiple shares, they'll list in the following dialogue. Click the one you want. Don't mount anything from the Finder, you'll confuse things. Anyway, fire up iTunes with option key held down and find your library on the drive you just mounted. See if everything works as it is supposed to.

2. Don't use SMB (on the Mac). Instead connect via AFP, which is a Apple-specific file sharing protocol. Most NAS (and a far as I can tell, iOmega) support this though you may need to enable it. This should place the NAS back in the Finder (as it'll be using Bonjour for name resolution). You may get two entries (one for SMB and one for AFP) – click the AFP version (if in doubt, right click and get info, the location should "afp://" rather than "smb://"). Set up iTunes as above, with the library on the AFP mounted drive. Your NAS should happily share files with Sonos via SMB and your Mac via AFP.

Re: Mac keeps disconnecting from NAS
« Reply #14 on: 06 February, 2013, 09:00:30 pm »
2. Don't use SMB (on the Mac). Instead connect via AFP, which is a Apple-specific file sharing protocol. Most NAS (and a far as I can tell, iOmega) support this though you may need to enable it. This should place the NAS back in the Finder (as it'll be using Bonjour for name resolution). You may get two entries (one for SMB and one for AFP) – click the AFP version (if in doubt, right click and get info, the location should "afp://" rather than "smb://"). Set up iTunes as above, with the library on the AFP mounted drive. Your NAS should happily share files with Sonos via SMB and your Mac via AFP.

That seems to have been the issue - AFP not enabled. SMB was enabled - I can't think why that is so I have disabled it. The NAS / Sonos bit seems to be taking care itself... and, so far so good, my NAS is being found in Finder, is staying found, and my iTunes is no longer bemoaning the absence of a library.  :thumbsup: Thanks! Much appreciated.

I still don't understand it all of course... One thing that puzzles me is, why was it all ok before - AFP has never been enabled.

Re: Mac keeps disconnecting from NAS
« Reply #15 on: 12 October, 2013, 08:26:15 pm »
Bah. I'm still having this - NAS sometimes appearing in finder, sometimes not.

Is there any benefit to adding connecting to the NAS as a server, using "Go" from a finder window, then "connect to server" and adding it?

Vernon

  • zzzZZZzzz
Re: Mac keeps disconnecting from NAS
« Reply #16 on: 13 October, 2013, 09:16:59 am »
Bah. I'm still having this - NAS sometimes appearing in finder, sometimes not.

Is there any benefit to adding connecting to the NAS as a server, using "Go" from a finder window, then "connect to server" and adding it?

Yes - this is what we do to connect our MacBook to our ReadyNAS (we use a separate mount point for media). The connection is persistent except when you reboot the Mac, whereupon you have to Go->Connect to server.

ian

Re: Mac keeps disconnecting from NAS
« Reply #17 on: 13 October, 2013, 12:54:28 pm »
The truth is that computer name recognition systems were created by Finestre, the demon responsible for Hell's IT infrastructure (and by definition the stuff the rest of use topside), to call errant demons back from the periphery of the underworld. Demons – alas, it's in their nature to be ornery – so they don't always come when beckoned, even by one the higher realm demons like Finestre. It never was very successful and she went back to smiting* unruly demons shortly thereafter on the grounds it was rather more effective and a damn sight more entertaining, but those underlying incantations were written down in the dark volumes of Netbios to be rediscovered by humans several millennia later. As we should have learned from countless horror movies, those ancient texts really should be left undisturbed.

So, you could raise Finestre and make her sort it out, but to be honest raising higher realm demons is not beginner stuff. Virgin blood, mandrake roots, a magneto-optical drive from the 1980s, and the ability to utter curses in VMS might get you started. I wouldn't to be honest, she's terrible company and just spends all her time telling you about the time that she and Bill Gates created Windows 1.0... Demons are terrible name-droppers.

So, yes - Cmd-K (or Go to > Server) from finder will do the same and let you access your NAS if it's fstab (eek!) to automount at start-up or you can add a quick automator script to do the same and drop that into your login items (less eek!). Or you just hit cmd-K if and when it's not recognised.

*Even lower realm Demons, the kind that smell like asparagus wee and ensure you have put on mismatched socks, respawn after a smiting – it was Finestre's enthusiasm for this that gave rise the IT maxim of turn if it off and back on again.

Re: Mac keeps disconnecting from NAS
« Reply #18 on: 13 October, 2013, 01:43:34 pm »
access your NAS if it's fstab (eek!) to automount at start-up or you can add a quick automator script to do the same and drop that into your login items (less eek!).

As Vernon points out, while it is handy to be able to connect to the NAS by this method, on those many occasions when it doesn't appear in Finder by itself, when you restart the Mac you need to do it over again. How do I get it to automount at startup, via Automator or otherwise? You are correct in that I am at beginner level here, and probably destined to remain there.

And the "eek" re stab? Do I need to worry about this?

ian

Re: Mac keeps disconnecting from NAS
« Reply #19 on: 13 October, 2013, 06:14:38 pm »
access your NAS if it's fstab (eek!) to automount at start-up or you can add a quick automator script to do the same and drop that into your login items (less eek!).

As Vernon points out, while it is handy to be able to connect to the NAS by this method, on those many occasions when it doesn't appear in Finder by itself, when you restart the Mac you need to do it over again. How do I get it to automount at startup, via Automator or otherwise? You are correct in that I am at beginner level here, and probably destined to remain there.

And the "eek" re stab? Do I need to worry about this?

Well, the first option involves tweaking low level configuration files and there's a small chance that you can end up with a system that won't boot if you screw it up. Actually, I don't thinks Macs even use that anymore, but there's probably an analogous way of configuring it to mount the volumes at startup. So best ignore me.

The Automator option is simple - start up the Automator application and choose to create a new application. From the list of actions, choose Get Specified Servers and add your server (afp://192.168.0.4/music for instance) – you can add more than one. Next add the Connect to Servers action. Save it somewhere. Running this application should now mount your NAS.

Final step is to open System Preferences > Users & Groups and select your account and Login Items. Check to the plus sign and locate the application you just created. Save it all. Job done and no lingering smell of brimstone (unless you've had egg and lentil curry for dinner).

As my NAS isn't always on, I just have this app sitting in my dock. I just click it whenever I need to mount my NAS volumes.

Re: Mac keeps disconnecting from NAS
« Reply #20 on: 14 October, 2013, 11:56:12 am »
Thanks ian - did that, all seems good. Thanks for your help.