Diff for /wikisrc/tutorials/how_to_use_iscsi_to_support_an_apple_time_machine.mdwn between versions 1.4 and 1.6

version 1.4, 2019/04/15 13:38:38 version 1.6, 2019/04/15 18:51:24
Line 15  If you want to use these, there are docu Line 15  If you want to use these, there are docu
   
 However, the NetBSD [iSCSI](http://en.wikipedia.org/wiki/ISCSI) implementation is robust, and efficient, and will provide arbitrary client-side filesystems (such as HFS+, or Windows filesystems) because its presenting SCSI disk as raw blocks. These raw blocks are typically provided from a [sparse](http://wiki.netbsd.org/how_to_use_iscsi_to_support_an_apple_time_machine#Sparse_Files) file, in the NetBSD filesystem tree.  However, the NetBSD [iSCSI](http://en.wikipedia.org/wiki/ISCSI) implementation is robust, and efficient, and will provide arbitrary client-side filesystems (such as HFS+, or Windows filesystems) because its presenting SCSI disk as raw blocks. These raw blocks are typically provided from a [sparse](http://wiki.netbsd.org/how_to_use_iscsi_to_support_an_apple_time_machine#Sparse_Files) file, in the NetBSD filesystem tree.
   
 iSCSI talks about [targets](http://en.wikipedia.org/wiki/ISCSI#Target) (which is what a provider of an iSCSI disk is) and [initiators](http://en.wikipedia.org/wiki/ISCSI#Initiator) (which is what a client connecting to a given target is). -In this situation, NetBSD will be running as the target, via the [!template id=man name="iscsi-target" section="8"]] daemon. The client has to have an initiator, which can present the target as a device.   iSCSI talks about [targets](http://en.wikipedia.org/wiki/ISCSI#Target) (which is what a provider of an iSCSI disk is) and [initiators](http://en.wikipedia.org/wiki/ISCSI#Initiator) (which is what a client connecting to a given target is). -In this situation, NetBSD will be running as the target, via the [[!template id=man name="iscsi-target" section="8"]] daemon. The client has to have an initiator, which can present the target as a device. 
   
 In order to use this on OSX, you need an iSCSI initiator. One which is freely available is Studio Network Solutions [globalSAN iSCSI initiator](http://www.studionetworksolutions.com/products/product_detail.php?t=more&pi=11) for OSX. At the time of writing, the version which works for me on Snow Leopard is 3.3.0.43 which is distributed as a ZIP'ed DMG file.   In order to use this on OSX, you need an iSCSI initiator. One which is freely available is Studio Network Solutions [globalSAN iSCSI initiator](http://www.studionetworksolutions.com/products/product_detail.php?t=more&pi=11) for OSX. At the time of writing, the version which works for me on Snow Leopard is 3.3.0.43 which is distributed as a ZIP'ed DMG file. 
   
Line 54  The `/etc/iscsi/target` file can impleme Line 54  The `/etc/iscsi/target` file can impleme
   
 Be warned that the target name *has* to include a digit which will be translated to the SCSI 'LUN' number of the device for the client. Unless you know what you are doing, its best to leave this as 0 since the client may well demand only LUN0 is used.   Be warned that the target name *has* to include a digit which will be translated to the SCSI 'LUN' number of the device for the client. Unless you know what you are doing, its best to leave this as 0 since the client may well demand only LUN0 is used. 
   
 Once you have configured a target, you need to enable and start the [!template id=man name="iscsi-target" section="8"]] daemon. Edit `/etc/rc.conf` and enable `iscsi-target=YES`, and then you can run `/etc/rc.d/iscsi_target start` (it will start automatically on reboot once enabled in `/etc/rc.conf`)   Once you have configured a target, you need to enable and start the [[!template id=man name="iscsi-target" section="8"]] daemon. Edit `/etc/rc.conf` and enable `iscsi-target=YES`, and then you can run `/etc/rc.d/iscsi_target start` (it will start automatically on reboot once enabled in `/etc/rc.conf`) 
   
   
 #  Install iSCSI initiator   #  Install iSCSI initiator 
Line 101  Once this is completed, the disk is a no Line 101  Once this is completed, the disk is a no
   
 A sparse file is a special file-type which reports its 'size' in ls -l as the total it could be, if it was fully populated. However, until actual file blocks at given offsets are written, they aren't there: its a linked list. This permits a very fast growable file to a limit, but at some risk: if you accidentally touch it the wrong way, it fills in the holes. You just have to be careful. FTP for instance, doesn't honour sparse files. if you copy a file with FTP, the holes are filled in.   A sparse file is a special file-type which reports its 'size' in ls -l as the total it could be, if it was fully populated. However, until actual file blocks at given offsets are written, they aren't there: its a linked list. This permits a very fast growable file to a limit, but at some risk: if you accidentally touch it the wrong way, it fills in the holes. You just have to be careful. FTP for instance, doesn't honour sparse files. if you copy a file with FTP, the holes are filled in. 
   
 Sparse files were implemented in UNIX FFS a long time ago, and are in HFS+ as well. The behaviour of the tools like pax, rsync, tar, ftp has to be verified on a case-by-case basis. Its not clear if NetBSD [!template id=man name="pax" section="1"]] is safe or not. [rsync](http://pkgsrc.se/net/rsync) has the -S flag to preserve sparse files.   Sparse files were implemented in UNIX FFS a long time ago, and are in HFS+ as well. The behaviour of the tools like pax, rsync, tar, ftp has to be verified on a case-by-case basis. Its not clear if NetBSD [[!template id=man name="pax" section="1"]] is safe or not. [rsync](http://pkgsrc.se/net/rsync) has the -S flag to preserve sparse files. 
   

Removed from v.1.4  
changed lines
  Added in v.1.6


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb