USB mass storage devices larger than 2 TB?

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

 



I have a USB disk enclosure with four Seagate ST31000340AS drives in
it.  Each drive has 1953525168 sectors, so that's 7814100672
sectors total for the array, or 3.64 TB.  There is a mode switch on
the back of the array; according to the manual, when the switch is in
position A, it will present a single large volume even when over 2 TB,
which supposedly works with 64-bit Windows, or, with the switch in
position B, it will split itself into two volumes under 2 TB if
necessary.

Now, with a stock 2.6.30 kernel on sparc64, here's what happens when I
attach the enclosure with the mode switch in position B:

usb 3-3.6: new high speed USB device using ehci_hcd and address 10
usb 3-3.6: New USB device found, idVendor=0dc4, idProduct=0004
usb 3-3.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-3.6: Product: MGB Quadro
usb 3-3.6: Manufacturer: GalaxyMetalGear
usb 3-3.6: SerialNumber: 540323
usb 3-3.6: configuration #1 chosen from 1 choice
scsi4 : SCSI emulation for USB Mass Storage devices
scsi 4:0:0:0: Direct-Access     External  Disk 0          1.15 PQ: 0 ANSI: 4
sd 4:0:0:0: [sda] 3907050336 512-byte hardware sectors: (2.00 TB/1.81 TiB)
sd 4:0:0:0: [sda] Write Protect is off
sd 4:0:0:0: [sda] Mode Sense: 10 00 00 00
sd 4:0:0:0: [sda] Assuming drive cache: write through
sd 4:0:0:1: [sdb] 3907050336 512-byte hardware sectors: (2.00 TB/1.81 TiB)
sd 4:0:0:1: [sdb] Write Protect is off
sd 4:0:0:1: [sdb] Mode Sense: 10 00 00 00
sd 4:0:0:1: [sdb] Assuming drive cache: write through

Okay, that looks good.  Two LUNs of 3907050336 sectors each exactly
account for all the disk capacity I have installed.  I can run LVM
over them and get a single 3.6 TB volume.  The trouble starts when I
try to put the mode switch in position A:

usb 3-3.6: new high speed USB device using ehci_hcd and address 11
usb 3-3.6: New USB device found, idVendor=0dc4, idProduct=0004
usb 3-3.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-3.6: Product: MGB Quadro
usb 3-3.6: Manufacturer: GalaxyMetalGear
usb 3-3.6: SerialNumber: 540323
usb 3-3.6: configuration #1 chosen from 1 choice
scsi5 : SCSI emulation for USB Mass Storage devices
scsi 5:0:0:0: Direct-Access     External  Disk 0          1.15 PQ: 0 ANSI: 4
sd 5:0:0:0: [sda] 3519133184 512-byte hardware sectors: (1.80 TB/1.63 TiB)
sd 5:0:0:0: [sda] Write Protect is off
sd 5:0:0:0: [sda] Mode Sense: 10 00 00 00
sd 5:0:0:0: [sda] Assuming drive cache: write through

Now, it seems noteworthy that 3519133184 is just 7814100672 &
0xffffff00, but I'm not sure exactly what it means.  Noticing that the
code in sd_read_capacity() of drivers/scsi/sd.c tries READ
CAPACITY(10) first, and then uses READ CAPACITY(16) only if that
returns 0xffffffff, I tried patching it to always try READ
CAPACITY(16) first on this device.  That led to this (with verbose USB
mass storage messages enabled):

usb-storage: Command (unknown command) (16 bytes)
usb-storage:  9e 10 00 00 00 00 00 00 00 00 00 00 00 20 00 00
usb-storage: Bulk Command S 0x43425355 T 0x3 L 32 F 128 Trg 0 LUN 0 CL 16
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 32 bytes, 1 entries
usb-storage: Status code -32; transferred 0/32
usb-storage: clearing endpoint halt for pipe 0xc0008380
usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=81 len=0
usb-storage: usb_stor_clear_halt: result = 0
usb-storage: Bulk data transfer result 0x2
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x3 R 32 Stat 0x1
usb-storage: -- transport indicates command failure
usb-storage: -- unexpectedly short transfer
usb-storage: Issuing auto-REQUEST_SENSE
usb-storage: Bulk Command S 0x43425355 T 0x4 L 18 F 128 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 18 bytes, 1 entries
usb-storage: Status code 0; transferred 18/18
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x4 R 0 Stat 0x0
usb-storage: -- Result from auto-sense is 0
usb-storage: -- code: 0x70, key: 0x5, ASC: 0x20, ASCQ: 0x0
usb-storage: Illegal Request: Invalid command operation code
usb-storage: scsi cmd done, result=0x2

So, as far as I can tell, this means that this device doesn't support
READ CAPACITY(16).  Does anyone out there know anything else it might
be expecting?  I have no access to a Windows machine, so I can't
whether it really does work with 64-bit Windows.  Is this hardware
just buggy over 2 TB, or is there some other mechanism besides the
0xffffffff from READ CAPACITY(10), then READ CAPACITY(16) that it
could be using to indicate its capacity?

-- 
Andrea Shepard

Attachment: pgpl6pgHXeiAc.pgp
Description: PGP signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux