Sometimes the administrator needs to make available all physical disks from a storage to another storage.

Share physical disks using iSCSI

Share physical disks using iSCSI

  • Storage A (192.168.150.1): This is the “master” that sees disks over iSCSI from the other storage
  • Storage B (192.168.150.2): This is the “slave” that only provides access via iSCSI to the “master” storage

The procedure is currently available only from “unsupported shell”, but will be made available in the web configuration interface with a future software update.

  1. Configure iSCSI initiator on Storage A (Master)
    root@StorageA:~# iscsiadm list initiator-node | grep 'Initiator node name: ' | awk '{print $4}'
    iqn.1986-03.com.sun:01:40503acc01ff.4f86ec2f
    root@StorageA:~# iscsiadm modify discovery --sendtargets enable
    root@StorageA:~# iscsiadm add discovery-address 192.168.150.2:3260
    
  2. Share physical disks from Storage B (Slave) 
    NOTE: Please note that disk names are in the form of c0t0d0, but you will have to create LUs overc0t0d0p0. If you receive an error when creating the LU, then you will have to recreate the disk layout by creating a temporary zpool over the drive and then destroy it:
    zpool create tmppool c4t3d0
    zpool destroy tmppool
    
    root@StorageB:~# config disk show
    Disks:
            c3d1 [16.01GB] (1,0) on Onbd1 type ssd
            c4t0d0 [2000.40GB] (0,0) on Onbd1 type sata
            c4t1d0 [2000.40GB] (0,1) on Onbd1 type sata
            c4t2d0 [2000.40GB] (0,2) on Onbd1 type sata
            c4t3d0 [2000.40GB] (0,3) on Onbd1 type sata
    root@StorageB:~# sbdadm create-lu /dev/rdsk/c4t0d0p0
    root@StorageB:~# sbdadm create-lu /dev/rdsk/c4t1d0p0
    root@StorageB:~# sbdadm create-lu /dev/rdsk/c4t2d0p0
    root@StorageB:~# sbdadm create-lu /dev/rdsk/c4t3d0p0
    root@StorageB:~# sbdadm list-lu
    
    Found 4 LU(s)
    
                  GUID                    DATA SIZE           SOURCE
    --------------------------------  -------------------  ----------------
    600144f0cae90c0000004f8e833d0001  2000398868480        /dev/rdsk/c4t0d0p0
    600144f0cae90c0000004f8e83430002  2000398868480        /dev/rdsk/c4t1d0p0
    600144f0cae90c0000004f8e83460003  2000398868480        /dev/rdsk/c4t2d0p0
    600144f0cae90c0000004f8e83490004  2000398868480        /dev/rdsk/c4t3d0p0
    root@StorageB:~# stmfadm create-hg StorageA
    root@StorageB:~# stmfadm add-hg-member -g StorageA iqn.1986-03.com.sun:01:40503acc01ff.4f86ec2f
    root@StorageB:~# stmfadm add-view -n 1 -h StorageA 600144f0cae90c0000004f8e833d0001
    root@StorageB:~# stmfadm add-view -n 2 -h StorageA 600144f0cae90c0000004f8e83430002
    root@StorageB:~# stmfadm add-view -n 3 -h StorageA 600144f0cae90c0000004f8e83460003
    root@StorageB:~# stmfadm add-view -n 4 -h StorageA 600144f0cae90c0000004f8e83490004
    
  3. Verify that disks are present on Storage A (Master), and create disk pool as needed
    root@StorageA:~# iscsiadm list target -vS
    Target: iqn.2010-08.org.illumos:02:37e6d3dc-592a-c109-fcf9-f653baeba77e
            Alias: -
            TPGT: 1
            ISID: 4000002a0000
            Connections: 1
                    CID: 0
                      IP address (Local): 192.168.150.1:37078
                      IP address (Peer): 192.168.150.2:3260
                      Discovery Method: SendTargets 
                      Login Parameters (Negotiated):
                            Data Sequence In Order: yes
                            Data PDU In Order: yes
                            Default Time To Retain: 20
                            Default Time To Wait: 2
                            Error Recovery Level: 0
                            First Burst Length: 65536
                            Immediate Data: yes
                            Initial Ready To Transfer (R2T): yes
                            Max Burst Length: 262144
                            Max Outstanding R2T: 1
                            Max Receive Data Segment Length: 32768
                            Max Connections: 1
                            Header Digest: NONE
                            Data Digest: NONE
    
            LUN: 4
                 Vendor:  SYNETO  
                 Product: COMSTAR         
                 OS Device Name: /dev/rdsk/c5t600144F0CAE90C0000004F8E83490004d0s2
            LUN: 3
                 Vendor:  SYNETO  
                 Product: COMSTAR         
                 OS Device Name: /dev/rdsk/c5t600144F0CAE90C0000004F8E83460003d0s2
            LUN: 2
                 Vendor:  SYNETO  
                 Product: COMSTAR         
                 OS Device Name: /dev/rdsk/c5t600144F0CAE90C0000004F8E83430002d0s2
            LUN: 1
                 Vendor:  SYNETO  
                 Product: COMSTAR         
                 OS Device Name: /dev/rdsk/c5t600144F0CAE90C0000004F8E833D0001d0s2
    root@StorageA:~# config disk show
    Disks:
            c3d1 [16.01GB] (1,0) on Onbd1 type sata
            c4t0d0 [2000.40GB] (0,0) on Onbd1 type sata
            c4t1d0 [2000.40GB] (0,1) on Onbd1 type sata
            c4t2d0 [2000.40GB] (0,2) on Onbd1 type sata
            c4t3d0 [2000.40GB] (0,3) on Onbd1 type sata
    Unmapped disks:
            c5t600144F0CAE90C0000004F8E833D0001d0 [2000.40GB]
            c5t600144F0CAE90C0000004F8E83430002d0 [2000.40GB]
            c5t600144F0CAE90C0000004F8E83460003d0 [2000.40GB]
            c5t600144F0CAE90C0000004F8E83490004d0 [2000.40GB]