zfs create and iSCSI target question.

Hello everybody :)

I'm new to FreeBSD and I hope, you can help me.

I created two ZFS "LUNS" for the "istgt" iSCSI target.

What is the difference between "zfs create -V 15G data/iscsi/lun01" and "zfs create data/iscsi/lun02"?
I know that the "-V" parameter will create a "/dev/zvol/" device, but where is the advantage regarding "zfs" and "istgt"?

I can also set quota and snapshots on both filesystems.

Code:
NAME                USED  AVAIL  REFER  MOUNTPOINT
data               15.5G   179G   221K  /data
data/iscsi         15.5G   179G  32.9M  /data/iscsi
data/iscsi/lun01    209K  15.0G   209K  none
data/iscsi/lun02   15.5G   194G  39.9M  -

Thanks!
 
kgatan said:
You have to use a block device for an iSCSI LUN. A file system can only be used for samba or NFS shares.
That's not right. Both variants, in the example above are working correctly.
 
dR3b said:
I created two ZFS "LUNS" for the "istgt" iSCSI target.
# zfs create -V 15G data/iscsi/lun01
# zfs create data/iscsi/lun02

Whether or not it works is irrelevant, you have not, according to your commands, created two LUNs. You have created 1) a LUN and 2) a ZFS filesystem. Where the right thing to use with iSCSI is 1). A ZFS filesystem is used for mounting on a directory and storing files and subdirectories inside, while a zvol is empty in the sense that it has no filesystem. You can also create a zvol, newfs that into UFS and mount that on a mountpoint, but it´s primary use is for swap or exporting with istgt or ggated. It is impossible to export a filesystem directory over iSCSI, because it cannot be formatted like a device can.

/Sebulon
 
Back
Top