[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Re: multible partitions?



> Unluckily there is no output just running the command.
> Inserting my USB stick, than removing it leads to
> results - but they are not so friendly. Here
> comes dmesg stuff - a left the lines related to
> usb and FireWire, maybe this is of some use. The
> external disk issue is at the very ending:

Quick walkthrough:

Here's where the firewire core code loads the SCSI transport driver to
present firewire disks as SCSI disks:

> sbp2: $Rev: 1074 $ Ben Collins <bcollins@debian.org>
> ieee1394: sbp2: Driver forced to serialize I/O (serialize_io = 1)
> scsi0 : SCSI emulation for IEEE-1394 SBP-2 Devices
> blk: queue c11b0974, I/O limit 4095Mb (mask 0xffffffff)

and attaches one firewire disk to the SCSI transport:

> ieee1394: sbp2: Logged into SBP-2 device
> ieee1394: sbp2: Node 0-00:1023: Max speed [S400] - Max payload [2048]

What's missing here is crucial: there should be a SCSI device registered
here, usually sda. Not having anything SCSI related here is odd. What
happens in the kernel log when you try a mac-fdisk -l /dev/sda at this
stage?

> ...
> ...
> ...
> ...
> ...

Did you unplug or power down the firewire disk in between?

> #### Plugging USB stick in ...
>

Stick is recognized as disk device:

> hub.c: new USB device 00:07.2-1, assigned address 2
> usb.c: USB device 2 (vend/prod 0x58f/0x9380) is
> not claimed by any active driver.
> Initializing USB Mass Storage driver...
> usb.c: registered new driver usb-storage
> usb-uhci.c: interrupt, status 2, frame# 1377

and the usb-scsi transport driver is loaded (so the stick looks like a
SCSI disk to the system).

> scsi1 : SCSI emulation for USB Mass Storage devices

Note the scsi1 above: thats a different pseudo host adapter (scsi
controller) from above - firewire and usb are represented as different
buses.

Now the usb-scsi code goes looking for a disk:

>    Vendor: Generic   Model: Flash Disk        Rev: 7.77
>    Type:   Direct-Access                      ANSI SCSI revision: 02
> Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
> SCSI device sda: 128000 512-byte hdwr sectors (66 MB)
> sda: Write Protect is off
>   sda: sda1
> WARNING: USB Mass Storage data integrity not assured
> USB Mass Storage device found at 2
> USB Mass Storage support registered.

and found the first 'SCSI' device ever in the system. Which is odd,
because the firewire sbp2 driver ought to have located your firewire disk
before, making this one sdb.

>
> ### ... and out:
>
> usb.c: USB disconnect on device 00:07.2-1 address 2

Might be interesting to see what usb-storage has to tell here -
deregistering the sda1 disk perhaps. Or maybe it got automatically mounted
and not hasn't been unmounted yet (check the output of 'mount' before
unplugging it).

> ...
> ...
> ...
> ...
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
> HERE IT COMES:
>
> fdisk -l /dev/sda
>
> sda: Unit Not Ready, sense:
> Info fld=0xa00 (nonstd), Current 00:00: sns = 70  2
> Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
> sda : READ CAPACITY failed.
> sda : status = 1, message = 00, host = 0, driver = 08

host=0 says it's looking on the firewire bus - though it doesn't say which
SCSI ID was used. The READ CAPACITY command means the disk was detected as
such before (in the section you omitted), just never tried to mount. Unit
Not Ready means the disk might not be spun up (though the kernel usually
figures that out and sends a START UNIT command) or not powered on yet.
For the sbp2 logon to work, it might be sufficient to have the firewire
interface on the disk box up and running.

The rest is some bad guesses assuming the disk is up anyway, followed by
read errors because it isn't.

What's a bit odd here is how sda is used for both the USB and the firewire
device - please double check the kernel doesn't keep the USB stick
mounted or the partition data present after you unplugged it (check
/proc/partitions for that before and after unplugging the stick)-

> Info fld=0xa00 (nonstd), Current sd00:00: sns = 70  2
> Raw sense data:0x70 0x00 0x02 0x00 0x00 0x0a 0x00 0x00
> sda : block size assumed to be 512 bytes, disk size 1GB.
> sda: test WP failed, assume Write Enabled
>   sda: I/O error: dev 08:00, sector 0
>   I/O error: dev 08:00, sector 0
>   I/O error: dev 08:00, sector 2097144
>   I/O error: dev 08:00, sector 2097144
>   I/O error: dev 08:00, sector 0
>   I/O error: dev 08:00, sector 0
>   unable to read partition table

What kernel version does this happen on? Any difference if you plug in the
firewire disk _after_ the kernel has booted up?

I've had occasional trouble with the firewire disk not detected on boot,
but IIRC there never was a sbp2 logon either.

	Michael



Reply to: