Hi Folks,

I'm an engineer working on the NPIV project, 
http://opensolaris.org/os/project/npiv/, which is a method for virtualizing a 
FibreChannel Port.

It is considered useful in virtual environment as Xen and Logical Domain as 
each virtual system could have its own FC N_PORT_ID and storages via the 
virtual port and the virtual port could be still available after migration 
therefore associating storage.

However I'm thinking if NPIV could also be applied to Zones, and implementing a 
prototype.

The idea is to add a resource type as 'npiv' and three resource prop for it, 
'vpwwn'(virtual port WWN), 'vnwwn' (virtual node wwn) and 'ppwwn'(physical port 
wwn). A subcommand in global scope, 'npiv-attach' is also added to attach 
devices from the virtual FC port.

Here is a sript showing how it should work,
---------------------------------
[EMAIL PROTECTED]:$ 
/net/kungfu/export/home1/jack/zone/snv/usr/src/cmd/zonecfg/zonecfg -z 
my-zone
zonecfg:my-zone> info
zonename: my-zone
zonepath: /zone/my-zone
...................................
zonecfg:my-zone> add npiv
zonecfg:my-zone:npiv> set vpwwn=1000000000000011
zonecfg:my-zone:npiv> set vnwwn=1000000000000010
zonecfg:my-zone:npiv> set ppwwn=0100000000000000
zonecfg:my-zone:npiv> end (A virtual port will appear here in global zone)
zonecfg:my-zone> info
zonename: my-zone
zonepath: /zone/my-zone
.................
npiv:
        vpwwn: 1000000000000011
        vnwwn: 1000000000000010
        ppwwn: 0100000000000000
dedicated-cpu:
        ncpus: 1
        importance: 10
................
zonecfg:my-zone> npiv-attach
Attaching FC dev /dev/rdsk/c7t226000C0FFAA7AF9d1s2.
Attaching FC dev /dev/dsk/c7t226000C0FFAA7AF9d1s2.
Attaching FC dev /dev/rdsk/c7t226000C0FFAA7AF9d0s2.
Attaching FC dev /dev/dsk/c7t226000C0FFAA7AF9d0s2.
zonecfg:my-zone> info
zonename: my-zone
zonepath: /zone/my-zone
.............
net:
        address: 10.13.49.146
        physical: e1000g0
npiv:
        vpwwn: 1000000000000011
        vnwwn: 1000000000000010
        ppwwn: 0100000000000000
device:
        match: /dev/rdsk/c7t226000C0FFAA7AF9d1s2
device:
        match: /dev/dsk/c7t226000C0FFAA7AF9d1s2
device:
        match: /dev/rdsk/c7t226000C0FFAA7AF9d0s2
device:
        match: /dev/dsk/c7t226000C0FFAA7AF9d0s2
dedicated-cpu:
        ncpus: 1
        importance: 10
...................
zonecfg:my-zone> commit
zonecfg:my-zone> exit
----------------------------------
Reboot the zone then it sees FC devices
----------------------------------
[EMAIL PROTECTED]:$ zoneadm -z my-zone halt
[EMAIL PROTECTED]:$ zoneadm -z my-zone boot
[EMAIL PROTECTED]:$ zlogin -C my-zone
[Connected to zone 'my-zone' console]

Sep 25 01:47:07 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc.   SunOS 5.11      snv_64a October 2007
bash-3.00# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c7t226000C0FFAA7AF9d0 <DEFAULT cyl 1303 alt 2 hd 255 sec 63>
          sd65 at fp3 slave 555008
       1. c7t226000C0FFAA7AF9d1 <DEFAULT cyl 1303 alt 2 hd 255 sec 63>
          sd64 at fp3 slave 555009
Specify disk (enter its number):
-----------------------------------

Any comment on the idea and the prototype?

Thanks,
Jack
 
 
This message posted from opensolaris.org
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to