Ask Your Question

Revision history [back]

Brief: depends on many factors: your USB controller, (on some systems) the port you used to connect the device, the USB device, and how the device is recognized by OS. Sometimes, it can take a very long time. And, you can be almost sure that dd will finish eventually!

If you want to check dd's progress, use what @randomuser or @karandeepchahal told you (I'd prefer the former). However, notice that on some USB devices, iostat might show 0 write speed at some times and non-zero one at other times (this specially happened on some older kernels with some USB devices).

However, if the write speed seems very slow, you should check/try the following:

  1. (Easiest!) Try another USB device
  2. Make sure that the device is recognized properly. So if you expect USB 3 performance, it should be recognized on a USB 3 port; and if it is USB 2.0 it should be recognized as that. Sometimes, with some USB devices, I've seen that they are recognized incorrectly; e.g. a USB 2.0 device is recognized as USB 1, and hence the read/write speed will be very slow. To fix that, you need to disconnect and reconnect the device until it is properly detected (assuming that USB ports are assigned dynamically, if not, just connect the USB device to another port). The method to detect how it is recognized is given at the end.
  3. Try running dd with a smaller bs= and also adding oflag=sync. For some devices, specially on older kernels, it can result in much faster writes.

Determine how a USB device is recognized (there might be a better way, this is what I've come up with myself): Check lsusb output, and determine the Bus number your device is connected to. Then, find another line with the same Bus number and see what kind of device it is. In the following example, Foo Device is on bug number 002, so it is recognized as USB 2.0 (because of having Linux Foundation 2.0 root hub on Bus 002), but Bar Device on Bus 005 is recognized as USB 1.1 (because of Linux Foundation 1.1 root hub on bus 005). So, If Bar Device is your USB storage media, you should reconnect it until it is recognized as USB 2.0. (It is OK for some non-storage devices to be recognized as USB 1.1, since they really are!)

[hedayat@hvlap ~]% lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID abcd:1111 Foo Device
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 1111:abcd Bar Device

Finally, IIRC, when you connect a USB 2.0 device but it is recognized as USB 1, kernel will generate an appropriate message in its logs saying that the device can perform faster if it is connected to a USB 2.0 port.