[4977] in linux-scsi channel archive
Re: Howto: rescan scsi bus after a hot swap ??
daemon@ATHENA.MIT.EDU (Chiaki Ishikawa)
Fri Oct 23 04:23:49 1998
Date: Fri, 23 Oct 1998 17:17:48 +0900 (JST)
From: Chiaki Ishikawa <Chiaki.Ishikawa@personal-media.co.jp>
To: mrfixit@clouddancer.com
CC: linux-scsi@vger.rutgers.edu, ncr53c810@Colorado.EDU
In-reply-to: <199810230746.AAA06629@lennie.clouddancer.com> (mrfixit@clouddancer.com)
X-PMC-CI-e-mail-id: 9194
Hello,
I am not sure what your hardware requirements are, but
>Now, I know it's possible, since the latest RAID5 can perform a hot
>reconstruction even when the drive devices reshuffle. I also wonder
>how to use the above method when I remove a drive and replace it with
>a different sized drive at the same ID.
let me assume that all hardware-related problems are solved one way or
the other (hot pluggability, etc.), then this is the outline of what
you can do in theory:
1. umount all the mounted files on the HD.
2. I think there is a delete-single-device that you can use.
The format is
echo "scsi delete-single-device H C I L" > /proc/scsi/scsi
so that you can let the controller forget(?) the
ID for a moment.
3. Exchange the hard disks.
(Again, whether you can do this electrically or not is up to your
particular hardware setup.)
4. Let linux recognize the hard disk at the given ID again using
echo "scsi add-single-device H C I L" > /proc/scsi/scsi
This ought to let linux recognize the new device...
However, I have to be honest.
I have not used delete-single-device SCSI subsystem command myself
although I used add-single-device command a lot.
I used add-single-device command to let a Tekram DC390 SCSI controller
recognize my SCSI 7 CDROM changer device: one CD at each LUN.
I add the CDROM one by one using add-single-device. It works just fine.
At boot time, I disabled the multi-lun scan of the DC390 due to
a problem with the OS/2 driver for the said card on the same machine.
This is why I have to add the logical units afterward manually.
I don't know if delete-single-device works with your particular
controller card. If I recall correctly the DC390 device driver had to
be tweaked to support add-single-device correctly (thanks to the
current maitainer of DC390 driver, Kurt Garloff).
Another thing that may complicate the procedure is what happens to the
/dev/sdX name assigned to the original disk. Say, in the step 4, is
the newly added disk given the SAME /dev/sdX name or the next
available name /dev/sdX'?
Eg. If the original disk was /dev/sdb,
do we get /dev/sdb for the new disk, or do we get
the next free name, say, /dev/sdd if we already have /dev/sda,
/dev/sdb, and /dev/sdc and have just removed the /dev/sdb in step 2?.
Naturally, we want the same name, say /dev/sdb in the above example.
But who knows?
--
Ishikawa, Chiaki ishikawa@personal-media.co.jp.NoSpam or
(family name, given name) Chiaki.Ishikawa@personal-media.co.jp.NoSpam
Personal Media Corp. ** Remove .NoSpam at the end before use **
Shinagawa, Tokyo, Japan 142-0051
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu