![]() |
Technical
Tip
|
|
QUESTION
ANSWER 1. On the iSCSI SAN, export a device to the Solaris system. To experiment, you can create a ZFS emulated volume on another Solaris system, then set the shareiscsi property to on, for example:- # zfs create hpf/iscsivols # zfs create -V 10G -s hpf/iscsivols/iscsivolsparse Creates an emulated volume iscsivolsparse of size 10G using the sparse option -s. # zfs set shareiscsi=on hpf/iscsivols/iscsivolsparse Sets the shareiscsi property to on. # iscsitadm list target Target: hpf/iscsivols/iscsivolsparse iSCSI Name: iqn.1986-03.com.sun:02:afec6845-9217-e313-9af7-cbc214a2eb9b Connections: 0 Lists the shared iscsi targets. 2. (Optional) On the iSCSI Solaris server, use iscsitadm to control access if required, and perform general iSCSI admin tasks. See the man page for iscsitadm for examples and details. 3. Once the iSCSI volume is shared, perform the following commands on the logical domain Control Domain system:- # iscsiadm add discovery-address 192.168.200.41:3260 The address is that of the iscsi server. # iscsiadm modify discovery --sendtargets enable # devfsadm -i iscsi # format Searching for disks...done c1t2d0: configured with capacity of 10.00GB AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SEAGATE-ST9146802SS-S229 cyl 33916 alt 2 hd 8 sec 1056> /pci@7c0/pci@0/pci@8/scsi@2/sd@0,0 1. c0t1d0 <SEAGATE-ST9146802SS-S229 cyl 33916 alt 2 hd 8 sec 1056> /pci@7c0/pci@0/pci@8/scsi@2/sd@1,0 2. c1t2d0 <SUN-SOLARIS-1 cyl 32766 alt 2 hd 4 sec 160> /iscsi/disk@0000iqn.1986-03.com.sun%3A02%3Aafec6845-9217-e313-9af7-cbc214a2eb9b0001,0 The iscsi disk can be seen as disk number 2 in the format menu (highlighted), so select it:- Specify disk (enter its number): 2 selecting c1t2d0 [disk formatted] Disk not labeled. Label it now? y FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table etc.. format> pa ... partition> pr Current partition table (original): Total disk cylinders available: 32766 + 2 (reserved cylinders) Part
Tag
Flag Cylinders
Size
Blocks
0
root
wm
0
0
(0/0/0)
01 swap wu 0 0 (0/0/0) 0 2 backup wu 0 - 32765 10.00GB (32766/0/0) 20970240 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 0 - 32765 10.00GB (32766/0/0) 20970240 7 unassigned wm 0 0 (0/0/0) 0 partition> The format command has seen the disk as blank with no Sun label, and has created a default label suitable for our purposes. Quit from format Now create the virtual disk from the iSCSI disk:- # ldm add-vdsdev /dev/dsk/c1t2d0s2 iscsidisk1@primary-vds /dev/dsk/c1t2d0s2 is the device name the system created for the iscsi disk slice 2. You have to use slice 2 to export a whole disk. Now the disk can be used within an existing or new domain, for example, configuring a new domain hpfiscsi:- # ldm add-domain hpfiscsi # ldm add-mau 1 hpfiscsi # ldm add-vcpu 4 hpfiscsi # ldm add-memory 2G hpfiscsi # ldm add-vnet vnet0 primary-vsw0 hpfiscsi # ldm add-vdisk hpfiscsidisk iscsidisk1@primary-vds0 hpfiscsi Above assigns the iSCSI disk to the new domain as disk hpfiscsidisk. # ldm set-var auto-boot\?=true hpfiscsi # ldm set-var boot-device=hpfiscsidisk hpfiscsi # ldm bind-domain hpfiscsi # ldm start hpfiscsi Use ldm list hpfiscsi to discover the telnet port for the new domain, then login and commence the install.. iSCSI devices used in this way can also be assigned to existing LDOMs to provide additional disk resources. However, guest domains can access iSCSI exported devices directly just like any other "normal" Solaris system. For more information on Logical Domains why not attend our 1-day Logical Domains Administration course? How do I set up and configure a Zone in
Solaris 10? First Alternative course tutors can answer questions like this ... and are happy to do so. Look around our site for relevant courses in Linux -Unix - Perl - Solaris - FrameMaker |