ZFS and Mac OS X Time Machine: The Perfect Team

A few months ago, I wrote about "X4500 + Solaris ZFS + iSCSI = Perfect Video Editing Storage". And thanks to you, my readers, it became one of my most popular blog entries. Then I wrote about "VirtualBox and ZFS: The Perfect Team", which turned out to be another very popular blog article. Well, I'm glad to introduce you to another perfect team now: Solaris ZFS and Mac OS X Time Machine.

Actually, it began a long time ago: In December '06, Ben Rockwood wrote about the beauty of ZFS and iSCSI integration, and immediatley I thought "That's the perfect solution to back up my Mac OS X PowerBook!" No more strings attached, just back up over WLAN to a really good storage device that lives on Solaris ZFS, while still using the Mac OS X native file system peculiarities. But Apple didn't have an iSCSI initiator yet (they still don't have one now) and the only free iSCSI initiator I could find was buggy, unstable and didn't like Solaris targets at all.

Then, Apple announced their Time Machine technology. Many people thought that this was related to them supporting ZFS and in fact, it's easy to believe that Time Machine's travels back in time are supported by ZFS snapshots. But they aren't. In reality, it's just a clever use of hardlinks. And not a very efficient one, too: Whenever a file changes, the whole file gets backed up again, even if you just changed a little bit of it.

Last week, a colleague of mine told me that Studio Networks Solutions had updated their globalSAN iSCSI Initiator software for Mac OS X and that it now works well with Solaris iSCSI targets. I decided to give it another try. So, here are two ZFS ZVOLs sitting on my OpenSolaris 2008.05 home server:

Sun Microsystems Inc.   SunOS 5.11      snv_86  January 2008
-bash-3.2$ zfs list -rt volume 
NAME                             USED  AVAIL  REFER  MOUNTPOINT
santiago/volumes/aperturevault  6.50G   631G  6.50G  -
santiago/volumes/mbptm           193G   631G   193G  -

They have both been shared as iSCSI targets through a single zfs set shareiscsi=on santiago/volumes command, thanks to ZFS' attribute inheritance:

-bash-3.2$ zfs get shareiscsi santiago/volumes
NAME              PROPERTY    VALUE             SOURCE
santiago/volumes  shareiscsi  on                local
-bash-3.2$ zfs get shareiscsi santiago/volumes/aperturevault
NAME                            PROPERTY    VALUE                           SOURCE
santiago/volumes/aperturevault  shareiscsi  on                              inherited from santiago/volumes
-bash-3.2$ zfs get shareiscsi santiago/volumes/mbptm
NAME                    PROPERTY    VALUE                   SOURCE
santiago/volumes/mbptm  shareiscsi  on                      inherited from santiago/volumes

On the Mac side, they show up in the globalSAN GUI just nicely:


And Disk Utility can format them perfectly as if they were real disks:

Disk Utility with 2 iSCSI disks 

Time Machine happily accepted one of the iSCSI disks and synced more than 190GB to it just fine and as I type these lines, Aperture is busy syncing more than 40GB of photos to the other iSCSI disk (it wouldn't accept a network share). Sometimes, they're busy working simultaneously :).

Of course, iSCSI performance heavily depends on network performance, so for larger transfers, a cable connection is mandatory. But the occasional Time Machine or Aperture sync in the background runs just fine over WLAN.

So finally, Solaris and Mac fans can have a Time Machine based on ZFS, with real data integrity, redundancy, robustness, two different ways of travelling through time (ZVOLs can be snapshotted just like regular ZFS file systems) and much more.

Many thanks to Christiano for letting me know and to the guys at Studio Network Solutions for making this possible. And of course to the ZFS team for a wonderful piece of open storage software!


Great news Constantin -- thanks a lot for this!

I'll give it a try and let you know how fast it goes on my trunked gigabit network between Mac Pro and ZFS fileserver :)

