How to Create a ZFS Volume SCSI Logical Unit
ZFS, a file system that is part of OpenSolaris, combines the functionality of a file system and a volume manager. ZFS enables you to easily create storage pools and volumes that can provide data services, such as RAID, mirroring, snapshots, clones, and much more. For more information about ZFS, see the Solaris ZFS Administration Guide.
The following procedure initializes a ZFS volume and creates a logical unit as a backing store. In this example, the zpool uses six disks. The disks are located in the /dev/rdsk directory. The disks are labeled by ZFS, so they contain a single large slice and the data is dynamically striped across a slice. See the zpool(1M) man page for more information.
- Create a RAID-Z storage pool.
# zpool create pool_1 raidz c0t0d0 c0t1d0 c0t2d0 c0t3d0 c0t4d0 spare c0t5d0
- Create a 100–Gbyte volume named zvol1.
# zfs create -V 100G pool_1/vol_1
- Create a logical unit using the volume.
# sbdadm create-lu /dev/zvol/rdsk/pool_1/vol_1
Created the following LU: GUID DATA SIZE SOURCE -------------------------------- ------------------- ---------------- 6000ae40980000000000486a6f930002 107374116864 /dev/zvol/rdsk/pool_1/vol_1 - Verify the creation of the logical unit.
# sbdadm list-lu


Comments (4)
May 22, 2009
enriqueflores says:
step #4 should be changed from: # sbdadm list -lu to # sbdadm list...step #4 should be changed from:
to
I ran into the following when trying to run sbdadm list -lu :
# # sbdadm list -lu sbdadm: invalid subcommand Usage: sbdadm -?,-V,--help Usage: sbdadm create-lu [-?] Usage: sbdadm delete-lu [-?] Usage: sbdadm import-lu [-?] Usage: sbdadm list-lu [-?] Usage: sbdadm modify-lu [-?] # # # sbdadm list-lu Found 1 LU(s) GUID DATA SIZE SOURCE -------------------------------- ------------------- ---------------- 600144f01be68a0000004a1790e80001 107374116864 /dev/zvol/rdsk/data/scsi/lun000 # #Jun 23
DenaSteward says:
You are correct, Enrique. I have updated Step #4 to remove the space. Thanks!You are correct, Enrique. I have updated Step #4 to remove the space. Thanks!
Jun 17
ccyflai says:
Does it require to set shareiscsi property for ZFS volume in order to be an iSCS...Does it require to set shareiscsi property for ZFS volume in order to be an iSCSI target?
Jun 23
DenaSteward says:
Hi. You should not set the shareiscsi property on a ZFS volume if you are using ...Hi. You should not set the shareiscsi property on a ZFS volume if you are using COMSTAR. Doing so can activate the old user-space target which will cause unpredictable behavior.