From sacadmin Thu Aug 31 15:30:39 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k7VMUccW004546
	for <psarc@sac.eng.Sun.COM>; Thu, 31 Aug 2006 15:30:38 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.149.246.28])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id k7VMUFQe029170
	for <@sunmail2.sfbay.sun.com:psarc@sun.com>; Fri, 1 Sep 2006 06:30:37 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 id <0J4V00G39VUYV600@nwk-avmta-1.sfbay.Sun.COM> for psarc@sun.com
 (ORCPT psarc@sun.com); Thu, 31 Aug 2006 15:30:34 -0700 (PDT)
Received: from sfbaymail2sca.sfbay.sun.com ([129.145.155.42])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 with ESMTP id <0J4V006M1VUQ9SC0@nwk-avmta-1.sfbay.Sun.COM> for psarc@sun.com
 (ORCPT psarc@sun.com); Thu, 31 Aug 2006 15:30:27 -0700 (PDT)
Received: from billybob.sfbay.sun.com
 (billybob.SFBay.Sun.COM [129.146.224.123])	by sfbaymail2sca.sfbay.sun.com
 (8.13.6+Sun/8.12.10/ENSMAIL,v2.2) with ESMTP id k7VMUPQB012324; Thu,
 31 Aug 2006 15:30:26 -0700 (PDT)
Received: from billybob (billybob [129.146.224.123])	by billybob.sfbay.sun.com
 (8.13.7+Sun/8.13.7) with SMTP id k7VMUWdM567861; Thu,
 31 Aug 2006 15:30:32 -0700 (PDT)
Date: Thu, 31 Aug 2006 15:30:32 -0700 (PDT)
From: Shudong Zhou <szhou@billybob.sfbay.sun.com>
Subject: PSARC 2006/519 Metadevice Names in iostat/vmstat Output
To: psarc@sun.com
Cc: chris.horne@sun.com
Reply-to: Shudong Zhou <szhou@billybob.sfbay.sun.com>
Message-id: <200608312230.k7VMUWdM567861@billybob.sfbay.sun.com>
MIME-version: 1.0
X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.7_13 SunOS 5.11 i86pc i386
Content-type: TEXT/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-MD5: WNbf7/+AaQ6K/KORpGY87w==
X-PMX-Version: 5.2.0.264296
Status: RO
Content-Length: 3098

I'm sponsoring the following fasttrack for Chris Horne. The timer is
set to expire on 9/7/2006.

Shudong


Metadevice Names in iostat/vmstat Output

Summary

   Seeking patch binding for change in iostat(1M) output for svm
   metadevice names (md(7d)) - command output would still be unstable.

Proposal

   I am reimplementing the iostat(1M) code that determines the device
   name displayed by the '-n' option [1] to use the libdevinfo(3LIB)
   di_devlink interfaces[2].  As part of this, I am proposing a change
   in the way that md(7d) metadevice names are displayed by
   iostat(1M).

   The reason for the change is to make the behavior consistent for all
   combinations of local, remote, and 'friendly' [3] metadevice names.
   For metadevice names, the current code displays "d#" for local set
   metadevice, "md#" for friendly name local set metadevice, and
   "#/md#" for remote set metadevices.  The names with "md" in them
   represent direct use of the kstat names.

   Here are the changes I would like to make:

   1. The output should display friendly names when available:

      The project for svm friendly names [3] did not consider iostat
      output, so kstat names are currently displayed by '-n'.

      If a device was created with a friendly name "foo", iostat should
      display "foo" instead of the kstat name "md#" that is currently
      displayed.

   2. The metadevice output should be consistent local .vs. set:

      The current code displays "d#" for the local set, and "md#" for
      shared set.

   3. The metaset output should use the set 'name' instead of the set number.

      The current code displays a set number (like '1') instead of
      'setname'  (like 'red').

   4. The output should indicate the source of a name:

      The current output has no indication of the source of the name.
      Displaying "md" as the source of the name becomes important when
      we have multiple sources of friendly names (future enhancement
      associated with [4]).


Example:

   The following shows current and proposed 'iostat -xp' output,
   in order, for:

	- local set metadevice

	- friendly name ("foo") local set metadevice

   	- remote set metadevice. 

   Current:
   # iostat -xn
   0.0    0.0    0.0    0.0  0.0  0.0    0.0    5.9   0   0 d1
   0.0    0.0    0.0    0.0  0.0  0.0    0.1    5.0   0   0 md0
   7.4   11.2   44.1  214.0  0.0  0.8    0.2   43.9   0   6 1/md10

   Proposal:
   0.0    0.0    0.0    0.0  0.0  0.0    0.0    5.9   0   0 md/d1
   0.0    0.0    0.0    0.0  0.0  0.0    0.1    5.0   0   0 md/foo
   7.4   11.3   44.0  215.6  0.0  0.8    0.2   43.7   0   6 md/red/d10


References:

  [1]	iostat(1M) enhancements for device statistics
	http://sac.sfbay/PSARC/1996/430		added '-n' option

  [2]	libdevinfo devlinks interfaces
	http://sac.sfbay/PSARC/2000/310

  [3]	Bunnahabhain: Descriptive Name Support in SVM
	http://sac.sfbay.sun.com/PSARC/2005/153

  [4]	File System Driven Device Naming
	http://sac.sfbay/PSARC/2003/246

  [5]	Reorganizing and simplifying monitoring commands
	http://sac.sfbay/PSARC/2004/163


