FreeBSD: Use ZFS volume as an iSCSI Target

Briefly, we can set the extent of iscsi-target to a ZFS volume…
But I have no idea what will happen if the size of extent is larger than it of the ZFS volume…:)

# zfs create -V 10g tank/iscsi
# cd /usr/ports/net/iscsi-target/ ; make install clean
# cat > /usr/local/etc/iscsi/targets
extent0         /dev/zvol/tank/iscsi     0       10GB
target0         rw      extent0
# /usr/local/etc/rc.d/iscsi_target forcestart

Now we can connect this iSCSI Target with some iSCSI initiator.

0 Responses to “FreeBSD: Use ZFS volume as an iSCSI Target”

  • No Comments

Leave a Reply