From: Matt Domsch <Matt_Domsch@dell.com>
To: linux-scsi@vger.kernel.org, linux-hotplug-devel@lists.sourceforge.net
Subject: Re: [RFC][PATCH 2.6.11-rc2] Linux SCSI hotplug infrastructure
Date: Mon, 07 Feb 2005 18:30:50 +0000 [thread overview]
Message-ID: <20050207183050.GD16526@lists.us.dell.com> (raw)
In-Reply-To: <20050207182753.GA16526@lists.us.dell.com>
On Mon, Feb 07, 2005 at 12:27:53PM -0600, Matt Domsch wrote:
> /etc/hotplug/scsi_topology.agent
> handles the hotplug call, and invokes /sys/class/scsi_host/hostX/scan
> and /sys/class/scsi_device/H:C:T:L:/device/delete as appropriate.
And here's scsi_topology.agent.
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#!/bin/bash
#
# SCSI Topology hotplug agent.
# Copyright (C) 2005 Dell, Inc. <Matt_Domsch@dell.com>
#
# This is invoked when a device, not currently known to the system, is
# added or removed from a SCSI topology. This includes creation of a
# logical drive on a RAID controller, or manually inserting a disk
# into a SCSI disk enclosure. This script then invokes the scan
# method of the scsi_host, or the delete method of the scsi_device, to
# inform the kernel of the change made on the topology.
#
# SCSI_TOPOLOGY_EVENT_HCTL is used to know that the data to pass to
# scan is a Host:Controller:Target ID:LUN tuple. This is to provide
# for future SCSI implmentations that may use a native addressing
# scheme rather than only HCTL.
[ ${SCSI_TOPOLOGY_EVENT} != "1" ] && exit
[ ${SCSI_TOPOLOGY_EVENT_HCTL} != "1" ] && exit
if [ "${ACTION}" = "add" ]; then
MYPATH=/sys/class/scsi_host/host${SCSI_HOST}/scan
[ -f ${MYPATH} ] && echo "${SCSI_CHANNEL} ${SCSI_ID} ${SCSI_LUN}" > ${MYPATH}
fi
if [ "${ACTION}" = "remove" ]; then
MYPATH=/sys/class/scsi_device/${SCSI_HOST}:${SCSI_CHANNEL}:${SCSI_ID}:${SCSI_LUN}/device/delete
[ -f ${MYPATH} ] && echo "1" > ${MYPATH}
fi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2005-02-07 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-07 18:27 [RFC][PATCH 2.6.11-rc2] Linux SCSI hotplug infrastructure Matt Domsch
2005-02-07 18:29 ` Matt Domsch
2005-02-07 18:29 ` Matt Domsch
2005-02-07 18:30 ` Matt Domsch [this message]
2005-02-07 19:22 ` Brian King
2005-02-07 19:40 ` Matt Domsch
2005-02-08 23:19 ` Matt Domsch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050207183050.GD16526@lists.us.dell.com \
--to=matt_domsch@dell.com \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).