LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-14-2016, 08:35 PM   #16
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511

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...
 
Old 04-15-2016, 09:58 AM   #17
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Quote:
Have you tried taking the disk out of the enclosure and connecting it directly as an internal disk?
It could be a dodgy enclosure...
Agreed. Which is why I initially asked you how you were connecting the drive.
 
Old 04-15-2016, 03:09 PM   #18
mdeschane
LQ Newbie
 
Registered: Feb 2016
Posts: 1

Rep: Reputation: Disabled
I googled your error message and found this:

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).
 
Old 04-15-2016, 03:11 PM   #19
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
What does S.M.A.R.T diags show or the OEM diags read?
 
Old 04-15-2016, 06:06 PM   #20
Norseman01
Member
 
Registered: Nov 2012
Posts: 85

Rep: Reputation: Disabled
I have a 1TB Seagate Hard Drive that is failing .... (what is dd?)

Quote:
Originally Posted by doramzy View Post
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!

Norseman01
 
Old 04-15-2016, 06:32 PM   #21
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
dd can be used (with great care)!!

to make a byte for byte copy to a file on your PC.
So you could copy the first 100GB - provided you have a spare 100GB.

Make one mistake with the parameters and you could write rubbish onto your external disk.
 
Old 04-15-2016, 08:38 PM   #22
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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.
 
Old 04-16-2016, 05:37 AM   #23
orhank
LQ Newbie
 
Registered: Dec 2012
Location: Istanbul, Turkey
Distribution: Debian 10.7, FreeBSD13
Posts: 27
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Error splicing file: Input/output error
usually refers to the fact that the destination drive does not have enough space.
 
Old 04-17-2016, 02:51 PM   #24
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
dd: error reading ‘/dev/sdb1’: Input/output error

When trying DD it only recovered 166mb, are there any other options with DD I can use to bypass
that error?

Edit: Okay maybe I'll try ddrescue

Last edited by doramzy; 04-17-2016 at 02:53 PM.
 
Old 04-17-2016, 03:36 PM   #25
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
You can get a full list of dd parameters etc with the command
Code:
man dd
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.

Try copying 150MiB to file1, the next 150MiB to file2 and so on.
If this works Linux can easily concatenate little files into one big file.
 
Old 04-17-2016, 04:32 PM   #26
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by JeremyBoden View Post
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.
 
Old 04-22-2016, 05:12 AM   #27
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
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
 
Old 04-22-2016, 05:14 AM   #28
doramzy
LQ Newbie
 
Registered: Oct 2015
Posts: 17

Original Poster
Rep: Reputation: Disabled
I'm going to try ddresuce one more time then I'm going to ask Mr. Refrigerator for help.
 
Old 04-22-2016, 11:10 AM   #29
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by doramzy View Post
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.
 
Old 04-22-2016, 04:08 PM   #30
cesarbergara
Member
 
Registered: Feb 2012
Location: Buenos Aires, Argentina
Distribution: Debian, Suse, Mandrake,
Posts: 92

Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount seagate 1Tb usb expansion drive Sotux121 Linux - Newbie 7 07-24-2019 05:58 PM
[SOLVED] Need NTFS USB 1TB hard drive needs to be read only except under Linux qlue Linux - Security 4 12-28-2014 08:11 AM
LXer: Seagate 1TB Solid State Hybrid Drive LXer Syndicated Linux News 0 11-26-2013 08:51 PM
device descriptor read/8, error -110 seagate external hard drive genex Linux - Hardware 1 09-08-2007 12:40 PM
How to back up files off a failing hard drive? Kyanos Linux - Hardware 6 10-05-2006 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration