Mac Photo Library On Synology Nas

For some reason Synology CloudSync can't sync from Apple iCloud - probably because Apple does not allow this. However, an acceptable solution for me has been to use DSPhoto on my iPhone to automatically back up my photos to my NAS by setting up a geofence (sounds harder than it is) - this really works great. In the Finder, go to the external drive where you want to store your library. In another Finder window, find your library. The default location is Users username Pictures, and it's named Photos Library. Drag your library to its new location on the external drive. The Mac Mini downloads a copy to its Photos Library The Synology app copies the photo into its backup I’ve configured the Mac Mini and Synology to wake up for a few hours every day to do this and so far it’s working really well. In this article, IT Block will show you the easiest way to connect your Mac computer to a Synology NAS. Either you have just bought a brand new Synology NAS, or you need to connect a Mac to a Synology NAS you already own. Whichever the case, we are here to help. And for those of you who also need help setting up your Synology NAS before connecting, please have a look at step two, three.

iTunes is something a whole lot of folks tolerate. It's never been the best at any particular thing (except perhaps activating and syncing your iPhone or iPad, where it's the only official game in town), but it certainly does a lot of stuff. Sometimes slow, sometimes crashy, and perpetually gaining features, it's the app we use every day but rarely with any joy. One of its more frustrating aspects is its lack of an officially supported server component—Apple seems stubbornly unwilling to provide a real iTunes server, and so folks who would otherwise happily centrally locate a media library on a perfectly suitable NAS are stuck with islands of music.

Building a central multi-user iTunes server that works consistently and well— that's also easy to configure and maintain without needing remote administration tools or command line hackery—is annoyingly difficult. However, it is relatively easy to take your iTunes library and simply move it to a NAS. It's not the house iTunes server we wish we had, but it does get your data off of your computer's local hard disk drive.

Why would you want to do this? The reason that pushed me down this path is solid state disks. As iTunes libraries go, mine's middle of the road—about 50GB, made up of a mixture of music, audiobooks, and iOS apps but lacking movies, TV, and podcasts. Still, that's 50GB of SSD space that would be taken up by files which, frankly, don't particularly benefit from being on an SSD. I could relocate them to an external drive, but I don't have any spare external drives with enough capacity. What I do have, though, is a Synology DS-412+ with plenty of space on it.

So, I chucked my library onto my NAS. The process was both far easier and far more difficult than I figured it would be.

What we're not doing

Let's be clear going in: this is not a guide on how to set up an iTunes server. We're not going to describe how to get your music centrally situated and available as an attached library for all your iTunes clients. There are lots of ways to do this, but they just don't stand up over time. Regardless of the method, there are drawbacks and caveats galore. Even third-party tools which automate some of the annoyances are at the mercy of iTunes updates breaking everything.

We're not going to talk through any of that stuff—not in this article, anyway. We're focusing only on taking your iTunes library and relocating it out of your home directory and onto a NAS (though the instructions will work mostly the same with a direct-attached external drive).

Prerequisites

One thing that you do need to have turned on is iTunes' library management function. This option has gone by many names in past versions of iTunes, but as of version 11 it's in the 'Advanced' tab of the iTunes preference pane. It reads 'Keep iTunes Media folder organized.'

This option gives iTunes control over where your media files live. When enabled, iTunes takes care of the file names and folder structure of your media library. This is an anathema to some folks, especially music collectors with their music carefully organized into expertly curated deep folder structures, but it's a requirement for this process. The movement of the library is an automated thing, and it relies on iTunes being able to automatically place the files where they need to be placed. If you've never toggled on that option, you'll need to do so in order to play along here.

Also, you need a NAS, or at least another computer with an available network share. You can follow along with an external drive, though not all of the steps will be applicable.

Why not just copy the files yourself?

Excellent question! The answer is that you totally can, but you'll lose metadata—play counts, ratings, last-played dates, and everything else that iTunes keeps in its database won't survive a manual copy. If you don't care about that stuff, then you don't need to do anything in this guide at all—leave the 'Keep iTunes Media folder organized' option set to off, remove all your files from iTunes (taking care not to actually delete them!), copy them to their new location, and re-add them to iTunes. Done!

