Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
appnotes:sanboot-zfs [2010/02/11 09:34]
necouchman created
appnotes:sanboot-zfs [2010/02/11 12:53] (current)
necouchman
Line 40: Line 40:
   * COMSTAR - SUNWstmf, SUNWiscsit, SUNWfcoet, SUNWsrpt - These packages provide the target framework that will allow clients to connect.   * COMSTAR - SUNWstmf, SUNWiscsit, SUNWfcoet, SUNWsrpt - These packages provide the target framework that will allow clients to connect.
  
 +Once you have Opensolaris installed, you need to make sure that the COMSTAR services are running. ​ You should enable stmf and whatever target services you need.  For iSCSI, enable iscsi/​target. ​ FC and SCSI, stmf is fine.  For FCOE, enable fcoe_target. ​ For SRP, enable ibsrb/​target.
  
 +After the services are running, you can move on to setting up ZFS as desired.
 +
 +===== 3) ZFS Pool & Volume Configuration =====
 +Now for the fun part - setting up ZFS!  First, how you set up ZFS depends heavily upon whether you've decided to use an external array presented as a single LUN to your Opensolaris machine or disks presented individually. ​ If you decide to use an external RAID array, simply create your storage pool with the one disk you have presented:
 +
 +''#​ zpool create <pool name> <​disk>''​
 +
 +Note that if you're not logged in as root you'll need a "​pfexec"​ or "​sudo"​ in front of that.  If you've decided to let ZFS manage the RAID, you'll need to do the following:
 +
 +''#​ zpool create <pool name> <RAID Type> <disk 1> <disk 2> <disk 3> <disk 4>... <disk n> <​spare>​ <disk x>​..."​
 +
 +Remember, RAID Type can be raidz1, raidz2, raidz3, or mirror. ​ If you do mirrors, separate each pair of disks with another "​mirror"​ command: ''​mirror <disk 1> <disk 2> mirror <disk 3> <disk 4>''​.
 +
 +Once your pool is created, you can start creating filesystems and volumes. ​ Filesystems aren't generally useful for iSCSI booting, as they'​re only exportable via NFS or CIFS.  For iSCSI or FC booting, we're really more interested in volumes. ​ Creating volumes with ZFS is done via the "zfs create -V" command. ​ The syntax is something like this:
 +''#​ zfs create -V <​size>​ [-s] <storage pool>/<​volume name>''​
 +
 +Size can be specified any number of ways - 3G, 1024M, etc.  The -s option enables thin provisioning,​ which sets the volume to a certain size but does not allocate the disk space. ​ This allows for flexibility in disk allocation - you can allocate more than you have without running out of disk - but also opens you to the risk that you'll fill up your disks with little or no warning. ​ So, if you decide to use thin provisioning,​ watch your volumes and storage pools closely to make sure you don't fill them up.

QR Code
QR Code appnotes:sanboot-zfs (generated for current page)