I'll do the same as you with my Aperture library vault -- also around 40GB of photos.


Posted by Simon Breden on July 02, 2008 at 07:33 AM CEST #

I was excited to read that you had success, as I had previously tried the same setup and had no success.

After reading your post I downloaded globalSAN_3.2.0.15.dmg and tested it.

The good news is the mac did not lock up as quickly, the bad news is it did still lock up, hard.

Has anyone had success with this configuration?

For the record I am running on a 2.16G Core2 imac with 2G RAM with 10.5.4.


Posted by Charles Menser on July 04, 2008 at 09:12 AM CEST #

Hi Charles,

thank you for your comment and sorry to hear about the lock up :(.

AFAIK, I'm using the version as well on a MacBook Pro (intel) and the latest OS (always SW update when available).

I've been using it for 2 weeks or so now and I didn't see a problem with the iSCSI. I have the volume mounted all the time and Time Machine backs up to it whenever it wants (once an hour or so) and I don't care about closing the lid or so.

Come to think of it, I did have one Panic (the gray screen that asks you to reboot), but I don't know whether it's globalSAN's fault or not. Need to observe a little more...


Posted by Constantin Gonzalez on July 04, 2008 at 09:35 AM CEST #

A few more details of my test:

charles@home-sun:~$ uname -a
SunOS home-sun 5.11 snv_91 i86pc i386 i86pc

charles@home-sun:~$ prtdiag
System Configuration: System manufacturer System Product Name
BIOS Configuration: Phoenix Technologies, LTD ASUS M2A-VM ACPI BIOS Revision 1501 10/26/2007

==== Processor Sockets ====================================

Version Location Tag
-------------------------------- --------------------------
AMD Athlon(tm) 64 X2 Dual Core Processor 5600+ Socket AM2

==== Memory Device Sockets ================================

Type Status Set Device Locator Bank Locator
------- ------ --- ------------------- --------------------
DDR2 in use 0 A0 Bank0/1
DDR2 in use 0 A1 Bank2/3
unknown empty 0 A2 Bank4/5
unknown empty 0 A3 Bank6/7

==== On-Board Devices =====================================

==== Upgradeable Slots ====================================

ID Status Type Description
--- --------- ---------------- ----------------------------
1 available PCI PCI1
2 available PCI PCI2
3 in use PCI Express PCIEX16
4 available PCI Express PCIEX1_1

Intel PRO/1000 PT Gig card

The Mac and the server were on a gig switch, and there was very little other activity on the switch.

I had the time machine preferences window open, was sshed into the opensolaris box, and had activity monitor showing me how the mac was doing.

I watched the first few hundred megs, then went to watch TV. I then logged into the server from my laptop in the den, and was watching the pool fill with zfs list.

One other note, I was also using gzip compression on the target, getting between 1.7 and 2.1 compression.

The Mac froze hard somewhere around 1.7Gs (out of 100+) transferred.

I think the Mac is the culprit, but I am not sure.

I would very much like this to work. :)


Posted by Charles Menser on July 04, 2008 at 10:38 AM CEST #

Hi Charles,

I may have found your issue. Apparently, you are using version of the globalSAN iSCSI Initiator. There is a newer release that is supposed to be much more stable, but slightly buried. It's available for download here: http://www.snsforums.com/index.php?showtopic=194

I'll check that I have the newest version too this evening.

Thanks to my colleague Christiano for pointing that out.

Hope this helps,

Posted by Constantin Gonzalez on July 09, 2008 at 04:49 AM CEST #

Just tried version Version (Beta).

Locks up shortly after connecting. Had to deinstall.

Microsoft iSCSI connector works fine to same server. \*sigh\*

Posted by shouki on July 10, 2008 at 12:37 PM CEST #

Post a Comment:
Comments are closed for this entry.

Tune in and find out useful stuff about Sun Solaris, CPU and System Technology, Web 2.0 - and have a little fun, too!


« July 2016