Advertisement

However, if you've got a whole mess of ratings and other metadata you'd like to preserve, keep reading.

Getting started

To start, make sure the network share you want to use is mounted, and that you've got the correct permissions on it. Create a target directory inside the share, so that you have a specific folder to point iTunes at.

I've got a share on my Synology NAS called 'Music', and inside that I've created a folder named 'NAS iTunes'.

Next, pop into iTunes, open the application preferences pane, and click the 'Advanced' tab. The very first thing in the window is the 'iTunes Media folder location' box. Click the 'Change' button next to the box. You'll get a file picker dialog box, which you should point at the network folder you've previously created.

When you click 'OK' to close the Preferences pane, iTunes will ask you if you want to move and rename files in the new location to match the 'Keep iTunes Media folder organized' preference— say yes.

Now to actually move the files. This is easy, but it's also where my trouble started. Select File > Library > 'Organize Library.' This will start what could be a very long file copy, and if the copy completes successfully, you're probably done!

It might not complete successfully, though. I had several issues.

Dealing with trouble

Almost immediately, the copy job failed with a cryptic, absolutely unhelpful error message that said, simply, 'Copying files failed. An unknown error occurred (-50).' Googling the error led to a large number of results but no clear solution: it appeared that error -50 is iTunes simply throwing up its hands in frustration and crying out for help. Worse, the location of all my iTunes music had been altered in the library, so a quick perusal of iTunes showed that every single item in my library was now listed as missing.

However, the problem actually turned out to be not entirely iTunes' fault. The library consolidation failed when iTunes attempted to copy a song with a very, very long file name (for the curious, it was a song by The Video Game Pianist titled 'Sonic the Hedgehog 1 - Green Hill Zone, Stage Complete Theme, Labyrinth Zone, Marble Zone, Sonic Drowning Theme, Game Over Theme, Starlight Zone, Chaos Emerald Theme, Scrap Brain Zone, Spring Yard Zone, Game Over Theme, Extra Life Theme, and Ending Theme'). This bumped right into the 255-character filename limit on the Synology's ext3 file system, and the entire copy job aborted.

So, lesson one: know your target filesystem.

After shortening the file name, I ran into the second problem: re-selecting File > Library > 'Organize Library' no longer did anything. The first thing iTunes did before even starting the copy was update its internal library so that all its contents' locations were set to the new Library location, so as far as iTunes was concerned, everything was already copied. I had to manually copy my library to the new location.

This led to a third problem. The Synology NAS's ext3 file system, unlike the HFS+ on my local disk, is case-sensitive. A huge number of files in my library were suddenly showing up as missing, even though a spot check showed that the files were actually right where they were supposed to be. Manually re-linking them caused iTunes to automatically reorganize them to folders and file names that exactly reflected the files' metadata, leading to situations like this:

Notice that there are two 'The Best of 1980-1990' folders, one with a capitalized 'Of' and the other with a lowercase. Fixing this required quite a bit of song tag editing. Fortunately, the automatic library organization actually worked for me here, handling the deletion of extraneous folders after I'd fixed the song names. In the example listed above, once I'd found the one single song in the upper-case 'The Best Of 1980-1990' folder and modified its album metadata with a lowercase 'of,' iTunes moved the song to the correct folder and deleted the uppercase one. Still, tracking down all the exceptions took several hours.

Advertisement

Lesson two: know your target filesystem.

The third and final issue I had was due to my library's age. I've been using iTunes since about the time it was released for PC near the end of 2003. My poor library has been with me since, surviving version upgrades from 4.1 to 11, even going through a platform switch from Windows to OS X near the end of 2007 when I converted. As iTunes has gained features, it's directory layout had changed, and as a result I've got crufty extra directories and files stored all willy-nilly behind the scenes.

For example, underneath the iTunes Music directory is...another iTunes music directory, with a bunch of orphaned files in it.

That directory also contains a huge number of folders with more music.

And, inside of that, there's yet another Music folder, with, you guessed it, more orphaned music:

When iTunes attempted to consolidate my library to the NAS and the copy aborted, it also looks like it attempted to clean all of this up, fixing the iTunes database so that in the new location, everything was located where it should be in the current iTunes automatic organizational scheme—in album-named subdirectories under a single top-level folder. Because of the failed copy job, this didn't happen.

