Skip to contentSkip to conversation

removable EIDE disks

DISCUSSION Joe Woodward 4 participants 4 messages Nov 7, 2000

lore
Share & tools
lore
#0 lore raw

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]

#1 lore raw
Quoted 4 lines

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Joe Woodward
Quoted 3 lines · Joe Woodward

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw
In reply to Joe Woodward
Quoted 16 lines

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.

Quoted 6 lines

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/