On Tue, 8 Feb 2000, remo strotkamp wrote:

> If I plug in a new harddisk at runtime, how do I get
> linux to recognize that new drive????

Look at /usr/src/linux/drivers/scsi/scsi.c - search for 'scsi
add-single-device' (also look at 'scsi remove-single-device').

Obviously this works only for hot-swappable SCSI stuff.

> Probably the things are rather easy if you replace an existing
> one with identical properties and partition tables....

Not really... In my experience, when I removed an existing disk without
first using the above mentioned 'scsi remove-single-device' command, the
specific disk ID (for example 0,0,2,0) would sort of hang and wouldn't be
removed/released later. Since my hot-swap backplane had fixed IDs I was
unable to add a new disk (since 0,0,2,0 was already in use and hung).

> But what about bad blocks for example??? Will it take over
> the bad blocks from the old drive or check the badblocks from
> the new one ( I mean I could still make a e2fsck -c over all the
> partitions to get around this)...

It's not as easy as just swaping the drives... It alway comes down to some
manual work (at least fdisk and raidhotadd). You have to manually create
the partition, but I don't know what happens with bad blocks (hopefully a
new replacement drive has none).

    D.

PS: If I'm doing something wrong, I'd love to be educated! :)

Reply via email to