Because of the scattered state of my aged library, I had to then spend about another hour going through the library, re-linking missing files. This wouldn't have happened if the initial copy hadn't failed, which wouldn't have happened if I'd not had that one tremendously long file name.

Lesson three: For the love of all that is good and holy, know your target filesystem.

Auto-mount network shares

One final thing needs be done: with your library on a network share, it's important for that share to be mounted before iTunes starts up. For Windows users, this means that it's a good idea to assign your 'Music' NAS share a drive letter and set it to auto-mount on startup; OS X users can do the same thing by adding your Music volume to the 'Login Items' section of your account under the Users & Groups system preference panel. If you start iTunes without having its NAS share mounted, it will freak out and say all of your library files are missing.

Eventual success

After quite a bit of clean-up, the end result works quite well. The actual iTunes library file with its metadata is still on my local HDD, but all of my songs, iOS apps, and audiobooks are safely on my NAS. New files dragged-and-dropped into the library or new iOS apps downloaded from the app store are all automatically stored on the NAS in the library location. Now that the initial work is done, the system is self-maintaining.

Mac Photo Library On Synology Nasal

Folks with small iTunes libraries won't see much benefit from this, but if you've got a tremendous amount of stuff in your iTunes library along with some external space to store it, this is an excellent way to give you back a whole bunch of space on your boot volume.

This method works well with local disks, too, so if you have a big USB or Firewire external drive and you want to put your media on that, simply setting it as the library location in iTunes should do the trick—you won't even have to deal with the file system issues I had, since a locally attached external disk will almost certainly be formatted with the same filesystem as your source volume.

It's not a whole-house iTunes server for multiple users, but it's a step closer. Stay tuned, though: we'll look at some methods for achieving a full-on iTunes server in the near future.

If you have a large iTunes library, you may have reached the point where you need to offload some of your media files to another drive. There are several ways you can do this. You can connect an external hard drive to your Mac, and use that to store your iTunes Media folder. If you use an iMac, this is probably the easiest choice. However, if you use a laptop, you may not want the hassle of connecting and disconnecting an external drive whenever you want to use iTunes.

Another option is to use a network attached storage device, or NAS. This is a storage device that your Mac connects to over your network—usually via Wi-Fi, but you can also use Ethernet—and that can give you vastly more storage, especially if your Mac has an internal SSD.

If you use both iTunes and another network device or app—such as Plex, a hi-fi media streamer, or Sonos’ wireless home audio system—you can use the NAS to store media that other devices can access too. You won’t need to ensure that your Mac is always on.

In this article, I’ll discuss how you can set up iTunes to use a NAS, and I’ll point out some issues you need to be aware of to ensure that iTunes works correctly.

Choosing a NAS

There is a plethora of NAS devices available, from simple, single-drive units to larger, multi-drive RAID-capable storage devices. Depending on your needs, you may spend a couple hundred dollars for a simple NAS without drives (you may have some hard drives you can recycle), or much more for a unit with five drives and RAID capabilities. Remember that if you get a simple NAS with a single drive, you still need to consider adding an additional external hard drive to back up the files on the NAS itself.

I recently bought a WD MyCloud Ex2 NAS. This two-bay device is available without drives, selling for around $159, and it allowed me to use two 2TB hard drives I had in a closet, having upgraded another storage device to 4TB drives. (The MyCloud is also available in versions with drives, with capacities from 4TB to 10TB.)

If you’re going to choose a NAS to store your iTunes library, first consider what other way you can use the device. I use one of the hard drives on my NAS for my MacBook’s iTunes library, and the other for Time Machine backups. Many NAS devices support Time Machine backups, so if you want a device for this purpose, check its specs.

The MyCloud, like some other NAS devices, also has an iTunes server feature, which lets you stream music from the device to a computer running iTunes or to an Apple TV. This means that any computer in your house can stream your media files, without the Mac whose library is stored on the NAS running.

Moving your iTunes library

