RagHon Consulting
+47 98237711
  • Home
  • Services
  • Products
    • Oracle Enterprise Ops Center >
      • Links
      • Youtube
    • Self Extracting Zip Files
    • RC 2 SMF toolkit
    • RBAC aware user provisioning
    • Oracle Software
    • Oracle Hardware
    • Citrix Software
  • Partners
  • Blog
  • Contact
  • About
  • Support
    • Documents
  • Apps
  • Hjem

Iscsi on Solaris 11

15/2/2012

2 Comments

 
Install the iscsi services 
- pkg install group/feature/storage-server
- svcadm enable stmf

Backup current configuration
- svccfg export -a stmf >/var/tmp/COMSTAR
If needed restore configuration
- svccfg import /var/tmp/COMSTAR

Create a new lun
- zfs create -V 2g rpool/vol1
- stmfadm create-lu /dev/zvol/rdsk/rpool/vol1 
- stmfadm list-lu ; to get name of new lun id

Create a host group who are allowed to connect to the new lun (opional)
- stmfadm create-hg tx-nfs
Add members:
- stmfadm  add-hg-member -g tx-nfs iqn.1986-03.com.sun:node1
- stmfadm  add-hg-member -g tx-nfs iqn.1986-03.com.sun:node2

Create a view for the new lun, including access for the new host group
- stmfadm add-view -n 10 -h  tx-nfs 600144F0D2D88F0000004F3BF9E30001
        * -n 10 ; defines the lun number (optional)
        * -h tx-nfs ; defines the host group to allow access (optional)
        * -t ??? ; defines an optional target group
Enable iscsi target
- svcadm enable -r svc:/network/iscsi/target:default
Create iscsi targete
- itadm create-target  -n iqn.1986-03.com.sun:iscsi01 -l iscsi01   
     * -n ; an optional name for the iqn   
     * -l ; optional alias for the iqn


Test the new target using automatic discovery from the same or other server:
* Define a readable iqn name, and alias for the current server
    - iscsiadm modify initiator-node -A iscsi01 -N iqn.1986-03.com.sun:node1
* Enable static discovery 
   - iscsiadm modify discovery -s enable
* Add a static configuration for the new lun
   - iscsiadm add static-config iqn.1986-03.com.sun:iscsi01,10.0.1.51
* Look for new luns using devfsadm 
   - devfsadm -i iscsi

Verify the new lun:
- echo | format ; look for a lun named SUN-COMSTAR
- iscsiadm list target -S

Make a zfs pool on the new disk
* If the system is running on AMD/Intel (x86), fdisk the disk with a solaris partition
  - echo | format
      - identifiy the new disk; look for SUN-COMSTAR
  - fdisk -B c0t600144F0EA3E8C0000004F3BBA1C0001d0p0 # Add p0 to the end of the name
* Create the zpool
  - zpool create newpool c0t600144F0EA3E8C0000004F3BBA1C0001d0
2 Comments
    View my profile on LinkedIn

    Author

    Ragnar Hongset @ RagHon Consulting. Independent consultant with 9 years of experience working for SUN Microsystems, and 15+ years experience with Solaris systems.

    Archives

    Mai 2014
    Februar 2014
    Mars 2013
    Februar 2013
    Januar 2013
    April 2012
    Februar 2012
    November 2011

    Categories

    Alle
    Cheat
    Comstar
    Dns
    Encryption
    Ios
    Ipadm
    Iscsi
    Ledvil
    Mac
    Mpxio
    Nexenta
    Nsswitch.conf
    Opensolaris
    Oracle Virtual Desktop Infrastructure
    Osx
    Pgp
    Resolv.conf
    Smf
    S/MIME
    Snap
    Solaris
    Solaris 11
    Solaris 9
    Sun Ray
    Svccfg
    Svcs
    Trusted Extentions
    Tx
    Unix
    Vdi
    Windows
    Xp

    RSS-feed