Thursday, March 29, 2007

Solaris Express (Build 59), iSCSI vs Samba

While I was exploring ZFS, I stumbled upon the OpenSolaris (Solaris Express) supports iSCSI. So I got hold of another old Netra T1 200 for my testing.

I understand that you need to create volume from the ZFS pool, see zfs(1M) man page for details.

Here are the commands, with 100MB volume created

# cd /zdisk


# for i in z{0,1}{1,2,3,4,5,6,7,8,9} z20
do
mkfile 100m $i
done


# zpool create zpool \
raidz2 /zdisk/z0{1,2,3,4,5,6} \
raidz2 /zdisk/z0{7,8,9} /zdisk/z1{0,1,2} \
raidz2 /zdisk/z1{3,4,5,6,7,8} \
spare /zdisk/z19 /zdisk/z20


:
: iSCIS setup
:
# zfs create zpool/zfs_iscsi
# zfs create -V 100m zpool/zfs_iscsi/v100m
# zfs set shareiscsi=on zpool/zfs_iscsi/v100m


:
: samba setup
:
# zfs create zpool/zfs_samba
# chmod 777 /zpool/zfs_samba/
# cat /etc/sfw/smb.conf
[global]
        netbios name = netra
        server string = Netra T1 200
        security = share
        workgroup = WORKGROUP
        load printers = No
        interfaces = eri0
        bind interfaces only = Yes
        guest account = nobody

[NAS]
        comment = NAS for Windows
        path = /zpool/zfs_samba
        writable = Yes
        printable = No
        browseable = No
        create mode = 0640
        directory mode = 0750
        guest only = Yes
# svcadm enable samba
# iscsitadm list target
Target: zpool/zfs_iscsi/vol100m
    iSCSI Name: iqn.1986-03.com.sun:02:e39429ef-4e77-486d-b48b-8bd8c8f05dfe
    Connections: 0 

In Windows you need to do the following:

  1. Iinstall ISCSI Initiator.
  2. After installation, you will see "iSCSI Initiator" in the Control Panel.
  3. Launch iSCSI Initiator, add "Target Portals" under the "Discovery" tab.
  4. You should be able to see an entry in the Volume/Mount Point/Device under the "Bound Volumes/Devices" tab.
  5. Go the "My Computer" and right-click to launch "Manage"
  6. In the "Computer Management", you can see your Disk under the "Disk Management".
  7. Go ahead to partition and format it.
  8. A Drive with 100MB

It took 10.6s to copy a 20MB from my Dell Latitude D510 notebook to the server using Samba. As for iSCSI, it tooks 2.6s only, 4 times better!!

Labels: , , ,

0 Comments:

Post a Comment

<< Home