<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>@Lathi.net: iPhoto Library Sharing Across a Network</title>
    <link>http://blog.lathi.net/articles/2006/08/28/iphoto-library-sharing-across-a-network</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>On Life, Fatherhood, Christianity, and Computers</description>
    <item>
      <title>iPhoto Library Sharing Across a Network</title>
      <description>&lt;p&gt;I&amp;#8217;ve got three Macs and one Linux fileserver.  Why can&amp;#8217;t we all share the same iPhoto library?  I think we can.  If you google &amp;#8216;iphoto acl&amp;#8217; there are lots of tutorials on how to share iPhoto libraries on the same computer between different users.  There&amp;#8217;s not much that talks about doing it across different computers.  Here&amp;#8217;s what I did.&lt;/p&gt;


	&lt;p&gt;I setup a volume on my Linux box with the permissions such that all the files are group read/write and the directories have the group sticky bit set.  With all the users that need access to the photos in the same group, this setup allows anyone to both read and create photos on the shared partition.  Here&amp;#8217;s a couple commands I use to set this up:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
$ find /photos -type d -exec chmod 2775 {} \;
$ find /photos -type f -exec chmod 664 {} \;
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;So now the question of how to share the files.  There are three options: &lt;span class="caps"&gt;NFS&lt;/span&gt;, Samba/smb, and Netatalk/AFP.  As to the later, note that &lt;span class="caps"&gt;AFP&lt;/span&gt; is not necessarily Appletalk.  &lt;span class="caps"&gt;AFP&lt;/span&gt; is a file sharing protocol; Appletalk is a communication protocol.  Netatalk easily allows &lt;span class="caps"&gt;AFP&lt;/span&gt; over &lt;span class="caps"&gt;TCP&lt;/span&gt;/IP.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve managed &lt;span class="caps"&gt;NFS&lt;/span&gt; before.  Supposedly it&amp;#8217;s the most mature and efficient of the three file sharing protocols.  My main beef with &lt;span class="caps"&gt;NFS&lt;/span&gt; is managing user ids and group ids across all the &lt;span class="caps"&gt;NFS&lt;/span&gt; clients and server.  I know you can use &lt;span class="caps"&gt;NIS&lt;/span&gt;, but that seems like more systems administration than I want to deal with.&lt;/p&gt;


	&lt;p&gt;So really it comes down to &lt;span class="caps"&gt;AFP&lt;/span&gt; and &lt;span class="caps"&gt;SMB&lt;/span&gt;.  Which one is better?  I&amp;#8217;m not a very good judge of that, so what I did was setup both and measure the performance difference.   I have a directory tree that&amp;#8217;s several layers deep and has about 450 images; both Adobe &lt;span class="caps"&gt;DNG&lt;/span&gt; raw and processed JPEGs.  The average &lt;span class="caps"&gt;DNG&lt;/span&gt; is about 5MB and the average &lt;span class="caps"&gt;JPEG&lt;/span&gt; is about 2 &amp;#8211; 3 MB.  I used &lt;code&gt;rsync -av&lt;/code&gt; to copy the folder from my Macbook Pro (with a 7200rpm drive) across a 100Mb/s wired network to the server using both an &lt;span class="caps"&gt;AFP&lt;/span&gt; mount and a &lt;span class="caps"&gt;SMB&lt;/span&gt; mount.&lt;/p&gt;


	&lt;p&gt;With &lt;span class="caps"&gt;SMB&lt;/span&gt; using Samba 3.0.14a-3sarge1:&lt;/p&gt;


&lt;code&gt;
sent 2532341005 bytes received 8800 bytes 8657606.17 bytes/sec
&lt;/code&gt;

	&lt;p&gt;With &lt;span class="caps"&gt;AFP&lt;/span&gt; using Netatalk 2.0.3-2.0.jones.2:&lt;/p&gt;


