This is the website of an IT geek, technologist, freelance writer, photographer, musician, rock climber, classic mini enthusiast, iPad and Mac zealot.
You have been warned.
Using Time Machine over iSCSI for Mac OS clients
In this article, we're going to look configuring access to an iSCSI server from Mac OS X. In particular, this will be useful for Time Machine backups; this is what I do at home for my macs.
To get started, download the GlobalSAN iSCSI initiator from Studio Network Solutions (Version 4.0.0.204). This can be installed by extracting the zipped disk image and running the installer package.
A reboot will be necessary I'm afraid. (WTF? Reboot my Mac?! Yeah, yeah, I know.)
After the reboot, configure the iSCSI Target Daemon. I'm using istgt on FreeBSD. You'll have equal success with something like OpenFiler.
I've set up the following in /usr/local/etc/istgt/istgt.conf:
[PortalGroup1]
Comment "iSCSI Server"
Portal DA1 192.168.16.247:3260
The PortalGroup is the IP address (and port) of the iSCSI target server. The following sets up the definition of the initiator. You can define your own initiator within the GlobalSAN software, so you can use what you like here. I've made mine authentic; the iqn.2005-03.com.sns correctly represents the makers of the GlobalSAN software.
[InitiatorGroup6]
Comment "MacBook Pro Work"
InitiatorName "iqn.2005-03.com.sns:mac-macbookprosc.network.local"
NetMask 192.168.16.0/24
The LUN statements that follow defines the logical disks that will be shared via iSCSI. I had to create these volumes first. As I'm using FreeBSD 8 with ZFS as a backend, I just used:
files01# zfs create -s -V 100G data/iscsi/tm_macbookprosc
files01# zfs create -s -V 100G data/iscsi/vms_macbookprosc
Note that I'm actually creating two 100gig thin provisioned volumes for my MacBook Pro to use. One for TimeMachine and the other for storing virtual machine disk files for VMware fusion when I'm at home. Much faster than a single disk spindle!
[LogicalUnit7]
Comment "MacBook Pro Time Machine Disk"
TargetName macbookprosctm
TargetAlias "Time Machine"
Mapping PortalGroup2 InitiatorGroup6
AuthMethod Auto
AuthGroup AuthGroup1
UnitType Disk
LUN0 Storage /data/iscsi/tm_macbookprosc 100G
[LogicalUnit8]
Comment "MacBook Pro Virtual Machine Disk"
TargetName macbookproscvms
TargetAlias "VMS"
Mapping PortalGroup2 InitiatorGroup6
AuthMethod Auto
AuthGroup AuthGroup1
UnitType Disk
LUN0 Storage /data/iscsi/vms_macbookprosc 100G
Reload the istgt daemon (/usr/local/etc/rc.d/istgt restart).
Now we need to connect to them using GlobalSAN. This is a preference pane.
There are only a few steps to complete.
Firstly, set the IQN to match that used in your InitiatorGroup.
Then add a new portal, using the IP address you set up in your PortalGroup setting.
The GlobalSAN initiator will immediately pick up your new disk(s). You need to click the 'Persistent' box and they will be connected to your Mac as a brand new unformatted harddisk.
You should get a pop up asking you to initialise the disk, which you must do in Disk Utility. (Erase the disk and give it a meaningful name). iSCSI volumes are presented to OS X as if they are raw hard disks; this is a different way of thinking than NAS storage over AFP or CIFS, which is why it is robust enough for TimeMachine backups.
Once the format of the disk has completed, it should appear in your list of harddisks as shown here. Notice that the icon for the Virtual Machines volume is a black 'GlobalSAN' icon, while the Time Machine volume has changed to the Apple Time Machine icon. This happens when you select this disk for backups in the Time Machine configuration.
To setup Time Machine, open the System Preferences page and select Time Machine. Turn Time Machine 'on' and use Select Disk to choose your new iSCSI volume. Then you may wish to configure TM to avoid backing up some areas of your disk. I don't tend to back up my 100GB of virtual machines or my DVD/DIVX movies via TM.
Options:
Now sit back and wait while the backups happen. :-)
- Log in to post comments









Recent comments