Why Your Aperture-Migrated Photos Library Isn’t Really Doubling Disk Space
If you've migrated an iPhoto or Aperture library to Photos, you may have noticed that you now have two libraries of the same size. If you started with a large Aperture library, let's say 100 GB, then doubling that up can be a Bad Thing™, especially if you've got limited disk space (i.e. a 512 GB SSD drive). But as it turns out, that extra 100 GB library isn't actually taking up 100 GB of space.
Through the magic of “hard links”, OS X only has one copy of the file, but believes that it has two. The original is still in your Aperture library, and a “hard link” version sits in the Photos library. It's kind of like an alias (which is a “soft link”), except that as far as the OS is concerned, both files actually exist.
You can see in the sample libraries above that the Aperture library weighed in at 7.23 GB, and the Photos version of it is at 7.63 GB. A little increase makes sense as it's generated new previews. The good news is, it's not really taking up 7.63 GB of extra space.
(Side note… notice the name of the libraries. My Aperture library was called “From Aperture to Photos”, because this was a test library I built specifically for this. The transitioned one is called “From Photos to Photos”. I have to assume that in the migration, the word “Aperture” was simply changed to “Photos”. For most people that'd simply mean “Aperture Library” becomes “Photos Library”, but it's still funny. It reminds me of my most-retweeted tweet ever, about OS X swapping “MB” (as in Megabytes) for “Mercedes-Benz” in a dialog.)
All well and good, but my question to Apple was “what happens if you delete the Aperture library??”. Turns out, nothing bad.
I'm no engineer so frankly this is all voodoo to me, but you can safely delete one without hurting the other. And believe me, I tried. I created a series of scenarios of migrating an Aperture library to Photos, then copying one or the other to different drives, moving (not copying then deleting original) to different drives, unplugging external drives, etc., and no matter what, the Photos library survived.
If you'd like to know more about hard links and even more info on what happens when things in the two libraries change, there's a great post on sixcolors.com, “The (hard) link between Photos and iPhoto” by Jason Snell that covers it all.
Comments
on April 21, 2015 - 9:53pm
http://neonsqua.re
on April 22, 2015 - 12:18pm
I believe this is the same way Time machine manages storage. Certainly a better process than doubling the amount of space taken.
Is anyone else seeing different photo counts in Photos app in different devices? At the bottom of the Moments screen on my iMac, it shows the total number of photos I have in Photos app. In my case, thats 11,617. On my MacBook Pro, iPad, and iPhone, each shows a total of 11,419 photos in Photos app. When I switch to All Photos in Albums view on my iMac it shows a different total (11,630). On my other devices, the All Photos in Album View shows the same as in the total in my collections view of 11,419. All devices are up to date and done syncing. In other words, my iPhone, iPad and MBP seem to all agree on the totals, but my iMac does not.
To further confuse things, accessing my photos on the web via iCloud shows a total of 11,431. I assume this is some kind of bug that will be worked out in a future update, but curious if anyone else is seeing this?
I have iCloud Photo Library turned on on all devices and syncing generally seems to be working as I add/delete photos. I’m also getting random duplicates, but I read elsewhere that is a known bug.
Thanks for any insights!
BopperZip
on April 22, 2015 - 1:06pm
Jochen is right-on-the-money. Files are just blocks of space on disk. An inode points to the first block. Large files consume multiple blocks that are chained together and may be spread out all over your disk. Does anyone remember defragmenting Windows disks? That basically reshuffled all the blocks associated with files so that all the blocks for a single file were as close together as possible.
Files are pointers / mappings of file names to inodes. A directory is a special file that is a lost of these mappings. You can have multiple “files” map to the same inode. These are your hard links. The filesystem keeps track of how many mappings there are. Only when the last mapping is deleted does the actual space on disk get freed up. So if Aperture and Photos have separate mappings (hard links) to the exact same inodes on disk and you choose to delete your Aperture library, the filesystem knows there is still one mapping from the Photos library and so it keeps the inode and blocks of storage active. If you later delete the Photos library, the filesystem will see that this is the only mapping to the disk blocks and thus will free up the entire chain of blocks associated with all the files in the Photos library.
This web page gives a visual that helps illustrate soft links vs hard links.
http://www.geekride.com/hard-link-vs-soft-link/
Photographer | https://www.walterrowe.com | https://instagram.com/walter.rowe.photo
on April 22, 2015 - 3:53pm
Exactly! And for any of those who are not interested in the details: It works, it is nothing arcane and there is no particular risk or anything to consider with it.
http://neonsqua.re
on April 23, 2015 - 1:31am
This may seem a naive question, but it is something that I hadn’t previously considered until I read this Tip. If I migrate a managed Aperture library to Capture One or one of the other options available will that also behave in this way? Or will I need 871 GB, the size of my Aperture Library, of free space on my HD?
Stephen
on April 23, 2015 - 2:43am
The Lightroom importer has an Option screen where you can choose to leave your originals in their current location. By default, Lightroom will make a copy of all of your images and thus consume twice the space. If you choose the option to leave images in their current location, Lightroom will reference the same copy as Aperture. All Lightroom catalogs are Referenced (as opposed to Managed) so it is wise to relocate your originals outside your Aperture library before using the Lightroom importer unless you choose to let Lightroom make a second copy of your images.
Capture One doesn't give you a choice. It defaults to referencing the Aperture originals in their current location, regardless of whether your library is Managed or Referenced. If you import a managed library into Capture One, Capture One will refer to the originals where they live inside the Aperture library. As with Lightroom it is recommended to relocate your originals outside the library (move Managed images to a Referenced location) before using the Capture One importer.
The difference between Capture One Catalogs and Lightroom Catalogs is that Capture One supports both Referenced and “Stored” Catalogs (“Managed” in Aperture). Lightroom only supports Referenced Catalogs.
[ UPDATE ] Now that I have upgraded to Lightroom CC (Lightroom 6), the Options screen has more clarification about leaving originals in their current location. Managed images will still be copied. The Option screen explicitly says to select the option to leave REFERENCED images in their current location, and that Managed files will still be copied. This is a very important clarification if you are using the Lightroom importer to import Aperture libraries. Look at the last section of this screenshot.
Photographer | https://www.walterrowe.com | https://instagram.com/walter.rowe.photo
on April 23, 2015 - 6:39am
@PhotoJoseph
— Have you signed up for the mailing list?
on April 24, 2015 - 5:06pm
Thanks for the replies; I think I understand them. I am not planning on moving from Aperture just yet, so I will come back to this, and changing from a Managed to a Referenced Library when I do.
Stephen