&lt;code&gt;
sent 2527694620 bytes received 8760 bytes 6591143.10 bytes/sec
&lt;/code&gt;

	&lt;p&gt;It would appear &lt;span class="caps"&gt;SMB&lt;/span&gt; is faster.  I&amp;#8217;m not sure if this is a proper test or not.  I don&amp;#8217;t know if doing large file transfers like that is how iPhoto typically does it&amp;#8217;s I/O.  It seems convincing to me.  Also, is &lt;span class="caps"&gt;AFP&lt;/span&gt; a better &amp;#8220;experience&amp;#8221; on my Mac because it&amp;#8217;s Apple&amp;#8217;s protocol?  Honestly, I don&amp;#8217;t know why it would be.  The only difference I can perceive is typing &amp;#8216;smb://tigermp/photos&amp;#8217; versus &amp;#8216;afp://tigermp/Photos&amp;#8217;.&lt;/p&gt;


	&lt;p&gt;Speaking of which, this brings up an interesting aside.  I had setup netatalk quite a while back and had it working fine when both my Macs were running Panther.  I upgraded my wife to Tiger first and her &lt;span class="caps"&gt;AFP&lt;/span&gt; mount wouldn&amp;#8217;t work.  I struggled and couldn&amp;#8217;t figure it out, so I switched to Samba.  This weekend it was recommended I switch back to &lt;span class="caps"&gt;AFP&lt;/span&gt; and I quickly ran into the same issue.&lt;/p&gt;


	&lt;p&gt;I would try to mount the volume and my Mac would tersely say &amp;#8220;Couldn&amp;#8217;t mount the volume, &amp;#8216;photos&amp;#8217;&amp;#8221;.  My Linux server&amp;#8217;s logs were of no help.  They simply showed a login and an immediate logout.  So, I tried connecting via the command line:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
$ sudo mkdir /Volumes/photos
$ sudo mount -t afp afp://dalcorn:_my password_@tigermp/photos /Volumes/photos
mount_afp: the mount flags are 0000 the altflags are 0020
mount_afp: AFPMountURL returned error -5019, errno is 32
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;I couldn&amp;#8217;t find what error -5019 meant anywhere.  Eventually I noticed that in my &lt;code&gt;AppleVolumes.default&lt;/code&gt; I had specified:&lt;/p&gt;


&lt;code&gt;
/photos                 "Photos" veto:/lost+found/
&lt;/code&gt;

	&lt;p&gt;So, when I tried to mount the &lt;span class="caps"&gt;AFP&lt;/span&gt; volume using &amp;#8220;Photos&amp;#8221; instead of &amp;#8220;photos&amp;#8221; it worked like a champ.  Apparently, error -5019 means &amp;#8220;no such volume&amp;#8221;.  Also, since this used to work on Panther, but broke on Tiger I&amp;#8217;m assuming that means Tiger somehow became case sensitive on &lt;span class="caps"&gt;AFP&lt;/span&gt; URIs when Panther wasn&amp;#8217;t.&lt;/p&gt;


	&lt;p&gt;One last thing.  Since this post was originally about sharing iPhoto libraries I should mention that if you hold option down while launching iPhoto it will prompt you for which Library to open.  Simply choose one on the shared volume and you&amp;#8217;re good to go.&lt;/p&gt;</description>
      <pubDate>Mon, 28 Aug 2006 08:24:17 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:5b109b31-0ef6-4128-a01f-502cd100a515</guid>
      <author>Doug</author>
      <link>http://blog.lathi.net/articles/2006/08/28/iphoto-library-sharing-across-a-network</link>
      <category>System Administration</category>
      <category>Storycards</category>
      <category>Photography</category>
      <category>Mac OS X</category>
      <category>Linux</category>
      <category>Tiger</category>
      <category>Samba</category>
      <category>iPhoto</category>
      <category>Netatalk</category>
      <category>MacbookPro</category>
      <category>debian</category>
      <category>Apple</category>
    </item>
    <item>
      <title>"iPhoto Library Sharing Across a Network" by Jason Clark</title>
      <description>&lt;p&gt;Doug,&lt;/p&gt;


	&lt;p&gt;Great idea.  Have you tried eliminating the need to use Option when launching?  I share my library between users on one machine, by using symlinks.  Is it possible to replace your existing iPhoto library in your home dir with a symlink to the mounted volume?&lt;/p&gt;</description>
      <pubDate>Tue, 29 Aug 2006 10:24:53 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:415fb760-5160-4add-9a53-40be3b80da92</guid>
      <link>http://blog.lathi.net/articles/2006/08/28/iphoto-library-sharing-across-a-network#comment-281</link>
    </item>
  </channel>
</rss>
