Solaris 11 - sshd and iSCSI Initiator

I just installed the latest Solaris Express Release into an VMware Virtual Machine. For the installation I used the "reduced network Cluster".

-bash-3.00$ cat /var/sadm/system/admin/CLUSTER
CLUSTER=SUNWCrnet

To get the SSH Daemon working I used the following commands:

-bash-3.00# mount -F hsfs /dev/dsk/c1t0d0p0 /mnt
-bash-3.00# cd /mnt/Solaris_11/Product/
-bash-3.00# pkgadd -d . SUNWgssc SUNWgss \
SUNWsshcu SUNWsshdr SUNWsshdu SUNWsshr SUNWsshu
-bash-3.00# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
-bash-3.00# ssh-keygen -t dsa -f/etc/ssh/ssh_host_dsa_key
-bash-3.00# svcadm enable network/ssh
-bash-3.00# svcs -xv network/ssh
svc:/network/ssh:default (SSH server)
 State: online since Fri Aug 11 12:24:14 2006
   See: man -M /usr/share/man -s 1M sshd
   See: /var/svc/log/network-ssh:default.log
Impact: None.

[Update:] To generate the SSH-Keys for sshd you could also use:

bash# /lib/svc/method/sshd -c

Afterwards I made some experiments with the included iSCSI Initiator. For the tests I used my existing Linux iSCSI Enterprise Target Installation. To configure the Solaris Initiator I used:

bash-3.00# iscsiadm modify discovery -t enable
bash-3.00# iscsiadm add discovery-address 192.168.74.1:3260
bash-3.00# iscsiadm list target
Target: iqn.2004-03.de.fm-berger:w0004:iscsi_demo01
        Alias: -
        TPGT: 1
        ISID: 4000002a0000
        Connections: 1
Target: iqn.2004-03.de.fm-berger:w0004:iscsi_demo02
        Alias: -
        TPGT: 1
        ISID: 4000002a0000
        Connections: 1
bash-3.00# devfsadm -c iscsi
bash-3.00# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0 
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c3t0d0 
/iscsi/disk@0000iqn.2004-03.de.fm-berger%3Aw0004%3Aiscsi_demo010001,0
2. c3t1d0 
/iscsi/disk@0000iqn.2004-03.de.fm-berger%3Aw0004%3Aiscsi_demo020001,0
Specify disk (enter its number): 1
selecting c3t0d0
[disk formatted]
format> inq
Vendor:   IET
Product:  VIRTUAL-DISK
Revision: 0
format> quit
bash-3.00# newfs /dev/rdsk/c3t0d0s2
newfs: construct a new file system /dev/rdsk/c3t0d0s2: (y/n)? y
/dev/rdsk/c3t0d0s2:
4186112 sectors in 1022 cylinders of 128 tracks, 32 sectors
2044.0MB in 45 cyl groups (23 c/g, 46.00MB/g, 11264 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 94272, 188512, 282752, 376992, 471232, 565472, 659712
bash-3.00# mkdir /foo
bash-3.00# mount /dev/dsk/c3t0d0s2 /foo/
bash-3.00# df -ah
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0d0s0        536M   283M   199M    59%    /
/dev/dsk/c3t0d0s2      1.9G   2.0M   1.9G     1%    /foo

You can find more about iSCSI under Solaris in the "System Administration Guide: Devices and File Systems" Chapter 15 Configuring Solaris iSCSI Initiators (Tasks).