cant move file between HDDs - fsck says clean
Hi,
ive moved a bunch of files from one HDD to another with no problem, but there are 26 or so where it tries to but ends up with the error: "There was an error copying the file into /media/media/. Error reading from file: Input/output error" ive unmounted the filesystem and run fsck and e2fsck and they both come back telling me its clean. both filesystems are ext2, im running ubuntu 8.04 i have no idea what to try next. all help appreciated. cheers nonc |
I have found limits on the cp command copying very large files or groups of very large files. If you are using the cp command you could try using tar or dd. I copy large directories, such as my music collection, from one partition to a NAS using tar.
Code:
cd music Code:
tar -c bigfile | tar -C /home/user/iomega.music -xvkp . Code:
dd if=bigfile of=/home/user/iomega.music/bigfile conv=notrunc,noerror |
You might have some bad blocks on the input partition. You could umount the partition and run the badblocks program in non-destructive mode to see if you have bad spots on the hard drive. See:
man badblocks ----------------- Steve Stites |
thanks stress_junkie, i tried the dd and it didnt work
Code:
dd if=/media/shared/brokenfiles/0205.avi of=/media/media/brokenfiles/02505.avi conv=notrunc,noerror and thanks jailbait here is the terminal output Code:
sudo badblocks /dev/sdc1 -n so how do i go about fixing these blocks, hopefully whilst preserving the data nonc |
Quote:
If you run e2fsck with the -c option then you should also look in the lost+found directory for the partition you run e2fsck against. e2fsck may place orphan files and directories in lost+found and give them a number instead of a name. See: man e2fsck --------------- Steve Stites |
perfect, problem solved, thanks very much.
it looks like the drive is clean now and all badblocks are fixed. i was planning once i had copied all the stuff off it to use it as a backup harddrive, hopefully like 'time machine' for mac, but backing up to a separate partiton. do you reckon it will be all right to use that HDD given whats just happend to it? |
Quote:
--------------------- Steve Stites |
If these bad blocks are just starting to appear, you had better keep a close eye on that drive; it may be failing.
You may have had the problem because, for instance, the kids were wrestling and banged against the computer, causing a head crash. In this case, mapping out the bad blocks probably fixes you up. But sometimes this happens because a media failure is occurring, and those tend to spread. If I were you I would enable SMART on the drive and have it run built-in read/write tests periodically, and I would monitor the SMART output using smartctl -a for awhile to make sure the problem is gone. |
cheers jiml8
i have had a read of the manual page, and im not sure i understand how to use it fully, but ive done the -a option and it looks fine but it does say that it is "FAILING NOW" for "5 Reallocated_Sector_Ct" below is the output, i cant tell if anything means its failing or not Code:
smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen |
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA. I think that means its failing. |
All times are GMT -5. The time now is 09:55 AM. |