FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 12-23-2011, 08:07 AM
linux guy
 
Default Script for testing all files on a drive ?

I am having an issue with my laptop. I've found some corrupt files on
an SSD drive. I need to know exactly how many are corrupt and which
ones they are.

I've run various block check and surface scan tools and they all come
up with zero errors.

I found the corrupt files when I was attempting to back up every file
on the drive with a simple cp command.

I would now like to run a script that checks every file on the drive
and puts the name and path of every corrupt file into a text file for
further processing.

What is the easiest way to do this ?

Thanks
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-23-2011, 08:20 AM
jdow
 
Default Script for testing all files on a drive ?

On 2011/12/23 01:07, linux guy wrote:

I am having an issue with my laptop. I've found some corrupt files on
an SSD drive. I need to know exactly how many are corrupt and which
ones they are.

I've run various block check and surface scan tools and they all come
up with zero errors.

I found the corrupt files when I was attempting to back up every file
on the drive with a simple cp command.

I would now like to run a script that checks every file on the drive
and puts the name and path of every corrupt file into a text file for
further processing.

What is the easiest way to do this ?

Thanks


If I understand how SSDs work when they detect a sector is going bad they
map it out and map in a new sector from the spare pool just like a regular
drive. If it can it reads the data from the old sector and puts its best
shot in the new sector. The disk also uses the spare pool as a means of
minimizing repeated writes to the same block by spreading them around.

I gotta ask just how did "cp" detect the bad sectors? I'm curious. I
suspect you'll tell me read errors. The surface scan might have lead to
automatic repairs. Heck, I'd have expected the "cp" to do the same.

If you have good copies of the files you can use diff or cmp against the
backups. Otherwise the only way to really find if the files is bad is to
try to use them.

{o.o}
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-23-2011, 08:25 AM
linux guy
 
Default Script for testing all files on a drive ?

"I gotta ask just how did "cp" detect the bad sectors?" cp didn't
detect bad sectors. It gave read errors when trying to copy files.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-23-2011, 08:44 AM
JB
 
Default Script for testing all files on a drive ?

linux guy <linuxguy123 <at> gmail.com> writes:

> ...
> I found the corrupt files when I was attempting to back up every file
> on the drive with a simple cp command.
>
> I would now like to run a script that checks every file on the drive
> and puts the name and path of every corrupt file into a text file for
> further processing.
>
> What is the easiest way to do this ?
>
> Thanks

What exactly is the output of 'stat' on a corrupted file (do not edit it) ?
$ stat <corrupted_file>

JB




--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-23-2011, 05:53 PM
jdow
 
Default Script for testing all files on a drive ?

On 2011/12/23 01:25, linux guy wrote:

"I gotta ask just how did "cp" detect the bad sectors?" cp didn't
detect bad sectors. It gave read errors when trying to copy files.


The errors are probably automatically remapped now. So you have to find
bad files the hard way - use them.

{O.O}
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 01:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org