Something strange going on?

Using eject doesn't seem to accomplish anything. There are no traces in /var/log/messages, and no re-scanning of the device if inserted afterwards.

Perhaps it's the kernel I'm using, it's currently 2.4.25 which I compiled myself (not something I'm practiced at - compiling yes, kernels no!). As it hasn't actually solved anything I'll go back to the known & stable 2.4.20 and try again.

Rick

--On 14 March 2004 21:03 -0800 Matthew Dharm <[EMAIL PROTECTED]> wrote:

That's odd...

Even if it gives that error message, it should accomplish the goal.

eject is, primarily, used for removeable media devices.  However, even on
fixed-media it forces the kernel to 'forget' the media parameters (size,
etc.), and forces them to be redetected.

If you eject in between removing and re-inserting, it should forget the
drive size and re-scan when you reattach.

Matt

On Sun, Mar 14, 2004 at 11:11:35AM +0000, Rick Jones wrote:
Nice idea, but in fact it doesn't work. It rejects /dev/sda as "invalid
argument".

As I understand it, the "eject" commands are used to exchange media in
removable-media drives, whereas USB hotplugging involves exchanging the
drive itself - subtly different. A hard drive connected to a USB port is
not flagged as "removable" in the sense of a CDROM or ZIP, etc.

There seems to be a fundamental flaw here, I can't believe that there
are  no Linux users who swap different size drives in the same USB port.

Either I'm missing something, or the rest of the world is (seems
unlikely)  :-/

Rick Jones

--On 13 March 2004 15:02 -0800 "Stephen J. Gowdy"
<[EMAIL PROTECTED]>  wrote:

> Try 'eject /dev/sda'.
>
> On Sat, 13 Mar 2004, Rick Jones wrote:
>
>> I have a problem doing a hot-swap of one USB drive with another, when
>> the two drives are different sizes.
>>
>> This appears to be because the pseudo-SCSI device entry that's created
>> when the first device is connected does not get cleared down when the
>> device is removed. The SCSI device loads the drive geometry table, and
>> this is persistent even when another drive is connected. The new
>> drive's partition info is at odds with the old geometry parameters,
>> which leads to various errors.
>>
>> This is on a 2.4 kernel - the distro I'm running (SME server) uses
>> 2.4.20, and I've tried building a 2.4.25 kernel but there's no
>> difference in behaviour.
>>
>> This site - http://www2.one-eyed-alien.net/~mdharm/linux-usb/ -
>> suggests that this behaviour is in fact by design, which seems
>> somewhat odd to me, unless I've misunderstood what is meant.
>>
>> Hot-plugging is a bit pointless if you can't swap devices of different
>> geometry, so I'm rather mystified at this restriction. Has this been
>> fixed in later kernels, and can a fix be hacked into 2.4?
>>
>> Or am I missing something and there's a completely different
>> explanation?
>>
>> TIA
>> Rick Jones
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by: IBM Linux Tutorials
>> Free Linux tutorial presented by Daniel Robbins, President and CEO of
>> GenToo technologies. Learn everything from fundamentals to system
>> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
>> _______________________________________________
>> [EMAIL PROTECTED]
>> To unsubscribe, use the last form field at:
>> https://lists.sourceforge.net/lists/listinfo/linux-usb-users
>>
>
> --
> /------------------------------------+-------------------------\
>| Stephen J. Gowdy                     | SLAC, MailStop 34,       |
>| http://www.slac.stanford.edu/~gowdy/ | 2575 Sand Hill Road,     |
>| http://calendar.yahoo.com/gowdy      | Menlo Park CA 94025, USA |
>| EMail: [EMAIL PROTECTED]       | Tel: +1 650 926 3144     |
> \------------------------------------+-------------------------/
>




------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to