How to partition and format a new HDD when it is connected via USB 3.0 (Linux)?

03
2014-01
  • MountainX

    I just received a new unformatted 2.5" hard disk (1 TB) and an external USB 3.0 enclosure to use with my laptop (Thinkpad). I'm running Kubuntu 12.04 on my laptop.

    How do I access and format this HDD when it is connected via USB? I have installed it into the external enclosure and connected it to my laptop and it is powered on, yet it does not show up with either sudo fdisk -l or blkid. The only device that shows up is /dev/sda.

    The USB HDD also fails to show up in the GUI Partition Manager too, unsurprisingly.

    When I plug the USB HDD in, I get message like this:

    attached enclosure device
    attached scsi generic sg2 type 13
    uas_eh_abort_handler tag 0
    uas_eh_device_reset_handler tag 0
    ...
    reset high speed USB device number 5
    Device offlined - not ready after error recovery
    rejecting I/O to offline device
    

    I ran into a similar problem before on a desktop and the only solution I found was to connect the HDD to an internal sata port and format the disk. Then I could use it while connected via USB. Currently I am traveling and I only have access to my laptop.

    Assuming I cannot connect the disk internally on my computer and I don't have access to any other computer to do the same, how can I accomplish this task? I need to initially partition and format the disk (ext4) via USB.

    Update: the drive+enclosure are recognized in Windows. Windows allowed me to partition and format the drive.

  • Answers
  • MountainX

    I ended up using a different USB enclosure and I got it to work in Linux.

    I know this isn't a product review site, but in this situation my problem was hardware incompatibility and I had to waste money buying two products to get one that worked. So I'll share the details to save others the problem.

    The Rocketfish Rf-hd3025 USB 3.0 2.5" Sata Hard Drive Enclosure, which is a very nice looking product, appears to be incompatible with Linux (at least it does not work with Ubuntu 12.04 and a Thinkpad laptop). It costs about US$20 and it looks great, but I could not get it to work in Linux. (It worked with Windows.) It also uses a properietary split USB cable that takes up more bulk, which can be important if you are lacking space in your travel bag.

    The USB 3.0 2.5 Inch SATA III Drive Enclosure Case does not exhibit the same impressive looking design, but it is smaller (which I like) and appears solidly made. Most importantly, it works with Linux. It is fully powered by USB which is very handy. It also uses a standard USB cable. It also costs about US$20. YMMV.


  • Related Question

    osx - Mac OS X fails when trying to format external HDD
  • Questioner

    I have an Iomega Prestige desktop hard drive (1 TB) which I purchased from Amazon. I connect it to my white Macbook (purchased late 2007, 2.14 GHz with 2 GB Ram), open Disk Utility. I click the single partition on the disk, choose "Mac OS Extended (Journaled)" for the Volume Format and leave the name as-is. When I click "Erase", I get the following error after only a few seconds:

    Volume Erase Failed with the error:
    The underlying task reported failure on exit
    

    If I try to create a new partition with the same filesystem, I get the following error:

    Partition failed with the error:
    File system formatter failed.
    

    This is the second disk I've tried this with - I sent the first one back to Amazon thinking it was defective, and they sent me a replacement. Obviously, it's unlikely that I managed to procure two defective drives, so I'm thinking there may be something wrong with my machine.

    Another note - I've tried doing the format with the disk connected to both USB 2.0 ports on my machine, as well as connected through a USB hub. The behavior is the same, regardless of how the drive is connected.


  • Related Answers
  • inkedmn

    Just for the sake of having an answer here, this is what ended up fixing the problem:

    • Connected the disk to a windows XP machine
    • Deleted the existing FAT32 partition that the device shipped with using Disk Management under XP.
    • Connected it to the Mac, partitioned and formatted without issue.

    I won't make this the selected answer unless somebody upvotes it, and I'll make the question community wiki.

  • Disk Utility Screenshot

    What was the format of the disk? It's possible that you needed to select the entire drive (that is, repartition the drive) instead of the single partition? Not sure why that would be, but it's usually what I do for brand new drives.

  • Area 51

    I just got this error too. I had my Seagate 500GB USB drive connected to a hub that was connected to a USB extender. What fixed it was connecting it directly to the computer(no extender, no hub).