jey jack, interesting idea. i'm not really familiar with NPIV, but i can make some general comments based on your examples below.
first off, doing a zonecfg should not change the state of the machine, allocate resources etc. all zonecfg can do is update the zone xml configuration file and verify it's contents. so things like allocating a virtual port in the global zone during zonecfg and the "npiv-attach" command don't really seem like a good idea to me. zone resources are actually allocated and initialized when moving into the zone ready state, which can be triggered via zoneadm(1m). also, the current ??wwn numbers seem very user unfriendly and easily prone to typing errors. couldn't these be managed in some central naming service? perhaps a new nsswitch.conf name service map? if that was the case then you could use a resource name that would map to the nubers below, and that resource could be available on all machines that are connected to the same fc fabric, there by making it easy to migrate zones around. if i'm totally offbase then just let me know since i haven't actually read up on how npiv works. take it easy, ed On Fri, Nov 02, 2007 at 10:45:32PM -0700, Ran Jack Meng wrote: > 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 > email@example.com _______________________________________________ zones-discuss mailing list firstname.lastname@example.org