2000-11-07 11:33:53

by Joe Woodward

[permalink] [raw]
Subject: removable EIDE disks

I am trying to use removable EIDE hard disks on a Red Hat Linux 6.1 machine, for backup / walknet purposes.

Issuing a BLKRRPART ioctl call immediately after changing the disk works, but only if the new disk is no larger than the disk present at boot time (smaller and equal capacity disks work OK).

How do I get Linux to recognise that the media in /dev/hdc has changed?

Bill Nottingham suggested that I ask you, as he is unsure if this is a bug or if there is a technique that I am missing.


Thanks

Richard Stanton

[email protected]


2000-11-07 12:29:07

by Alan Cox

[permalink] [raw]
Subject: Re: removable EIDE disks

> works, but only if the new disk is no larger than the disk present at =
> boot time (smaller and equal capacity disks work OK).
>
> How do I get Linux to recognise that the media in /dev/hdc has changed?

I imagine your disks are not reporting themselves as 'removable' ? If they
correctly report removable then umount/mount would do the necessary I think.
It certainly does for magneto-optical

2000-11-07 12:37:48

by Andries Brouwer

[permalink] [raw]
Subject: Re: removable EIDE disks

On Tue, Nov 07, 2000 at 11:12:00AM -0000, Joe Woodward wrote:

> I am trying to use removable EIDE hard disks
>
> Issuing a BLKRRPART ioctl call immediately after changing the disk works

It should not be necessary to use BLKRRPART.
Does the disk advertise itself as removable?

% dmesg | grep remov
Detected scsi removable disk sda at scsi1, channel 0, id 6, lun 0

Andries

2000-11-07 13:07:31

by Justin Schoeman

[permalink] [raw]
Subject: Re: removable EIDE disks

> Joe Woodward wrote:
>
> I am trying to use removable EIDE hard disks on a Red Hat Linux 6.1
> machine, for backup / walknet purposes.
>
> Issuing a BLKRRPART ioctl call immediately after changing the disk
> works, but only if the new disk is no larger than the disk present at
> boot time (smaller and equal capacity disks work OK).
>
> How do I get Linux to recognise that the media in /dev/hdc has
> changed?
>
> Bill Nottingham suggested that I ask you, as he is unsure if this is a
> bug or if there is a technique that I am missing.
>
>
> Thanks
>
> Richard Stanton
>
> [email protected]
>

Try using the HDIO_SCAN_HWIF ioctl instead. This is what I have been
using, and it work(ed) just fine. (It seems to result in hard locks on
the newer 2.2.x, where x>14, kernels though).

-justin