Messages in this thread | | | From | "Bagalkote, Sreenivas" <> | Subject | RE: How to add/drop SCSI drives from within the driver? | Date | Wed, 8 Dec 2004 12:56:07 -0500 |
| |
> >On Wed, 2004-12-08 at 01:16, Bagalkote, Sreenivas wrote: >> Adding a drive:- For application to use sysfs to scan newly added >> drive, it needs to know the HCTL (SCSI address - Host, >Channel, Target >> & Lun) of the drive. Driver is the only one that knows the mapping >> between a drive and the corresponding HCTL. > >The real way I'd like to handle this is via hotplug. The >hotplug event would transmit the HCTL in the environment. >Whether the drive actually gets incorporated into the system >and where is user policy, so it's appropriate that it should >be in userland.
James, it is the application that is adding the drive. So it is not a hotplug event for the driver.
> >This same infrastructure could be used by fibre channel login, >scsi enclosure events etc. > >We have some of the hotplug infrastructure in SCSI, but not >quite enough for this ... you'll need an additional API. > >> Removing a drive:- There is no sane way for the application >to map out >> drives to /dev/sd<x>. If application has a way of knowing >the HCTL of >> a deleted drive, then using that HCTL, it can match the >corresponding >> SCSI device name (/dev/sd<x>) and use sysfs to remove that drive. > >Since The sysfs device name contains H:C:T:L surely you can >just do a find on /sys? > >James > >
Thank you, sreenivas - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |