Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So I was trying to copy one of my internal 250 gB drives to an external usb 320 gB hard disk. I didn't think the throughput would be so bad (2.5 mB/s), and it ended up taking too long. I canceled it after fourteen hours with over a hundred gigs to go. It wasn't readable by my system next I plugged it in, and dmesg shows a bunch of io errors. All operations like
Code:
dd if=/dev/usbdisk of=/dev/null
fail with
Code:
dd: reading `/dev/sdd': Input/output error
and dmesg shows:
Code:
[31845.504813] Buffer I/O error on device sdd, logical block 4
[31845.568091] end_request: I/O error, dev sdd, sector 0
dd is not supposed to be used to copy the contents of a smaller drive to a larger one. Even if you had let the process finish, there is a good chance it wouldn't have worked anyway due to differences in drive geometry.
I am guessing that is probably why /dev/sdd (which I assume is the external) is no longer working properly. You can try putting a new partition table on the external drive, and reformatting it, but you might need to zero the drive out too. You could do something like:
Code:
dd if=/dev/zero of=/dev/sdd
This would write all zeros to the drive, but will probably take a very long time. Worst case scenario, you might actually need to do a low level format on the drive, which is usually done with OEM tools from your particular drive manufacturer.
dd is not supposed to be used to copy the contents of a smaller drive to a larger one. Even if you had let the process finish, there is a good chance it wouldn't have worked anyway due to differences in drive geometry.
That shouldn't be a problem. all that would happen is that the partitions wouldn't take all the drive. Some unpartitioned space would remain at the end of the drive.
Quote:
I am guessing that is probably why /dev/sdd (which I assume is the external) is no longer working properly. You can try putting a new partition table on the external drive, and reformatting it, but you might need to zero the drive out too. You could do something like:
That shouldn't matter either. All dd does is to read raw bytes from the drive, it doesn't care about the consistency of the fs('s) inside it, in fact it doesn't even require an fs. The drive could be completely zeroed of full of random crap and dd would copy it regardless. It just copies bytes from one place to another.
It rather looks like a broken drive to me, but I don't have all the data to judge. I would start by using smartmontools to do some checks, and make sure that the connection is ok as well. USB plugs sometimes can be fried by static electricity.
About the speed, usb 2.0 and above should be much faster than that. Some boards nowadays include 2.0 and 1.x plugs, so it might worth a check to your mother board's manuals. If you only have usb 1.x then there's not much you can do, other than buying a new mother boards or using a pci expansion card to add some 2.x or 3.x usb ports.
ps. The bottleneck could also be your internal drive, since you are reading from it. So you should also check that your dma is on and you are using the most effective driver for your hd controller.
So I was trying to copy one of my internal 250 gB drives to an external usb 320 gB hard disk. I didn't think the throughput would be so bad (2.5 mB/s), and it ended up taking too long. I canceled it after fourteen hours with over a hundred gigs to go. It wasn't readable by my system next I plugged it in, and dmesg shows a bunch of io errors. All operations like
Code:
dd if=/dev/usbdisk of=/dev/null
fail with
Code:
dd: reading `/dev/sdd': Input/output error
and dmesg shows:
Code:
[31845.504813] Buffer I/O error on device sdd, logical block 4
[31845.568091] end_request: I/O error, dev sdd, sector 0
What can I do to fix it? Did I brick it?
You mean 2.5 MB/s, not 2.5 mB/s? No, dd would not brick it. The symptoms suggest a hardware error on /dev/usbdisk (that is mapped to /dev/sdd?). In this situation I would run tests on /dev/usbdisk (sorry -- I do not know what commands to use to do that but netsearching will find something).
Gah, bits, bytes, b, B, doesn't seem to be standard abbreviations. Anyhow, I do believe dd was reporting 2.5 MB/sec. The drive is a WD 2.5" external mybook that claims to be usb 2.0, and my workstation mobo also claims 2.0, but I so rarely use the usb ports I can't be sure it isn't operating at 1.1. Though, I suppose the fastest usb1.1 is still only 1.5 mbytes/s (12mbits/8mbits/mbyte per second)
And yes, /dev/sdd == /dev/usbdisk.
I doubt the internal drive is the bottleneck. I know it copies faster to my other internal drives. It's a "Seagate Barracuda 7200.10 ST3250410AS 250GB 7200 RPM 16MB Cache SATA 3.0Gb/s 3.5in Internal Hard Drive - OEM" connected to a sata 2.0 onboard controller (mobo is k8n4e deluxe). That said, I really should make sure I'm using dma and the right kernel drivers. I haven't paid nearly so much attention to it since I switched from slackware to ubuntu.
So, I guess it's likely a broken disk. Thanks for confirming dd wouldn't cause this; Data (not Disk) Destroyer. I just bought the usb drive, so I can take it back no problem. After I use smartmontools and whatever I can find from wd to look it over.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.