When you’ve chosen your device and set it up, it’s time to move your iTunes library. There are two ways you can do this, and each option has pros and cons.

  • You can move just your media files to the NAS, and keep your iTunes library files on your Mac.
  • You can move all your iTunes files (media and library files) to the NAS.

Move just your media files

In your home folder is a Music folder, and, in that, an iTunes folder. This contains a number of files, such as your actual iTunes library file, and some support files. There’s also an Album Artwork folder (which caches artwork from your media files), and an iTunes Media folder, which contains sub-folders for different types of media: Music, Movies, TV Shows, etc.

If you move just your media files, then your Mac retains your iTunes library file, as well as some other files; all those in the screenshot above, other than the iTunes Media folder. The advantage to keeping these files on your Mac is that when iTunes updates its library file—which happens any time you make changes to any files in your iTunes library—this process won’t be slowed down by your network. However, if you have a fast Wi-Fi router, such as a recent AirPort Extreme, you shouldn’t notice any lag.

However, if you move just your media files, you must ensure that your NAS (or any external drive) is mounted when iTunes launches. If iTunes doesn’t see that drive, it will search in your Music folder for your media, and won’t find it. It will then switch the location of the media folder in its preferences to that local folder, and copy any new files there. And this gets messy.

Mac photo library on synology nas

If you want to move just the media files, do the following:

  1. Back up all your files; because accidents happen.
  2. Ensure that the NAS is mounted in the Finder.
  3. Create a new folder on the NAS; call it iTunes, or something similar.
  4. Launch iTunes, choose iTunes > Preferences, and then click Advanced.
  5. In the iTunes Media folder location section, click Change.
  6. Navigate to the folder you created in step 2 and click Open, and then click OK.
  7. Choose File > Library > Organize Library, and check Consolidate files. This tells iTunes to copy all the media files currently on your Mac to the new location. This may take a while, depending on how many files you have, and how fast your network is. This may mean allowing the copy to run overnight.

When the copy is finished, you can play music, watch movies, and listen to podcasts from your copy of iTunes as if the content was on your Mac.

One tip for this scenario: when the NAS is mounted in the Finder, open System Preferences > Users & Groups, and click your account. Click Login Items, and drag the NAS volume to that list. This ensures that your Mac mounts the volume when you start up your Mac and log in.

Move your entire iTunes folder

This is a simpler process. Just copy the iTunes folder in your home folder’s Music folder to the NAS. As above, this may take a long time.

The first time you launch iTunes after the move has completed, press the Option key immediately after clicking the iTunes icon. Click Choose Library, and then navigate to the iTunes folder on the NAS. iTunes will then use this library, and, if it’s not available on the network, will alert you. It won’t revert its settings to your local drive.

However, if you have a slow network, you may have issues with searches and you may see a bit of lag when making changes to files or their tags. Also, you need to ensure that not only your media files but your iTunes Library file gets backed up regularly. Leaving the non-media files on your Mac ensures that Time Machine backs them up; putting all these files on the NAS means that you need to set up another backup routine.

What’s next?

Mac Photo Library On Synology Nascar

Once your iTunes media files (or all your iTunes files) are on the NAS, you use iTunes exactly as before. As long as the NAS is mounted, iTunes uses that library. The only difference you’ll see is when you copy files to your iTunes libraries. You won’t notice much delay with music files, but you’ll definitely see that movies take a lot longer to copy to the NAS over your network.

Syncing to iOS devices will also be slower. Again, you won’t notice this if you’re only syncing some new music, but if you set up a new iOS device, and sync a lot of content, this will take quite a while.

Using a NAS, you can have a large iTunes library accessible from a laptop with a compact SSD, and, as I pointed out earlier, also access that content easily from other hi-fi streaming devices that can read files from a network volume. Just remember to back up your iTunes library on the NAS, especially if you’ve moved all your files to the device. If not, and you lose files, you may have trouble rebuilding your iTunes library and playlists.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read ouraffiliate link policyfor more details.

    Related:
Senior contributor Kirk McElhearn (@mcelhearn) writes about Macs, music and more on his blog Kirkville. He also runs Kirk's iTunes Forum, where users can discuss iTunes, iOS devices, music, and more. Kirk is the author of Take Control of iTunes 12: The FAQ.