Share a Mac-formatted drive with a Linux server via iSCSI
Apr 01, '08 10:30:02AM
Contributed by: Zeitkind
Using ext3-formatted disks to create file-based iSCSI targets have one major drawback: They can only be read by another Linux machine with iSCSI. But what about attaching a pre-formatted drive as target?
Take a suitable Linux distro (eg. CentOS 5.1; it needs to have support for the Apple partition type in the kernel!) and install iSCSI Enterprise Linux (latest stable seems to run fine with Leopard). Attach the Mac-formatted drive to the machine, but do not mount it (you may if the distro has HFS+ support, but you don't need to). Let assume it's an external SCSI-RAID (or Firewire, USB) and is /dev/sda. You then create, in ietd.conf, a new target:
Target iqn.2008-03.local.linux:storage.sda3.raid
Lun 0 Path=/dev/sda3,Type=blockio
Depending on your server's hardware, a Type=fileio may give a better performance; you can simply try both out.
/dev/sda3 is the third Mac partition on the drive; you may have to find out which partition number is the correct one. Depending on the number of drivers (like for OS 9 support), it may vary up to sda5 or higher. Some versions of fdisk on Linux support Apple partition shemes, some not, but it might be a way to find out the right one. If your target is later mounted on the Mac and is unreadable and has only 48k ... then it's the wrong one.
Install an iSCSI initiator (Atto, Small Tree or the free globalSAN from SNS) on your Mac and connect to the target. It mounts fine and can be used just like a local disk. And if the server is down, take it back to any Mac with SCSI -- it's good to have the choice. A backup running on the Linux server itself may not be able to do a local backup -- or you can trust the HFS+ driver and mount the drive read-only.
Beware: iSCSI is quite new and many people had/have problems using it, but a drive shared like this can be used for TimeMachine.
[robg adds: I haven't tested this one.]
Comments (2)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080325190332998