One of the really powerful features of Opensolaris when compared to Linux is the ZFS file system. While you can learn a LOT more about it here for this tutorial I am going to be focusing on how to setup a vanila install to allow ISCSI SAN style storage. Credit where credit is due, I learned alot from the following sites:
- prefetch.net
- probably.co.uk </p>
First (and oddly left out of most tutorials) you'll need to install the following packages:
pkg install SUNWiscsitgt<br />
pkg install SUNWiscsiNow we are going to create a empty disk (LUN) to store our data.
zfs create -V 1G pool/lun-nameObviously replace "pool" with your zfs storage pool name (zpool list) and "lun-name" with your desired LUN name. Now we need to set the LUN to be shared out over ISCSI:
zfs set shareiscsi=on pool/lun-nameYou can check the result with:
iscsitadm list targetThat's it, you can now use a tool like the Microsoft ISCSI initiator (found here) or ISCSI initiator for Linux and your off to the races! Mount the new drive, format and your ready to rock. In a future tutorial I'll cover some more specifics on tuning and ZFS raid1z etc.