What is iSCSI?
SCSI over TCP/IP.  iSCSI makes remote disks look local.  The remote host 
with storage resource presents iscsi targets.  The client accessing the 
storage is the initiator.  iSCSI initiator was present in S10 3/05 and 
up.  iSCSI target went into S10 8/07.

Why zones on iSCSI?
iSCSI frees you from the limitation of putting zones on local storage. 
The physical bits of the zoneroot can live anywhere accessible with a 
network connection.  You can use the zone detach/attach function without 
SAN or shared storage.  This ability circumvents a bunch of problems 
associated with zonepath on NFS mount, for example, see  RFE 4963321: 
hosting root filesystems for zones on NFS servers.

What's the catch?
Speed of zone installation and patching depends on how fast your network 
is.  Currently it doesn't look like you can do a standard upgrade on a 
box with zones on iSCSI LUNs because there's no iSCSI packages in the 

What works?
Installing and booting zones on iSCSI targets, patching in single-user 
mode, upgrading via LiveUpgrade.

How to do it?
This is a quick write-up.  I used ZFS zvol but this is not necessary. 
ZFS makes creating iscsi targets PAINLESS and takes only one command.  I 
placed the zonepath on a striped SVM volume because I was testing a 
specific config, for speed, and eventually I want to use an SVM mirror 
to provide redundancy for my zonepath.  Most outputs are omitted, what's 
provided is for clarity.

1. create the targets
2. client discovery of target
3. label disk, lay down SVM, filesystem
4. configure zones
5. apply recommended patch cluster, LU patch cluster
6. lucreate, luupgrade, luactivate

nvd is a box running snv_80 but S10 8/07 is just as good.  Client is 
running S10 8/07.

nvd# zpool create tran1 c0t18d0 c0t19d0
nvd# zpool create tran2 c0t20d0 c0t21d0
nvd# zfs create -V 16g tran1/xmen
nvd# zfs create -V 16g tran2/hulk
nvd# zfs set shareiscsi=on tran1/xmen
nvd# zfs set shareiscsi=on tran2/hulk
nvd# iscsitadm list target -v
Target: tran1/xmen
iSCSI Name: iqn.1986-03.com.sun:02:4a46145b-8b71-69ab-8cee-c8a9c4367f0a
Target: tran2/hulk
iSCSI Name: iqn.1986-03.com.sun:02:f57bbbf8-3504-4d9e-8c2b-ddfa45cfb641

~> iscsiadm add static-config iqn.1986-03.com.sun:02:4a46145
~> iscsiadm add static-config iqn.1986-03.com.sun:02:f57bbbf
~> iscsiadm modify discovery --static enable
~> devfsadm -i iscsi
~> iscsiadm list target -S
Target: iqn.1986-03.com.sun:02:f57bbbf8-3504-4d9e-8c2b-ddfa45cfb641
OS Device Name: /dev/rdsk/c5t01000003BA681D5F00002A0047E84932d0s2
Target: iqn.1986-03.com.sun:02:4a46145b-8b71-69ab-8cee-c8a9c4367f0a
OS Device Name: /dev/rdsk/c5t01000003BA681D5F00002A0047E84934d0s2

~> format
        8. c5t01000003BA681D5F00002A0047E84932d0 <SUN-SOLARIS-1 cyl 
32766 alt 2 hd4 sec 256>
           /scsi_vhci/[EMAIL PROTECTED]
        9. c5t01000003BA681D5F00002A0047E84934d0 <SUN-SOLARIS-1 cyl 
32766 alt 2 hd4 sec 256>
           /scsi_vhci/[EMAIL PROTECTED]
 > label
 > partition

[Striping, nologging and noatime for speed]
~> metainit d30 1 2 c5t01000003BA681D5F00002A0047E84932d0s0
c5t01000003BA681D5F00002A0047E84934d0s0 -i 32k
~> newfs -v /dev/md/dsk/d30
~> mount -F ufs -o nologging,noatime /dev/md/dsk/d30 /zones
[You need the mount-at-boot option == yes, otherwise it would not mount 
at boot, despite what the mount(1M) manpage says]
~> vi vfstab
/dev/md/dsk/d30 /dev/md/rdsk/d30 /zones ufs 1 yes nologging,noatime

~> zonecfg -z zone1
zonecfg:zone1> create
zonecfg:zone1> set zonepath=/zones/zone1 [...]
~> zoneadm -z zone1 install
~> zoneadm -z zone1 boot

{1} ok boot -s
Entering System Maintenance Mode
[iSCSI Initiator is present]
~> modinfo |grep -i iscsi
  36  13252e8  2b4a0 271   1  iscsi (Sun iSCSI Initiator v20061003-0)
[Target LUNS are present]
~> iscsiadm list target
Target: iqn.1986-03.com.sun:02:f57bbbf8-3504-4d9e-8c2b-ddfa45cfb641
Target: iqn.1986-03.com.sun:02:4a46145b-8b71-69ab-8cee-c8a9c4367f0a
[boot zones, apply patch cluster and LU patch cluster. sunsolve.sun.com 
has a new content management system.  The old Infodoc 72099 is now 
Document ID 206844:  Solaris[TM] Live Upgrade Software: Minimum Patch 
Requirements.  Make sure you apply all the required patches.  This will 
minimize your LU headaches.]

[Create and discover new targets for your /zones on the ABE.  This is 
d40 for me.]

~> lucreate -c s10u3 -C /dev/dsk/c1t0d0s0 -n s10u4
-m /:/dev/dsk/c2t0d0s0:ufs
-m -:/dev/dsk/c2t0d0s1:swap
-m /zones:/dev/md/dsk/d40:ufs
-l /var/adm/lu_error.log

~> luupgrade -u -n s10u4 -s

~> luactivate s10u4

You're done.  Hooray!  Longer write-up with output later.  On deck: zone 
detach and attach, upgrade on attach.


zones-discuss mailing list

Reply via email to