Hi,

Last time I asked this question before, and I still can't make it right
after

your instructions.  I refer source code in "usba.c" and "blk2scsi.c" but

seems not doing good also.  Can anyone help me more ?

 

I have two sets of RAID-1 and each RAID-1 set contains 2 hard disks.

The following is device node listed 

/devices/[EMAIL PROTECTED],0/pci8086,[EMAIL PROTECTED]/pci1103,[EMAIL 
PROTECTED]/[EMAIL PROTECTED],0

/devices/[EMAIL PROTECTED],0/pci8086,[EMAIL PROTECTED]/pci1103,[EMAIL 
PROTECTED]/[EMAIL PROTECTED],0

 

Let's say device "sd0" is broken, and one new hard disk is added in

to replace it for rebuilding. In this case,  

1. I send "inquiry" command to get this new disk information, but how to

    update the information where driver received to device info structure

    (dev_info_t)?

2. I use "devfs_clean()" to clean "sd0" node but seems node is still there?

3. The node name and path seems no need to change, do I need to delete

    The node and recreate a new node? 

4. If needed, what functions should I use?

 

Please point out what should I do to make it work?

 

Thanks

Steve 

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2008 9:19 PM
To: Steve Chang
Cc: [EMAIL PROTECTED]; [email protected];
[EMAIL PROTECTED]
Subject: Re: [driver-discuss] SCSI RAID HBA question?

 

Steve Chang wrote: 

I want to know how to do it in driver 
 
 
Steve 
  
This would amount to a dynamic reconfiguration, equivalent of a hotplug. 
There are no public interfaces or storage hot plug framework available so
far in Solaris, for automatic, on-demand storage reconfiguration initiated
by the driver. Your driver would have to perform necessary node creation and
removal of the old device nodes. Essentially, it would need to support
device hot plugging (you are just adding a new device and removing old
devices).
James has already told you how to remove old nodes. Creating new nodes is
somewhat more involved - you may look at self-enumerating drivers like sata
or usb that support hot-plugging. However, ndi_* nexus interfaces are not
public interfaces and drivers that are not integrated in Solaris source tree
should not rely on these interfaces stability.
 
-Pawel
 
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2008 2:20 PM
To: Steve Chang
Cc: [EMAIL PROTECTED]; [email protected]
Subject: Re: [driver-discuss] SCSI RAID HBA question?
 
Steve Chang wrote:

Use "devfsadm" in driver?
    

 
No, Jesse was talking about using devfsadm from the command line.
 
  

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2008 9:39 AM
To: Steve Chang
Cc: [email protected]
Subject: Re: [driver-discuss] SCSI RAID HBA question?
 
 
devfsadm(1M)
 
I usually use -C to remove stale devices, and -v for verbose output.
 
On Jun 10, 2008, at 10:31 AM, Steve Chang wrote:
 
    

Hi,
When I create a RAID configuration on my HBA, the system device
node still recognize the old single disks information. How to
force/notify the system that configuration is changed and create
a new device node? In scsi_tran, which function call can be used
for that?
      

 
 
Inside your driver you should use
 
devfs_clean and
ndi_devctl_device_remove.
 
The comments in usr/src/uts/common/os/sunndi.c for ndi_devctl_device_remove
are quite handy, and point to the DEVCTL_DEVICE_REMOVE ioctl.
 
 
cheers,
James
--
Senior Kernel Software Engineer, Solaris
Sun Microsystems
http://blogs.sun.com/jmcp       http://www.jmcp.homeunix.com/blog
 
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss
  

 

_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to