Ubuntu – Only 746.52 GB of 3TB drive is seen when accessed via USB enclosure. Works fine internally

kernelsatausb-driveusb-storage

I have a Mediasonic Smart Drive SuperSpeed 3.5" SATA HDD External Enclosure – USB 3.0 [HD6-SU3-BK]. It has the VIA VL700 – Super-Speed USB 3.0 to SATA controller which is supposed to support 3TB drives. The drive is an Advanced Format 3TB WDC WD30EZRX. I'm running 64bit Oneiric with the standard 3.0.0-16-generic kernel.

usb controller:
                       ATI SB700/SB800 USB OHCI0 Controller
                       ATI SB700/SB800 USB EHCI Controller
                       ATI SB700/SB800 USB OHCI0 Controller
                       ATI SB700/SB800 USB EHCI Controller
                       ATI SB700/SB800 USB OHCI2 Controller
                       ATI SB700/SB800 USB OHCI0 Controller
                       ATI SB700/SB800 USB EHCI Controller
                       NEC USB Controller

When the drive is connected to the internal SATA controller, I can access the whole 3TB, partition it with a GPT table and format it using XFS. When I put the drive in the enclosure, I can only see 746.52 GB.

Here's how the kernel sees the drive when it's connected to the internal SATA interface.

2.855426] scsi 6:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00M 80.0 PQ: 0 ANSI: 5
[    2.855608] sd 6:0:0:0: [sdc] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[    2.855611] sd 6:0:0:0: [sdc] 4096-byte physical blocks
[    2.855619] sd 6:0:0:0: Attached scsi generic sg2 type 0

Here's how the kernel sees the drive when connected via the USB enclosure.

[605703.368137] usb 2-5: new high speed USB device number 3 using ehci_hcd
[605703.830770] Initializing USB Mass Storage driver...
[605703.831288] scsi10 : usb-storage 2-5:1.0
[605703.831626] usbcore: registered new interface driver usb-storage
[605703.831632] USB Mass Storage support registered.
[605719.251982] scsi 10:0:0:0: Direct-Access     WDC WD30 EZRX-00MMMB0     80.0 PQ: 0 ANSI: 2
[605719.254314] sd 10:0:0:0: Attached scsi generic sg2 type 0
[605719.258115] sd 10:0:0:0: [sdc] 1565565869 512-byte logical blocks: (801 GB/746 GiB)

See how internally there's 5,860,533,168 logical blocks and externally only 1,565,565,869.

I also noticed that SATA reports WDC WD30EZRX-00M 80.0 PQ: 0 ANSI: 5 while USB reports WDC WD30 EZRX-00MMMB0 80.0 PQ: 0 ANSI: 2 What's the difference between the two? Could this be the problem?

When connected to the SATA controller, parted says:

Model: ATA WDC WD30EZRX-00M (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  3001GB  3001GB  xfs

How can I access the whole drive when it's in the enclosure? Do I need an updated kernel/driver?

Best Answer

After much discussion with Mediasonic, it turns out that there's a firmware problem with the enclosure.

They provided a firmware update tool but it only works on Windows.

http://forum.mediasonic.ca/viewtopic.php?f=13&t=770&p=3281#p3281

I couldn't get the update tool to work so they've sent me a board with the firmware already updated.

Related Question