rajiv.sg

Rajiv M Ranganath's homepage

Configuring OS X Mountain Lion Time Machine to Work With CIFS (SMB) Share

In this post and its accompanying screencast I’ll share with you how to configure Mountain Lion (10.8.2) Time Machine to work with a CIFS (SMB) share.

Why supporting CIFS important?

CIFS is the most common file sharing protocol. Most NAS devices for backup and archiving provide reliable CIFS support. However, support for AFP, which has been Apple’s preferred way for communicating between Time Machine and Time Capsule has been marginal at best.

Therefore I’m hoping that this information will be useful to some of you. Also, if you think this post and screencast can be improved, please let me know.

Creating Sparsebundle

The first step would be to create a sparsebundle disk image. We’ll do this using the hdiutil command.

1
$ hdiutil create -size 750g -type SPARSEBUNDLE -fs "HFS+J" Macbook-Pro-Backup.sparsebundle 

Once the sparsebundle is created, you’ll need to re-partition the image and move it onto a CIFS share. This is explained in the following screencast (I recommend watching it at 480p resolution).


Configuring Time Machine

By this point, you should have created and moved your sparsebundle onto a CIFS share and mounted it from the network.

In this section, I’ll explain the steps involved in configuring Time Machine followed by a screencast demonstrating how everything works.

Start with diskutil list command, which will list all the mounted disks. Find the device identifier for CIFS Timemachine Backup volume. You should then enableOwnership for that device.

1
2
3
4
5
6
7
8
9
$ diskutil list                                                                                   

[...]

/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *805.3 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS CIFS Timemachine Backup 805.0 GB   disk1s2

In the above case, disk1s2 is the device identifier for CIFS Timemachine Backup volume. To enableOwnership for this disk we use sudo diskutil enableOwnership /dev/disk1s2 command.

1
2
3
$ sudo diskutil enableOwnership /dev/disk1s2                                                      
Password:
File system user/group ownership enabled

Verify that this worked, by using the command diskutil info disk1s2 and make sure that you see the line Owners: Enabled.

1
2
3
4
5
6
7
8
9
$ diskutil info disk1s2                                                                           

[...]

   File System Personality:  Journaled HFS+
   Type (Bundle):            hfs
   Name (User Visible):      Mac OS Extended (Journaled)
   Journal:                  Journal size 65536 KB at offset 0x1770000
   Owners:                   Enabled

The volume is now configured for use with Time Machine. Next step would be to tell Time Machine to use this volume for backup. We use sudo tmutil setdestination to do this.

1
2
$ sudo tmutil setdestination /Volumes/CIFS\ Timemachine\ Backup
Password:

To verify that Time Machine has accepted the backup destination, run the command tmutil destinationinfo

1
2
3
4
5
6
$ tmutil destinationinfo                                                                          
====================================================
Name          : Time Machine Backup
Kind          : Local
Mount Point   : /Volumes/Time Machine Backup
ID            : 9DA4C1ED-81BC-4CE3-A473-7F3B59C22986

Following screencast walks you through the remaining steps.


So Long, It’s Been Good to Know You Nokia!

Today, I’m leaving Nokia to start a new company Atihita Inc. In the coming months and years, I’ll be blogging a lot more about Atihita. For this post, I want to take a moment to reflect back.

My Trolltech (and later Nokia) journey started during the spring of 2007, when I was invited for an interview to Oslo, Norway. It was my very first trip to Scandinavia.

I don’t say this often, but if Norway had California weather, I would probably have liked Norway better. Norwegians are very nice people and Trolltech was a extremely special place to work. I hope to grow Atihita with a similar set of values, like the ones that made Trolltech great.

Working Through SICP Pattern Matching and Rule-based Substitution Lecture With MIT Scheme

Last week I spent time working through SICP lecture - 4A: Pattern Matching and Rule-based Substitution.

This lecture is really fascinating in the way it introduces ideas around creating a language for dealing with rules and then using eval as a way to simplify rules. Today we see web app frameworks (especially the ones written in JavaScript and Ruby) use this pattern over and over again, but what is remarkable is to realize that the basic idea around this design goes back to the early 1980s.

Re-learning Stats and Learning Functional Programming in R

For sometime now, I’ve been spending my free cycles trying to re-learn statistics and learn functional programming. In the first part of this post, I’ll briefly touch upon my motivations for doing this. Then I’ll use an example to illustrate programming logic that can be imperatively and functionally decomposed, and why the latter approach might be better in many cases. Just be to clear, I’m not advocating functional programming as a silver bullet. It might be, or it might not be, and we don’t know yet.