Jump to content
  • The Computer Audiophile
    The Computer Audiophile

    Automount Almost Any NAS Drive On OS X

    <img src="http://www.computeraudiophile.com/files/AutomountMaker.png" style="padding: 1pt 10pt 7pt 0pt;" align="left">Those of you using a NAS drive to store your music collection know that mounting the drive is very important. Launching iTunes before the NAS drive is mounted will reset your music folder location to the default local folder. Then the dreaded exclamation marks appear next to every track. It's not the end of the world to recover from this, but it's far easier to prevent it from happening. <!--more-->

     

    [PRBREAK][/PRBREAK]

     

     

     

    As some of you know I created an Automator script to mount my NAS drive when I login to my music server. I wrote an <a href="http://www.computeraudiophile.com/node/289">article explaining how to do this</a> and made the script available for download. While this was a good method of mounting the drive, I still kept looking for something a little easier to setup for all the readers. This afternoon I spent some serious time on the subject and settled on the AutomountMaker application. This application has a simple GUI allowing even the most unskilled users to setup their NAS drive to mount automatically every time they login.

     

     

    <center>

     

    <img src="http://www.computeraudiophile.com/files/AFPSampleConfigWindow.jpg">

     

    </center>

     

     

     

    In simple terms here is what needs to happen.

    1. Install the application.

    2. Open the app and enter the name or address of your NAS and the folder to mount.

    3. Enter the username and password if required.

    4. Save the infomation as a AutomountMaker file.

    5. Open System Preferences >> Accounts >> Login Items and drag the file into this window and your done.

     

     

     

     

     

    The application's website has plenty of screenshots and even these two videos.

     

     

    <b>How To Make Your First Script</b>

     

    <div><object width="420" height="339"><param name="movie" value="http://www.dailymotion.com/swf/x5jter" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://www.dailymotion.com/swf/x5jter" type="application/x-shockwave-flash" width="420" height="339" allowFullScreen="true" allowScriptAccess="always"></embed></object><br />

    </div>

     

     

     

     

    <b>Quickly Find and Use Your Scripts</b>

     

    <div><object width="420" height="339"><param name="movie" value="http://www.dailymotion.com/swf/x5ju65" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://www.dailymotion.com/swf/x5ju65" type="application/x-shockwave-flash" width="420" height="339" allowFullScreen="true" allowScriptAccess="always"></embed></object><br />

    </div>

     

     

     

    This application really is easy and solves a somewhat annoying problem that Apple crated by removing the auto connect check box when connecting to a network drive. Here is a link to the site where you can download the application. The app is free but the developer accepts donations for all his work. This app is worth quite a bit in my book. Let's support this guy for making our lives easier :-)




    User Feedback

    Recommended Comments



    Hey AB - I agree this is such a useful app that Apple should include it in the OS. <br />

    <br />

    One more item that can be very helpful is the delay function. I set my drive to mount five seconds after the app starts running at login. This allows plenty of time for my network card to obtain an IP address from the DHCP server. Its not always necessary, but it comes in handy sometimes.

    Share this comment


    Link to comment
    Share on other sites

    Chris, <br />

    <br />

    It looks like this would be typically most helpful with "canned" NAS units like the Drobo, etc., but would this also be something that would be useful for someone (like me) whose hard drive is attached to an Airport Extreme? Or, in your experience, does the Airport Extreme not have these connection issues? I'm setting up my gear and wondered if this is something I should install from the get go. Thanks<br />

    <br />

    TheOtherTim<br />

    Share this comment


    Link to comment
    Share on other sites

    Hi Tim - This is definitely something you'll want to use in conjunction with the Airport Extreme.

    Share this comment


    Link to comment
    Share on other sites

    Sorry to have to ask and again reveal my almost complete ignorance regarding computer lingo ,but what exactly is a NAS drive?<br />

    I have been thinking of getting a firewire 800 La Cie Rugged 250 G portable disk for my music storage when I travel next time.<br />

    Could I store and play files directly into i-Tunes from something like that? <br />

    Will I need to install iTunes on it and if so how?<br />

    Chrille

    Share this comment


    Link to comment
    Share on other sites

    Hi Chrille - In my review of the QNAP NAS unit I wrote a little primer on NAS drives for audiophiles in a very easy to understand way. Here is a link http://www.computeraudiophile.com/qnap_ts-409_turbo_nas_review<br />

    <br />

    Please let me know if this only raises more questions!<br />

    <br />

    If you get the FW800 portable drive you can certainly store and play files directly from the unit. You'll just need to tell iTunes that your music resides in a different location than the default. It's prety simple and we can walk you through it if needed. No need to install anything different. It's just another hard drive.

    Share this comment


    Link to comment
    Share on other sites

    Thanks Chris all clear now,<br />

    thanks to your quick responses ,I´m learning new things almost everyday, and have actually managed to get ok sound from my mac simply by setting 24/96 in audio midi and connecting a headphone amp and my Sennheisers .<br />

    The sound I get on the testfiles from 2L and the Czech Radio free Downloads isn´t as good as my SACDs.<br />

    But good enough to make me listen to some music over headphones while working on my images in Photoshop.<br />

    But I have occasionally noticed dropouts. <br />

    What is the reason for those?<br />

    The internal soundcard in the mac or something else?<br />

    As a first step on my next long phototrip I will probably get the Proton if it is released soon .<br />

    Otherwise I´ll get the Apogee Duet and store my music on a La Cie Rugged.<br />

    All the best Chrille <br />

    Share this comment


    Link to comment
    Share on other sites

    Dropouts can be caused by many different things. One common cause is the USB bus. If you have a USB DAC and it's plugged into a USB port that shares a USB bus with other items such as a keyboard, bluetooth, external hard drive etc... there can be dropouts. <br />

    <br />

    Checkout this article I wrote a while ago on dropouts I experienced. http://www.computeraudiophile.com/node/417<br />

    <br />

    Also, Photoshop is a very beefy application. I suspect this could cause some dropouts as it taxes system resources.

    Share this comment


    Link to comment
    Share on other sites

    Thanks for the hints. I tried fooling around with Automator, but no joy. My system is a bit different: iMac Intel Core Duo, 10.4.11, LaCie NAS connected through a Linksys wireless router to the Airport wireless on the Mac, and the iTunes library is on a share on the NAS server with keychain-stored authentication. I can connect on startup fine with the share in the user account startup list, but the connection will vanish after awhile, and I typically won't notice until I start iTunes. Quitting iTunes, connecting manually, and restarting iTunes works fine, but is of course an annoyance. I was looking to test your idea as a way to create a "stickier" connection. So, what is different about connecting via Go/Connect to server vs. through the Finder window? Any other ideas about where to go with this?

    Share this comment


    Link to comment
    Share on other sites

    Yes I did, and oops, I meant to post to that article instead of this one originally. My bad. I've been fiddling with the Automator script to try to get it to work, more to learn about Automator than anything. When I connect to my NAS, I have to explicitly select a share to connect to. I forget now whether this is mandatory with the LaCie drive, but it seemed like a good idea at the time. Also, there's a user name and password associated with that action which seems to be taken care of during the startup process through the Keychain facility. One thing I don't understand is the difference between connecting through the Finder panes (select Network, than the NAS item, then connect to the share) and Go/Connect to server. I had read something somewhere that indicated one method is preferable to the other when setting this up as a startup item, but no reason was given why. Both seem to get me to the same place when done manually.<br />

    <br />

    Where I worked in a previous life, I was used to being connected to a number of shares on the company network and having those connections persist, except for genuine system failure issues. What's bugging me here is that an idle connection to the share on my NAS will time out after a period of time (a few hours, maybe) and I'll have to reconnect manually. This doesn't seem to happen if I'm using it periodically (like when listening to iTunes). I'm thinking I should write some kind of a ping app that periodically refreshes the connection in the background. I'm wondering if anyone out there has seen and dealt successfully with this behavior.<br />

    <br />

    Thanx again for your patience with a noob. We could move this discussion over to the proper article if you like.

    Share this comment


    Link to comment
    Share on other sites

    Hmm, I'm not sure a ping app would really keep the drive connected. OS X will ramain connected to the drive as long as the drive is on the network. Something tells me the drive goes into a sleep mode of some sort and a ping wouldn't wake it up or keep it awake. If a ping would work then I think all the other network traffic that hits the network card in the NAS would keep the drive awake as well. Maybe there is a setting on the NAS to keep the drives awake or something similar.<br />

    <br />

    Anything is worth a shot though. Especially if it's free :-)

    Share this comment


    Link to comment
    Share on other sites

    My setup is slightly different in that my music files are on an XP PC that is also used for backups and as a Digital video recorder. In order to save on my electricity bills I have set the PC to go into S3 sleep when inactive. This is well worth doing; using a plug-in power monitor I monitored the PC's power usage for a month to obtain real world figures. If the PC was left on 24/7 it would cost me around £50/year in electricity, but using S3 sleep it is only costing me £4/year. Anyway to the point, to get the PC to wake when required I set it to only respond to a "Magic Packet" otherwise it would be wakeing all the time on general network traffic. I then obtained a wake on LAN utility for the Mac Book, which was fine but it required me to:<br />

    <br />

    Boot the Mac <br />

    Manually send a Magic packet<br />

    Wait for the PC to wake<br />

    Open a finder window<br />

    Connect the network drive<br />

    Start iTunes<br />

    Start signal (iTunes remote control software)<br />

    <br />

    This was a bit of rigmarole just to listen to music, so with a bit of research and experimentation I have managed to write a script to automate the task. The script is as follows<br />

    <br />

    Tell application "WakeOnLan"<br />

    Wakeup "192.168.0.4"<br />

    end tell<br />

    <br />

    delay 25<br />

    <br />

    tell application "WakeOnLan"<br />

    quit<br />

    end tell<br />

    <br />

    delay 10<br />

    <br />

    tell application "Finder"<br />

    mount volume "smb://username:password@severname/sharename"<br />

    end tell<br />

    <br />

    tell application "Signal"<br />

    activate<br />

    end tell<br />

    <br />

    tell application "System Events"<br />

    set visible of process "Signal" to false<br />

    end tell<br />

    <br />

    tell application "iTunes"<br />

    activate<br />

    end tell<br />

    <br />

    A couple of things to note, as the PC takes time to wake a delay is required, originally I had a single delay after "WakeOnLan" had quit, but occasionally this application did not like being shut down so promptly after being started, so I moved a portion of the delay to this point in the script. When mounting the volume I included the username and password for the share, do not ask me why but this seemed to be more reliable than saving these credentials in the keychain. I have saved the script as an application and set it to run at boot.<br />

    <br />

    I mentioned earlier that I had monitored the PC's power useage, well I have done the same with my Mac, router, cable modem, wireless router, gigabit switch and airport express's. If anyone is interested I will post my findings in the "general" section.<br />

    <br />

    Paul<br />

    <br />

    <br />

    <br />

    <br />

    <br />

    <br />

    Share this comment


    Link to comment
    Share on other sites

    Hi Paul - Thanks for the detailed info. I'm certainly going to look into this much more. <br />

    <br />

    I just got back from a long weekend in northern Minnesota, so needless to say I have some major catching up to do around here!!!

    Share this comment


    Link to comment
    Share on other sites

    Works great and iTunes is running well with my NAS. I think I pushed it too far having iTunes open on login, which didn't work, but opening it once the computer has fully booted is not a huge deal. <br />

    <br />

    Thanks Chris.

    Share this comment


    Link to comment
    Share on other sites

    a script to auto mount at start-up would be great. I found a way to do this at the Apple Support site (See link below) however I am unable to interpret the steps required. Greenberg makes some good points why mounting at Start-Up is superior to Log-in and would solve some issues for those launching iTunes at Login.<br />

    <br />

    http://discussions.apple.com/thread.jspa?threadID=1265984<br />

    <br />

    <br />

    GD

    Share this comment


    Link to comment
    Share on other sites

    Chris,<br />

    <br />

    Tried it, auto-mounting my QMultimedia volume (of my QNAP). Works...! Great stuff as always.<br />

    However, auto-launcing iTunes at login causes the issue that iTunes seems to occasionally revert to it's default folder location (instead of folder on NAS). Is that likely to be a timing issue? In each case the NAS volume is mounted properly (so the mountscript does run ok). Can it be that iTunes was started a bit too early for the mount to complete.....? <br />

    <br />

    Also: does the protocol matter? I only seemed to be able to use SMB (My NAS does sit in a Windows workgroup...). However, I (also) have NFS and AppleTalk enabled on the specific share (standard QNAP option)...<br />

    <br />

    Thanks!<br />

    Hans

    Share this comment


    Link to comment
    Share on other sites

    Hi Hans - Yes, this is a timing issue. It is possible to create a little app that runs the NAS drive mount, then opens iTunes. This would fix the problem for you.<br />

    <br />

    The protocol doesn't really matter that much. Most NAS units don't support AFP so SMB is totally fine. I would disable NFS and AppleTalk. If you aren't mounting an NFS share then you don't need it and AppleTalk will only hurt, not help anything.

    Share this comment


    Link to comment
    Share on other sites

    I store all our Itunes media on a 'time capsule' as a wireless network server.<br />

    <br />

    I have downloaded and installed Automountmaker (thankyou). And run through the instructions above. <br />

    <br />

    The drive does not mount and Itunes defaults to it's home media address.<br />

    <br />

    MacBook, Snow Leopard<br />

    Wireless network<br />

    Time Capsule 500GB<br />

    No firewall (except through router)<br />

    No error message<br />

    <br />

    File attached<br />

    <br />

    <br />

    What am I doing wrong?<br />

    <br />

    Thanks

    Share this comment


    Link to comment
    Share on other sites

    Hi Mark - My guess is the server name or IPadress is what's wrong based on your screenshot. <br />

    <br />

    Can you try using the IP address of the capsule?

    Share this comment


    Link to comment
    Share on other sites

    Hi Chris,<br />

    <br />

    works just fine with the script - it's just annoying that the window of the mounted music folder on the NAS pops up every time I log in. You don't know by any chance how to avoid that, do you? Or anybody else, of course? ;-) <br />

    <br />

    Thanks, Peter

    Share this comment


    Link to comment
    Share on other sites

    I've read through this very useful thread but I'm not sure it totally solves my problem. <br />

    <br />

    I have a headless MacMini and a Synology NAS. I'd like a foolproof OSX startup script that will mount the NAS and then start iTunes... BUT not before knowing that the NAS was successfully mounted. I want to avoid iTunes starting up and pointing to the wrong folder. <br />

    <br />

    I have installed AutoMountMaker but I can't see that there's a way to have it wait until a successful mount is confirmed.<br />

    <br />

    I'm trying to address situations where there's been a power outage and the NAS and MacMini start up again. The NAS takes quite a bit of time to start up. <br />

    <br />

    Any ideas?

    Share this comment


    Link to comment
    Share on other sites

    You may be able to create an automator script that pings the NAS before launching iTunes.<br />

    <br />

    I know you can delay mounting the NAS drive using ping in Auto Mount Maker but this doesn't seem like what you're looking for.<br />

    <br />

    Share this comment


    Link to comment
    Share on other sites

    Hmmm I always just take the mounted drive and go into my user preferences for the particular account and drag the NAS to my log in items. Works like a charm and it will show up each time you boot! Seems a bit easier than the script. Of course it is nice to see folks being so inventive. See if this doesn't do the exact same thing however.

    Share this comment


    Link to comment
    Share on other sites

    Hi bleedink - I used to use that method but I got tired of always closing the finder window displaying the NAS drive. If running a headless server the finder window may not be an issue.<br />

    <br />

    Share this comment


    Link to comment
    Share on other sites

    Yes, that'll work nicely as long as the NAS is up and running - and available to be mounted. But what if it isn't? <br />

    <br />

    I'm looking for a solution that can handle the exceptions.

    Share this comment


    Link to comment
    Share on other sites




    Guest
    This is now closed for further comments




×
×
  • Create New...