Re: scsiadd - lets you add and remove scsi devices on the fly
On Wed, Nov 29, 2000 at 09:12:50AM +0000, Paul Slootman wrote:
> : An example: Two hard disks are currently managed by the Linux SCSI system.
> : This corresponds to the following mapping:
> :
> : SCSI ID 0 -> /dev/sd0
> : SCSI ID 2 -> /dev/sd1
> :
> : Now we add a third drive with ID 1. The Linux kernel will remap its
> : devices:
> :
> : SCSI ID 0 -> /dev/sd0
> : SCSI ID 1 -> /dev/sd1
> : SCSI ID 2 -> /dev/sd2
> :
> : You see, that the hard disk with SCSI ID 2 has changed its device
> : (from sd1 to sd2). As other parts of the kernel have not notices
> : this, you are likely to damage both disks /dev/sd1 and /dev/sd2
> : when reading/writing from them!!!
>
> In fact, the "new" disk with ID 1 will be mapped to the _third_
> disk, i.e. /dev/sdc, not /dev/sdb (why he uses sd0 etc. isn't quite
> clear to me). There is only a "problem" when rebooting with ID 1
> powered on.
Just use devfs.
[tv@hq ~]$ tree /dev/scsi
/dev/scsi
`-- host0
`-- bus0
|-- target4
| `-- lun0
`-- target6
`-- lun0
|-- disc
|-- part1
|-- part2
|-- part5
|-- part6
|-- part7
`-- part8
--
tv@{{hq.yok.utu,havoc,gaeshido}.fi,{debian,wanderer}.org,stonesoft.com}
unix, linux, debian, networks, security, | You step in the stream,
kernel, TCP/IP, C, perl, free software, | but the water has moved on.
mail, www, sw devel, unix admin, hacks. | This page is not here.
Reply to: