I have a 1TB Seagate Hard Drive that is failing I can read small files but can't drag big files off
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Ask yourself "why are only small files accessible"?
Assuming the disk is formatted as plain old ext4, is it possible that part of your disk is corrupt?
Have you tried taking the disk out of the enclosure and connecting it directly as an internal disk?
It could be a dodgy enclosure...
The problem is because your destination disk (the disk to which you want to copy the file) is formatted with FAT32 (which has a file size limit of about 4GB. The solution is to format your destination disk to EXT3, EXT4, or NTFS (if you need windows compatibility).
I have a 1TB Seagate Hard Drive that is failing .... (what is dd?)
Quote:
Originally Posted by doramzy
Thanks guys.
...(snip)
what is dd exactly please?
I was thinking of trying the freezing hard drive method but I didn't want to resort to that yet until I had exhausted all alternative options.
==============
dd was available in CP/M on the Zilog CPU. Somebody ported it to Linux.
It stands for: Direct Disk Alteration Utility. (see man dd)
It was/is useful for copying--- from-specific-address -- to-specific-address, as well as from disk to disk. (From/To can be a file to a disk; disk to disk; disk to file; start2stop specific address of source to start address of a file or disk address.
Also handy for altering specific byte values from the keyboard. (standard-in)
Do read and understand the man pages about it.
One slip and your file/hard_drive is Bye-Bye!
On the less technical end it can be used to 'rip' a CD/DVD/B to disk and then use cdrecord to dupe. Particularly handy when the Grand Kids show up. It protects the original from becoming a casualty of 'tug of war'.
To Consider: After recovery of whatever you can, low level format the bad disk several times and then re-partition and re-format and see if the disk has been discharged from the hospital. If yes - it can be used to transfer files (especially big ones) between systems but I would not plan on storing archives on it. (At the office we called them Sneakernets).
One more thing - The disk is not going to shift locations of existing bytes to "make room" for incoming. Does do a nice job of over writing!
dd is not the tool for this task. you want a dd that has features to ignore the errors. One of those tools was quoted in one of the above posts. I still forget that name. gdd or something. ddrescue maybe.
The following option would allow you to ignore read errors.
Code:
noerror
I don't know if this would be useful, though, as you won't know where the missing bits are.
If you are copying something structured, like a filesystem, "noerror" will make the output useless you also use "sync" to insert NUL pad characters in place of the missing bytes. Everything past the partially unreadable block would be offset, and filesystem structures would no longer be located where they are supposed to be.
The right tool to use for this is ddrescue. It handles the error intelligently, makes a first pass over the disk (or file) to get all the data that can be read easily, then goes back and retries reads to fill in the gaps.
If you are copying something structured, like a filesystem, "noerror" will make the output useless you also use "sync" to insert NUL pad characters in place of the missing bytes. Everything past the partially unreadable block would be offset, and filesystem structures would no longer be located where they are supposed to be.
The right tool to use for this is ddrescue. It handles the error intelligently, makes a first pass over the disk (or file) to get all the data that can be read easily, then goes back and retries reads to fill in the gaps.
And if ddresuce doesn't work? What sort of parameters should I put in for ddrescue because it only seems to rescue x amount if megabytes
And if ddresuce doesn't work? What sort of parameters should I put in for ddrescue because it only seems to rescue x amount if megabytes
The only reason I can think of for that would be if the destination did not have space at least as large as the source disk. If you are running ddrescue on a complete 1TB source disk, you would need at least 1TB of space at the destination. If you are running ddrescue on just one partition or perhaps on one file, then the required space would be correspondingly smaller.
Do use a log file somewhere on non-volatile storage. That's what allows you to restart ddrescue and have it pick up where it left off.
Hi. ¿Do you try with badblocks first?
¿Are you using newest e2fs version? Sometimes old version of fs can't read big files (like a dvd iso). Sometime ago i cant create files bigger than 2Gb because older fs cant create/read those.
You can use ddrescue to rescue data from a damage device, partition or file. See man ddrescue to options.
It works like dd, but have some diferences (see manpages).
If you try with dd, it can read data 'raw' and copy it (example, from /dev/sda2) to another device or partition (example, to /dev/sdb1/directory) like a file like:
#dd if=/dev/sda2 of=/mnt/sdb1/directories/file.dd
Then you must mount with:
#mount -o loop file.dd /mnt/directory
If the device is damage, ddrescue take a lot of time to do (and destroy damaged device sectors during job), but do it.
dd must block if data could not extracted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.